teleren/devto huggingface dataset:
How Can I Help Foster A Culture of Continual Learning?
Tags: discuss, learning
Published: 2018-10-18 09:52:54

---
title: How Can I Help Foster A Culture of Continual Learning?
published: true
description: 
cover_image: https://images.unsplash.com/photo-1529070538774-1843cb3265df?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=615eb020ee1d598fdd9b5c40ede9eccf&auto=format&fit=crop&w=1350&q=80
tags: discuss, learning
---

Over the past two years I've been [learning and writing about .NET Core](https://dotnetcore.gaprogman.com/), which has lead to me starting a [podcast all about it](https://dotnetcore.show/). But all of that learning has been in my own time. I'm incredibly lucky where I work, in that management have allowed me the time (during my day-to-day work time) to learn how to use things like docker, Azure, and other tools.

But I'm left wondering "how can I make sure that the knowledge and experience that I've collected can be spread amongst my work peers?" We already have a culture of lightning talks (which are informal, not-compulsory, and mostly "here is a thing that I have done/used"), pair programming, and wiki entries

So my question to you all is how would you want knowledge from a colleague to be shared with you? Brown-bag lunches? Lightning talks? Wiki entries?
Better console.logs
Tags: webdev, javascript, devtips, learning
Published: 2018-10-18 09:38:32

---
title: Better console.logs
published: true
description: Better console.logs
tags: webdev, javascript, devtips, learning
cover_image: https://thepracticaldev.s3.amazonaws.com/i/vbj2ni0maiqplenbq0rn.jpg
---
If you work with javascript a lot, you probably often need to use `console.log()` to output some info as you go along.

