teleren/devto huggingface dataset:
Metamask で Dev トークンの残高を確認する
Tags: metamask, dev
Published: 2018-08-28 03:43:55

---
title: Metamask で Dev トークンの残高を確認する
published: true
description: Metamask で Dev トークンの残高を確認する方法
tags: metamask,dev
---

![](https://i.gyazo.com/0663e25d96c0ffd26d31415cfc778949.png)

と、Ethrscan の URL が送られてきたものの、Metamask で Dev トークンの残高を確認する方法がよく分からなかったので。

Etherscan の `ERC20(DEV)` と書いてあるところが Dev トークンの情報が見れる URL のリンクになっている。

https://etherscan.io/token/0x98626e2c9231f03504273d55f397409defd4a093

ここの Contract というところがトークンアドレスのよう。

![](https://i.gyazo.com/eedead944b380515ad9bbdcbfdc7ffce.png)

これを Metamask の `トークンを追加` -> `カスタムトークン` の `トークンアドレス` のところにコピペ

![](https://i.gyazo.com/f2e95a660b3001937567cc3ebd73d9f2.png)

すると、トークンシンボルと小数点桁数というところが補完されるので `次へ` を押す

![](https://i.gyazo.com/1c175be859fc8c90162404d860e7a950.png)

残高も確認できる。ここで `トークンを追加` を押すと Metamask に Eth と並んで Dev という項目が追加される。

![](https://i.gyazo.com/e28ffabe3dcde9c3e92e245d38a34c99.png)

ゎ〜ぃ
How to survive to Chrome for Android disabling JavaScript for 2G or slower connections? 
Tags: javascript, webdev, chrome, discuss
Published: 2018-08-28 01:45:14

---
title: How to survive to Chrome for Android disabling JavaScript for 2G or slower connections? 
published: true
description: 
tags: JavaScript, webdev, chrome, discuss
---

I found this article and after reading carefully I start thinking a lot about that, I will share with your the [link right here](https://www.xda-developers.com/google-chrome-android-disable-javascript-2g-connections/).

What basically says is that Google is considering the idea of disable JavaScript in his browsers for slow internet connections in Android and maybe in the future for all his versions.

Looks like an odd move from Google, if this comes true, how the JS world will survive? 

Today we cannot talk about Front-end or Web development without talk about JavaScript. Now we have very popular frameworks and libraries like React, Angular, Vue, etc. And almost a new JS framework every month(or week?).

I was thinking in how work with this new scenario, maybe  use some progressive Enhancement, create phantoms layout before render anything, and realize that now we not only have to support old browsers but also slow networks.

What scares me about the idea of disable JS when the network become slow, is what new weird behaviours and bugs can we have to support? If now we should handle that a browser will shoot down your app, will we have that states (onJsDisabled?)? How the new net neutrality regulations will affects the speed in our sites? 

Maybe I'm a little paranoid, but I wanna know what the community thinks about this? how this posible change can affect us? And how to deal with it?

Best regards.
A worried Dev.
I'm making an app to help manage personal finances, Ask Me Anything!
Tags: ama, jellyfin
Published: 2018-08-28 01:34:00

---
title: I'm making an app to help manage personal finances, Ask Me Anything!
published: true
tags: ama, jellyfin
---

[As I've posted before,](https://dev.to/t/jellyfin) I'm building an app to help me convert a spreadsheet that I've managed to a multi-platform app.  I'm flirting with the idea of making it open-source because I believe money is one of those things that we all wrestle with and can totally automate.

Ask me anything!
Jelly Fin: Should I use a query or scan?
Tags: help, jellyfin, aws, serverless
Published: 2018-08-28 01:27:25

---
title: Jelly Fin: Should I use a query or scan?
published: true
tags: help, jellyfin, aws, serverless
---

Hey Dev.to,

I have an endpoint where I'm trying to get a subset of transactions by date using between.  When I run this, I get no results.  Odd thing is, I get no errors either.

I know, I know...why not post this on StackOverflow.  I don't feel like being judged and you guys are much more supportive. :)

```javascript
// get transactions for {month} and {year}
api.get('/transaction/tab/{year}/{month}', (request) => {
  const year = request.pathParams.year
  const month = request.pathParams.month
  const params = {
    TableName: request.env.tableName,
    KeyConditionExpression: '#date between :val1 and :val2',
    ExpressionAttributeNames: {
      '#date': 'date'
    },
    ExpressionAttributeValues: {
      ':d': 'date',
      ':val1': year +'-'+month+'-01',
      ':val2': year +'-'+month+'-'+getDaysInMonth(month, year)
    }
  }

  console.log(params)

  // post-process dynamo result before returning
  dynamoDb.query(params, (err, data) => {
    console.log(data)
    if (err) {
      console.error('Unable to query. Error:', JSON.stringify(err, null, 2))
      return 'Unable to query. Error: '+ JSON.stringify(err, null, 2)
    } else {
      console.log('Query succeeded.')
      data.Items.forEach((item) => {
        console.log(' -', item.year + ': ' + item.title)
      })
      return data.Items
    }
  })
})
```

Here's my data model:

```
{
    id: String
    date: String
    ...
}
```
The step-by-step guide to create a domain redirect with Cloudflare
Tags: cdn, productivity, webdev, domain
Published: 2018-08-28 12:29:51

---
title: The step-by-step guide to create a domain redirect with Cloudflare
published: true
tags: cdn, productivity, webdev, domain
canonical_url: https://codewithhugo.com/the-step-by-step-guide-to-create-a-domain-redirect-with-cloudflare/
---

Be logged into your dashboard.

1. Select the domain you want to redirect from
2. Go to page rules ![](https://d2mxuefqeaa7sj.cloudfront.net/s_DC48416CB036B302B07CB3A97C1D5F782A909AB40C4D67DF37729B755DC42D54_1533378164299_image.png)

3. Click “Create page rule” ![](https://d2mxuefqeaa7sj.cloudfront.net/s_DC48416CB036B302B07CB3A97C1D5F782A909AB40C4D67DF37729B755DC42D54_1533378182704_image.png)

4. Enter `your.domain/*` (matches all traffic) for which URLs will have their traffic redirected

5. Click “Add a Setting” ![](https://d2mxuefqeaa7sj.cloudfront.net/s_DC48416CB036B302B07CB3A97C1D5F782A909AB40C4D67DF37729B755DC42D54_1533378353766_image.png)

6. Select “Forwarding URL” ![](https://d2mxuefqeaa7sj.cloudfront.net/s_DC48416CB036B302B07CB3A97C1D5F782A909AB40C4D67DF37729B755DC42D54_1533378376456_image.png)

7. Select the type of redirect, I recommend 302s since they’re less aggressively cached (so if you ever want to use that domain to do something else other than redirect, you can) ![](https://d2mxuefqeaa7sj.cloudfront.net/s_DC48416CB036B302B07CB3A97C1D5F782A909AB40C4D67DF37729B755DC42D54_1533378448011_image.png)

8. Enter your forwarding URL ![](https://d2mxuefqeaa7sj.cloudfront.net/s_DC48416CB036B302B07CB3A97C1D5F782A909AB40C4D67DF37729B755DC42D54_1533378393120_image.png)

9. Click “Save and Deploy” ![](https://d2mxuefqeaa7sj.cloudfront.net/s_DC48416CB036B302B07CB3A97C1D5F782A909AB40C4D67DF37729B755DC42D54_1533378519046_image.png)

You’re done, you’ve just created a redirect from your domain to another one 🙂

[Andrew Preble](https://unsplash.com/@apreble?utm_medium=referral&utm_campaign=photographer-credit&utm_content=creditBadge "Download free do whatever you want high-resolution photos from Andrew Preble")
Git and Managing Different Versions of the Same Application Question
Tags: discuss, git, firefox, extension
Published: 2018-08-27 23:50:47

---
title: Git and Managing Different Versions of the Same Application Question
published: true
description: 
tags: discuss, git, firefox, extension
cover_image: https://images.unsplash.com/photo-1477949331575-2763034b5fb5?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=027ac825ba9be1a04b30ea8c687e3d57&dpr=1&auto=format&fit=crop&w=1000&q=80&cs=tinysrgb
---

I'm working on a Chrome/Firefox extension. I started building it when I was using Chrome. I have since started using Firefox more. The extension is already available on the Chrome Webstore and I also wanted to make it available on Firefox as well.

In my ~~laziness~~ sprint for an MVP, I ended up just branching the repo to a `master-ff` branch to make the Firefox related changes. Which turned into a decent amount of changes, some not specific to the Firefox version which now need to get ported back to the Chrome version. The only way I could really see forward with that is to just go back through the commits to `master-ff` and see what needs to go back to `master` and merge/copy over the changes. 

> Am I Dumb And Lazy or is This a Valid Way to Handle Separate Versions of the Same Thing?

> Any other suggestions for handling this situation? Two seperate repos? Git but I'm not doing it right? 

_Photo by [Brina Blum](https://unsplash.com/photos/Bb_X4JgSqIM) on Unsplash_
From Python to C#
Tags: advice, help, csharp, dotnet
Published: 2018-08-27 23:22:36

---
title: From Python to C#
published: true
description: Looking for recommendations for learning resources.
tags: advice, help, csharp, dotnet
---

It looks like I'll be helping a friend with a contract he has, and I'd be the main developer, which is great. But it's a .NET / Winforms gig, and I'm a Python developer. 

So I need to get up to speed quickly. Can anyone name any good resources, aside from msdn/channel 9/MVA? Not looking for hand holding type stuff, a quick pace is fine. 

Cheers in advance.
You probably don't need Babel
Tags: javascript, modules, npm
Published: 2018-08-27 23:02:16

---
title: You probably don't need Babel
published: true
description: How to publish native ES modules backwards compatible with Node < 8.5.0
tags: JavaScript, modules, NPM
---

Starting with version 8.5.0 (released in [Sep 2017](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V8.md#8.5.0)), Node.js supports ES modules natively, if you pass the `--experimental-modules` flag and use the .mjs extension for all the files involved. This means we no longer need a transpiler like Babel!

**lib.mjs**

```js
export const hello = 'Hello world!';
```

**index.mjs**

```js
import { hello } from './lib';
console.log(hello);
```

Run as:

    node --experimental-modules index.mjs

That's it! You've written an ECMAScript module and used it, without Babel or any transpilers.

# How to publish native ES modules

To publish an ES module to [NPM](https://npmjs.org) so that it can be imported directly, without Babel, simply point the main field in your `package.json` to the `.mjs` file, but omit the extension:

```json
{
  "name": "mjs-example",
  "main": "index"
}
```

That’s the only change. By omitting the extension, Node will look first for an mjs file if run with `--experimental-modules`. Otherwise it will fall back to the .js file, so your existing transpilation process to support older Node versions will work as before — just make sure to point Babel to the .mjs file(s).

Here’s the source for a native ES module with backwards compatibility for Node < 8.5.0 that I published to NPM. You can use it right now, without Babel or anything else.

Install the module:

```sh
yarn add local-iso-dt
# or, npm install local-iso-dt
```

Create a test file `test.mjs`:

```js
import { localISOdt } from 'local-iso-dt';
console.log(localISOdt(), 'Starting job...');
```

Run node (v8.5.0+) with the --experimental-modules flag:

    node --experimental-modules test.mjs

# Conclusion

It’s very easy to add native ES module support to your Node.js packages. Just rename your ES6+ files to .mjs and update the main entry in `package.json`, omitting the extension. This way your modules can be used directly in Node v8.5.0+ with the `--experimental-modules` flag.

While support is experimental right now (Feb 2018), it’s unlikely to change significantly and Node plans to drop the flag requirement with v10.

Keep your transpilation script for backwards compatibility and feel free to fork my example native ES module repo.

# Further reading
* [Using ES modules natively in Node.js](http://2ality.com/2017/09/native-esm-node.html)
* [Setting up multi-platform npm packages](http://2ality.com/2017/04/setting-up-multi-platform-packages.html)
* [StackOverflow question](https://stackoverflow.com/questions/46418010/publish-es-module-mjs-to-npmjs-with-backwards-compatibility-for-node-8-5-0) (credits to Alexander O’Mara)
What language should I learn?
Tags: javascript, language, suggestion, discuss
Published: 2018-08-27 22:27:50

---
title: What language should I learn?
published: true
description: 
tags: javascript,language,suggestion, discuss
---

Please suggest me some languages. I have been developing in JavaScript (both backend and frontend) and would like to learn something new (for both sides). Would love to learn about non-web technologies.
Pastebin As a Media Host
Tags: pastebin, php, tutorial, tips
Published: 2018-08-27 21:59:33

---
title: Pastebin As a Media Host
published: true
description: Hosting Different Media Files on pastebin
tags: pastebin, php, tutorial, tips
---

## Summary

After purchasing a pastebin pro account a few months ago during a sale for relatively cheap I tried to see what I could use it for.

I discovered that by sending the raw data of a media file through their API the raw page of that bin would properly display!  You'll need at least a free account so you can get a dev key from their [api pages](https://pastebin.com/api#1).

This is interesting because using the web interface to paste a media file doesn't work!

I've made a barebones php script that lets you play with this, there's a lot to be desired but it should work enough to let you try to upload your own images.  Just remember paste bins size limits are pretty small if you don't have a pro account!

{% github agentd00nut/pasteStore %}


## Examples

For images, gifs, and webms you can visit the links directly and they work.  For .mp4, .webp, and others you need to embed them into a webpage for them to work.

I only tried png and jpg's.  I'm sure nearly any common image format would work.
[PNG](https://pastebin.com/raw/rSj0j82Q)
![PNG](https://pastebin.com/raw/rSj0j82Q)

[GIF](https://pastebin.com/raw/AHnbEk2a)
![GIF](https://pastebin.com/raw/AHnbEk2a)

[webm](https://pastebin.com/raw/Px16eDxe)


## mp4 and others

.mp4, .webp, and other **video** formats don't work directly.  Instead I found you need to wrap them in video elements and set the source like this...
```
<video width="320" height="240" controls>
    <source src="https://pastebin.com/raw/exQT7F6z" type="video/mp4">
/video>
```


## Thoughts

Is this useful?  Sorta!  I like the idea of being able to upload a whole bunch of my images on a server I don't pay bandwidth on!  

It's much less useful if you don't have a pro account since you have a 500kb max upload size.

You could do something goofy though like pool a few peoples pro accounts together and host one of those image storage sites that, on the backend, just links to unlisted paste bin posts.

Maybe you could write a web player that seamlessly plays all the videos in a list, and then divide bigger files into 10mb chunks and host large videos right off pastebin.

For now It's mostly just interesting and a decent way to quickly share an image with someone.  I think if pastebin adds support for API uploading into folders it could become much more useful.
Update on keto
Tags: blogging, keto, programmerbody
Published: 2018-08-27 21:23:26

---
title: Update on keto
published: true
tags: blogging,keto,programmer body
canonical_url: https://kritner.blogspot.com/2018/08/update-on-keto.html
---

Hey, it's been like a month and a half since starting keto.  I'm down to 170, down to 20% body fat (depending on the day), and I haven't measured my belly yet, but two notches tighter on the belt.  Holy heckin gosh!  
  
This is my first post since I was introduced to dev.to (I imported... most? of my previous blog posts).  This seems like a pretty cool platform, hopefully I'll be able to make more time for blogging (I think this is like the 5th time I've said this)
Engineering KPIs
Tags: discuss, culture, team
Published: 2018-08-27 19:47:49

---
title: Engineering KPIs
published: true
description: What sort of KPIs do you use on your engineering processes and infrastructure?
tags: discuss, culture, team
---


What sort of KPIs do you use on your engineering processes and infrastructure? Sprint Velocity, No of hotfixes, API response times, client bundle file size, etc, etc..
How I take notes
Tags: notes, learning, academics
Published: 2018-08-27 19:19:20

---
title: How I take notes
published: true
description: 
tags: #notes #learning #academics
---
Taking notes is something I consider essential to a learning process. Generally, if I'm trying to learn a concept, whether it be for school or my own learning desire, I try to take notes that are meaningful, something I would be willing to read sometime later, and happily show to others. My usual process is to always start messy and move the messy notes into a separate notebook; one that's neat with helpful visuals. These visuals tend to be drawings or multi-color text that helps me distinguish topics like vocabulary, conceptual explanations, hypothetical usage, and do's and don'ts.

Here's an example of me learning about Python classes and object-oriented programming in Python:

![alt-text](https://thepracticaldev.s3.amazonaws.com/i/7z3pazj2hpgohwyw5ufj.jpg)

Pretty messy right? These notes are what I take as I'm learning, whether that be through video or reading. I don't want to disturb the flow of either learning process, so I typically don't pay attention to how pleasing my notes look, but rather focus on how useful my notes are.

Once I've finished the rough learning, I then take the time to revise my notes in my neater notebook. I'll generally clear a whole page or two based on the subject and write down the biggest takeaways alongside the information that I found to be the most useful.

![alt-text](https://thepracticaldev.s3.amazonaws.com/i/aqnz8lb94foh02ksjz1j.jpg)

Now that I have a clear section, I'll re-read my notes to determine what I would want to keep or throw away. I generally like to mark the order of what notes move in first, and cross out each section as I go. This way I prevent myself of writing down the same thing and keep a clear track.

![alt-text](https://thepracticaldev.s3.amazonaws.com/i/q5jurcareu0l2kt4r6i6.jpg)

I'll continue this process up until the very last section and voilà! A nice section on Python classes and OOP that I can refer to in the future

![alt-text](https://thepracticaldev.s3.amazonaws.com/i/k9wj9xnkk85ci0sx4x54.jpg)

If you take notes and have any tips or recommendations, I'd love to hear them! I absolutely adore seeing other people's notebooks and sometimes even draw inspiration from them so please do feel free to share!
Do you pronounce it Dev dot 2 or Dev dot Tee Oh?
Tags: discuss, meta
Published: 2018-08-27 18:56:20

---
title: Do you pronounce it Dev dot 2 or Dev dot Tee Oh?
published: true
description: 
tags: discuss, meta
---

I personally lean Dev dot Tee Oh. What do you think?

 -- Edit --

**I was wrong on all counts:**

![/thread](https://harnerdesigns.com/wp-content/uploads/2018/08/dev-too.png)

![](https://harnerdesigns.com/wp-content/uploads/2018/08/dev-too-2.png)
Isolated DEV environments on docker (moving away from cloud9)
Tags: docker, cloud9, ide, environment
Published: 2018-08-27 18:07:03

---
title: Isolated DEV environments on docker (moving away from cloud9)
published: true
description: Moving from cloud9 dev containers to local ones with docker
tags: docker,cloud9,ide,environment
---

Moving from [cloud9](https://c9.io/) (Cloud IDE with isolated containers) to a local solution I came across [ICEcoder](https://icecoder.net/) as a Browser IDE which I can host myself.

TOC:
- Why moving from c9 to local docker containers?
- Why ICEcoder?
- Steps to follow

##Why c9 -> local docker containers?
I decided to save some money and leave my data on my maschine. Cloud9 runs the [ACE Editor](https://github.com/ajaxorg/ace) connected to containers called workspaces. One can create as many workspaces as needed and access them with an URL and start editing code, accessing terminals and interacting with it via the Browser.
This was indeed very nice especially the fact that those workspaces were isolated containers.
But as mentioned, I want to safe some money and have all my stuff locally for now.
Besides those hard facts, this was a nice project for an evening :)

##Why I chose ICEcoder
After trying to setup ACE Editor, I recognized that the nice file browser on c9 is an extension they made and this is not included in the ACE Editor itself. So this was the point I was searching for other browser based IDEs / code editors.
[ICEcoder](https://icecoder.net/) looked nice at the first glance and has a file browser so the decision was made.
Plus: only PHP is needed to run it! Very few dependencies, small space used (compared to a lot of npm modules with ACE!).

##Steps to setup

I created a Github repository for easy cloning (and for me also):
{% github https://github.com/DarkSmile92/rdev-container %}

###quick steps - For impatient people
1. Clone my Github repo
2. Follow steps in Readme - Quickstart
3. Open URL: [http://localhost/ice](http://localhost/ice)

```shell
git clone https://github.com/DarkSmile92/rdev-container rdev-container
cd rdev-container && sudo sh ./build.sh
sudo docker run -p 80:80 --name devEnv1 -d rdev-container
```

###For those who want details
- Clone my Github repo  

`git clone https://github.com/DarkSmile92/rdev-container rdev-container`
- Build docker base image and the final image  

I decided to split it up in case dependencies have to be changed.
- Run it with a name like _devEnv1_: 

`sudo docker run sudo docker run -p 80:80 --name devEnv1 -d rdev-container`

###Result


![ICEcoder view](https://thepracticaldev.s3.amazonaws.com/i/mqfogk6d1wia1ekw9abd.png)
Are old unit tests useful?
Tags: testing, legacy, maintainability, discuss
Published: 2018-08-27 17:40:17

---
title: Are old unit tests useful?
published: true
description: Are pre-existing tests actually useful, or do they just double the amount of legacy code per unit of functionality?
tags: testing, legacy, maintainability, discuss
cover_image: https://thepracticaldev.s3.amazonaws.com/i/tshgnnpn60nnmcrx1n65.png
---

A little bit ago, I had some thoughts about old unit tests, which I posted on Twitter.  Rather than restate them, here are the tweets:

{% twitter 1034120380007555078 %}

{% twitter 1034120389318856704 %}

{% twitter 1034122657078362112 %}

{% twitter 1034122658097582080 %}

Disclaimer: I'm not telling you to throw out all your old unit tests! 

However, it has been my subjective experience that pre-existing test suites have caused me as much trouble as they've saved.  On the other hand, maybe they prevented even worse problems I wasn't aware of.  That's the problem with legacy code, though: you never know what it's okay to change.

Unit tests are often touted as a form of executable documentation.  This is only true if they're written for the reader (or at least cleaned up/refactored for them after the fact).

What has your experience with pre-existing test suites been like?  Have you encountered a really well-written test suite that lived up to the promise of "executable documentation"?  Is there a better way to approach testing and existing tests?