It's usually just the plain old way though:
```javascript
(() => {
    // do stuff
    console.log('Success!')
})()
```
![plain](https://thepracticaldev.s3.amazonaws.com/i/7c9pbcb63avm83drprur.png)

Here are a few ways you could make your logs a bit more visually informative, and interesting 🙂

### Use `console.error()` for error logs
```javascript
(() => {
    // do stuff
    console.error('Oops, something went wrong!')
})()
```
![errorlog](https://thepracticaldev.s3.amazonaws.com/i/d2sjc7fbnab0ihih2718.png)

### Use `console.warn()` for warning logs
```javascript
(() => {
    // do stuff
    console.warn('Warning! Something doesnt seem right.')
})()
```
![warninglog](https://thepracticaldev.s3.amazonaws.com/i/5d5je9x3d5kex8y7kosz.png)

### [Edit] Use `console.table()` for iterable objects
Thanks to @shoupn and @squgeim for pointing this out in the comments :)
```javascript
function Person(firstName, lastName) {
  this.firstName = firstName
  this.lastName = lastName
}

const me = new Person('John', 'Smith')

console.table(me)
```
![tablelog](https://thepracticaldev.s3.amazonaws.com/i/smtigum4notzzl2gjrnq.png)

### Add your custom styles
```javascript
(() => {
    // do stuff
    console.log('%c%s',
            'color: green; background: yellow; font-size: 24px;','Success!')
})()
```
![custom_success](https://thepracticaldev.s3.amazonaws.com/i/2ey09anydalwx4jo89nk.png)

You can have a custom function in your code that lets you use "your own" log with colors directly

```javascript
function customLog(message, color='black') {
     switch (color) {
         case 'success':  
              color = 'Green'
              break
         case 'info':     
                 color = 'Blue'  
              break;
         case 'error':   
              color = 'Red'   
              break;
         case 'warning':  
              color = 'Orange' 
              break;
         default: 
              color = color
     }

     console.log(`%c${message}`, `color:${color}`)
}

customLog('Hello World!')
customLog('Success!', 'success')
customLog('Error!', 'error')
customLog('Warning!', 'warning')
customLog('Info...', 'info')
```
![custom_function](https://thepracticaldev.s3.amazonaws.com/i/utfaa6x2ryx37z9540nn.png)

Here's the [pen](https://codepen.io/wang0nya/pen/PyRJmO). 

Hope you found this useful and happy debugging! 😊
What are your criteria for staring a Github repo?
Tags: github, question
Published: 2018-10-18 09:21:29

---
title: What are your criteria for staring a Github repo?
published: true
description: 
tags: Github, question
---

Hi,

I just wonder how you can you decide to star a Github repo. Nowadays, we star the repos that show up on our Github dashboard.

Cheers.
🏖️ How To Create Your First Custom Angular Schematics With Ease🛠️
Tags: angular, javascript, node, webdev
Published: 2018-10-18 08:45:05

---
title: 🏖️ How To Create Your First Custom Angular Schematics With Ease🛠️
published: true
description: I got very excited when Angular & CLI team announced that they are working on Schematics.
tags: angular,javascript,node,webdev
cover_image: https://thepracticaldev.s3.amazonaws.com/i/fi89ruolvp01y2u4qfqo.jpg
canonical_url: https://medium.com/@tomastrajan/%EF%B8%8F-how-to-create-your-first-custom-angular-schematics-with-ease-%EF%B8%8F-bca859f3055d
---

I got very excited when Angular & CLI team announced that they are working on Schematics.

> ##Automatic generation and updating of a code base in organized well defined manner sounds like a lot less tedious work for the developers

Lots of stuff is possible with the help of schematics already. From official initiatives like being able to ng update your project dependencies and ng generate stuff like components or pipes, through semi official (ex Angular team) stuff like nx with schematics for generating services for popular ngrx state management library to small custom one-off schematics which are starting to pop up on npm.



[Read more...](https://medium.com/@tomastrajan/%EF%B8%8F-how-to-create-your-first-custom-angular-schematics-with-ease-%EF%B8%8F-bca859f3055d)
How to get bitcoin address and its privatekey?
Tags: bitcoin, bitcoinjslib, mnemonic
Published: 2018-10-18 08:27:15

---
title: How to get bitcoin address and its privatekey?
published: true
description: 
tags: bitcoin,bitcoinjs-lib,mnemonic
---

I have generated bitcoin address using bitcoinjs library see below code



return bitcoin.payments.p2pkh({ pubkey: node.publicKey, network }).address



The above code returns address see below
1FYtPnUZZ2ZJL2fZ6XehGtkHfujUHkqK3T


But for signing raw transaction I need privatekey of this address 1FYtPnUZZ2ZJL2fZ6XehGtkHfujUHkqK3T

What should I do to get address and its privatekey?

I now how to generate address using derivation path from mnemonic.
For derivation path m/44'/0/0/0 I is generated 1FYtPnUZZ2ZJL2fZ6XehGtkHfujUHkqK3T address.
Now I need to now how can get privatekey for this derivation path m/44'/0/0/0
dev.to Show us your octocat alter ego
Tags: showdev, discuss
Published: 2018-10-18 07:25:13

---
title: dev.to Show us your octocat alter ego
published: true
description: Show us your octocat alter ego
tags: showdev, discuss
---

GitHub released an [octocat builder](https://myoctocat.com/). I was waiting for this for many years and I am super excited. 

I am curious how dev.to would look like if we all where octocats.

This is me as an octocat
![pxlpnk cat](https://i.postimg.cc/G3PbcZL2/octocat-2.png "pxlpnk cat")


Please post yours in the comments.
I'm a software developer and a meditation teacher - ask me anything!
Tags: ama, productivity, softskills
Published: 2018-10-18 06:29:12

---
title: I'm a software developer and a meditation teacher - ask me anything!
published: true
description: 
tags: #ama #productivity #softskills
---

Having started my career in Physics, I've been developing software across diverse platforms (massively parallel computing, C/Java/C++/C#/.NET/front-end and so on) for about 17 years as a professional. 

I've worked in startups that have become grown ups. I've been Dev/Senior/Team Lead/Head of Software Development/Agile Coach and currently am a Tech Delivery Lead with a boutique consultancy in Sydney, Australia.

I've also acquired a relatively dedicated meditation practice in the last ten years, and teach people how to meditate regularly through classes, courses and workshops. I take a largely secular approach but have an abiding interest in Buddhist philosophy. 

I'm passionate about preventing coding burnout, helping developers find their optimal state of being to support effective coding and so on - I write about all of this at [codingmindfully.com](http://www.codingmindfully.com) - Ask Me Anything!


PS What a wonderful community to have stumbled upon - all credit to Ben for hosting us :)
Cookie Stealer
Tags: cookie, stealer, php, hijack
Published: 2018-10-18 05:55:30

---
title: Cookie Stealer
published: true
description: A cookie stealer disguised as a gif image
tags: cookie, stealer, php, hijack
canonical_url: https://github.com/victorqribeiro/cookieStealer
---

### A [Cookie Stealer](https://github.com/victorqribeiro/cookieStealer) disguised as a gif image
My External Display Setup
Published: 2018-10-18 17:02:15

---
title: My External Display Setup
published: true
tags: 
canonical_url: https://www.geekytidbits.com/multiple-displays/
---

I am really happy with my multiple display arrangement and would like to share my setup.

![Windows 95 CD-ROM](https://www.geekytidbits.com/media/multiple-displays.jpg)

## Primary

My MacBook Pro is front and center. I use it as my _primary_ screen, keyboard, and touchpad. Some people are surprised I do this because a more typical setup with external displays is to use an external display as the primary one and an external keyboard / trackpad. But here’s why I like it:

- The MacBook retina display is truly great. Why waste a screen in clamshell mode or relegate it off to the side when I could take full advantage of it?
- I love the MacBook trackpad. It’s the best trackpad on a laptop, bar-none.
- I like the proximity of the trackpad in relation to the keyboard. I like that I do not need to move my fingers far to switch between the keys and the trackpad. I feel that less hand travel makes me more productive.
- Since I work remotely, from time to time I take my laptop out of my house and work from other locations like coffee shops. When I am there, I only have my laptop. If I use my laptop screen as my primary display / keyboard / trackpad when at home I feel just as comfortable when I am without my external displays. No need to reorient myself with a new setup when I swap back and forth.
- Having my MacBook centered _underneath_ one of my external displays is an efficient way to have 2 external displays within close visual range. I simply pan my eyes up and down rather than side or side and possibly having to rotate my neck.

I use the primary for editing code and doing my, well, “primary” work.

## Center

My external display above my MacBook is front and center, right _above_ my MacBook. It is very easy for my eyes to travel from the MacBook up to this display. Having it _centered_ above the laptop is important to me. I have worked with 2 external display setups before that had the joining of the displays right in front of me. This is such a waste and forces me to turn my head or move my eyes to see the screens.

I use this display with two application windows side-by-side with Slack on the left and my browser on the right. I also have a secondary desktop (Desktop 2) on this display with a full screen browser that has my browser DevTools open for debugging. I can easily get to to Desktop 2 on macOS with a 3-finger swipe to the left.

## Vertical Aside

The display on the left is obviously rotated 90 degrees. This allows me to not have to turn my neck too far to see it but still gives me the benefit of a larger display. I use this display for my terminal and source control GUI. I don’t look at this display as often which is why it is to the side.
serverless app with react, tutorial/guide!
Tags: serverless, aws, react, discuss
Published: 2018-10-18 02:56:21

---
title: serverless app with react, tutorial/guide!
published: true
description: why have i not seen this before!
tags: serverless, aws, react, discuss
---

No idea why I haven't seen this before! I'll be following it so I can get better at creating AWS serverless apps.

https://serverless-stack.com/

Has anyone else seen this or used it? Thoughts?
Fullstack development using JS
Published: 2018-10-12 18:42:10

---
title: Fullstack development using JS
published: true
description: 
tags: 
---

I have a question for you today and it's a general purpose one. I want to learn more about the modern web development. I've watched many tutorials and courses online but as I search more and more, I get confused even more.

I will describe my main question through an example. I want to create a web application which displays data retrieved from a DB, which is populated with some sensor values.

I've seen many online lessons creating this kind of an app using React.js and other using Express.js or pure Node.js. I understand that the React is for the frontend and the Express is for the backend. However similar things can be made using both frameworks.

Using the Express.js I can create a server side application which handles the the requests to the DB's API, handles the routing between pages and can handle HTTP requests and generate EJS templates to show the data to the screen. My question is where does React come and help to the production of the app, especially when the rendering is done from the client and not on the server (which makes things worse for SEO).
Stop using sudo pip install
Tags: python, security, goodpractices, dependencies
Published: 2018-10-17 21:23:48

---
title: Stop using sudo pip install
published: true
description: A guide for correctly managing python dependencies
tags: python, security, good practices, dependencies
---

We've all done it:

~~~bash
pip install numpy
# run into permissions issues
sudo pip install numpy # or "sudo !!" for the power users ;)
~~~

End of story, it works, it's what is written in the README so what's wrong with it?

You see, when you install a library through pip, you are executing `setup.py` with root permissions. This file could harbor malicious code. You are also messing with the system libraries and that invariably leads to issues down the line.

Relevant XKCD (thx u/truh):

![xkcd](https://imgs.xkcd.com/comics/python_environment.png)

A much better and secure way would be:

~~~bash
pip install --user numpy # libs will be installed in ~/.local/lib
~~~

This is better, and can be used for installing applications, but it doesn't solve the problem of having different versions needs for different python projects. Enter [pipenv](https://pipenv.readthedocs.io/en/latest/). `pipenv` is to python what `composer` is to PHP. It lets you **easily** install and use libraries per project. It's not the only tool allowing you to do that, but it's the one I use so it's the one I'm gonna present you. Example:

~~~bash
pipenv install numpy matplotlib pandas
# to start your program
pipenv run ./crunch-data.py
# to install libs from another machine, after a git pull:
pipenv sync
# to get a shell in the env (like `source myenv/bin/activate` for venv)
pipenv shell
~~~

This allows a very reproducible environment for your program, without resorting to Docker and without messing up user or system libraries. Save yourself from future bugs and start using pipenv, venv, conda or virtualenv right away! It's much better than `requirements.txt` + pip. :)

Cheers,
~Nico
PROTON - Automagic python3 framework | Python MVC containerised
Tags: python, containers, api, opensource
Published: 2018-10-17 21:04:15

---
title: PROTON - Automagic python3 framework | Python MVC containerised
published: true
description: PROTON aims at easing server-side development for all Python enthusiasts. Essentially, by running a shell command, developer will auto generate necessary Model, Controller and APIs! All of this with connectivity to Transactional Databases (PROTON supports Postgresql, MySQL & SQL Server),caching (Redis middleware), Auto generated OpenAPI specs & descriptive logging! One command, to get a production ready server-side stack!
tags: #Python #containers #API #FOSS
---

PROTON is a high-level Python framework that facilitates rapid server-side development with clean & pragmatic design. Thanks for checking it out!

PROTON aims at easing server-side development for all Python enthusiasts. Essentially, by running a shell command, developer will auto generate necessary Model, Controller and APIs! All of this with connectivity to Transactional Databases (PROTON supports Postgresql, MySQL & SQL Server),caching (Redis middleware), Auto generated OpenAPI specs & descriptive logging! One command, to get a production ready server-side stack!

https://github.com/PruthviKumarBK/PROTON

PS: If you are experienced &/ interested in opentracing, connect with me if you are interested to extend PROTON's core to support method level profiling.
Vue.js Kanban Board: Adding Progressive Web App Features
Tags: vue, progressivewebapps, javascript, serviceworkers
Published: 2018-10-17 19:32:02

---
title: Vue.js Kanban Board: Adding Progressive Web App Features
published: true
description: Let's take our Kanban Board from part 1 and add data persistence, and offline support using service workers
tags: #vuejs #progressivewebapps #javascript #serviceworkers
canonical_url: https://auth0.com/blog/vuejs-kanban-board-adding-progressive-web-app-features/
---

In this article, we're going to continue developing the [Kanban Board application from part 1](https://auth0.com/blog/vuejs-kanban-board-the-development-process/) of this series to add basic data persistence, and Progressive Web Application features, such as offline support and adding to your mobile home screen.

[Read on ⚡️](https://auth0.com/blog/vuejs-kanban-board-adding-progressive-web-app-features/?utm_source=dev&utm_medium=sc&utm_campaign=vuejs_kanban)

![Vue.js Kanban Board: Adding Progressive Web App Features](https://thepracticaldev.s3.amazonaws.com/i/n9kuuiaw04305f95rwsv.png)
setting up docker with Hyper-V
Tags: docker, hyperv, windows
Published: 2018-10-17 19:19:05

---
title: setting up docker with Hyper-V
published: true
description: setting up docker with Hyper-V on windows and some useful commands on docker
tags: docker, hyper-v,windows
---
Docker is just amazing with flexibility we get to not worry about setting up the environments for our application.


![Image](https://thepracticaldev.s3.amazonaws.com/i/s4v2omchiwudi5gmganu.jpg)



--Photo by frank mckenna on Unsplash



Download docker for windows.



So with Windows we can use hyper-V and get containers spawned in minutes.



Here is how we do it.



Make sure you have Hyper-V enabled on windows if not go to turn on windows feature and turn this feature On. Once this is done with restart.



Use Hyper-V Manager for Windows to create a Virtual Switch


![Image](https://thepracticaldev.s3.amazonaws.com/i/lkzs8kihi3jg38yydjnb.PNG)







Now use the following commands to create the docker containers



> docker-machine create -d hyperv --hyperv-virtual-switch "Primary Virtual Switch" default



this will create a VM, you can see this with Hyper-V manager or



> docker-machine ls



once the machine is created you need to set some of the machine details in Environments Variables



to list the variables use



> docker-machine env default



Now set the env vairables as below using bash



> eval $("C:\Users\<username>\bin\docker-machine.exe" env default --shell bash)



No go ahead an use an existing docker images to test



> docker run -it hello-world

> docker run -it supertest2014/nyan





** CTRL + C is come out of it
Meet The Awesome NodeJs Framework
Tags: adonisjs, node, javascript
Published: 2018-10-17 18:58:51

---
title: Meet The Awesome NodeJs Framework
published: true
description: Choosing the right NodeJs framework for your next big project
tags: #adonisjs #nodejs #JavaScript
---

Are you tired of always putting together different modules just to get your NodeJs app ready? Or you are tired of always setting up authentication, middlewares for your routes, folder structure, etc? Then allow me introduce to you **AdonisJs!**

**AdonisJS** is a Node.js MVC framework that runs on all major operating systems. It offers a stable ecosystem to write a server-side web application so that you can focus on business needs over finalizing which package to choose or not.

**AdonisJS** was built based upon the same concept as **Laravel** (the famous PHP MVC framework) and it supports many of the features of its PHP counterpart. This of course is useful especially if you are a Laravel developer wanting to move to the JavaScript (NodeJs) community.

I find this framework very useful and elegant as I have built some projects with it. They have a nice documentation and a powerful Adonis-CLI to install its packages when developing.

## Features of AdonisJs

1. Models
2. Views (handled by Edge templates)
3. Controllers
4. Routes
5. Middleware
6. ORM (handled by Knexjs)
7. Migrations
8. Namespaces
10. Emails (needs to be installed separately)
11. Queues (integrated via service providers)
12. Configuration files and .env

So far AdonisJs is the best NodeJs framework in 2018. Hopefully this quick walkthrough has given you a spike of the awesome NodeJs framework.

Please share your thoughts below and thanks for reading.
Notable Issues of the Week Up for Grabs
Tags: meta, hacktoberfest
Published: 2018-10-17 18:36:32

---
title: Notable Issues of the Week Up for Grabs
published: true
description: Get your open source game on!
tags: meta, hacktoberfest
---

This is a new weekly post where we highlight some issues from our [GitHub repo](https://github.com/thepracticaldev/dev.to/issues). This week, we have three issues:

We recently made set up an initial configuration for Docker. This is a much more straightforward way of getting up and running with our app in development, but it's currently a slow environment. We're not experts at Docker, so any improvements are welcome!

{% github https://github.com/thepracticaldev/dev.to/issues/923 %}

We're looking for some help to allow organizations to update their slug. The Ruby/Rails logic should follow the same pattern as our `User` model. Details in the issue below:

{% github https://github.com/thepracticaldev/dev.to/issues/462 %}

Liquid tags are how we use custom embeds, like the GitHub issues you're seeing here! This issue is for creating a Medium Liquid tag. For examples, you'll want to follow any of the other Liquid tags we have:

{% github https://github.com/thepracticaldev/dev.to/issues/118 %}

That's it for this week! Be sure to [check out issues page for more.](https://github.com/thepracticaldev/dev.to/issues)