teleren/devto huggingface dataset:
MacOS Catalina will use zsh for the default shell
Tags: macos, terminal, bash, zsh
Published: 2019-06-04 13:06:31

---
title: MacOS Catalina will use zsh for the default shell
published: true
description: MacOS Catalina will use zsh for the default shell
tags: #macos #terminal #bash #zsh
---

### The News

I'm just catching up on news from WWDC and this seemed to be something that wasn't written in many places. Maybe some of you like me also aren't aware.

[Here's a link](https://www.theverge.com/2019/6/4/18651872/apple-macos-catalina-zsh-bash-shell-replacement-features) to an article on The Verge that discusses it more and the potential reasoning. 

In case you were wondering, Bash will still be available in MacOS Catalina.

I'm still a bit of a newb with Bash/Terminal/etc. but I've read that a lot of people love zsh. So, I'm going to install zsh right now and write as I go. I'm personally going to hold off on making it my default because I'm going to break something if I do. Actually, a lot of things will break. Will do that later.



### How to Install it

1. On MacOS the easy way is with homebrew: `brew install zsh`
2. Open Terminal and type zsh
3. You will have various prompts for setting up configs.

### Want to make it the default shell? 

According to [this](http://osxdaily.com/2018/12/29/use-zsh-default-terminal-mac-os-x/) open Terminal preferences > General > "Shells open with" > "Command" type in `/bin/zsh/` 

### Oh-my-zsh

Explore [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh) which I have yet to do because WOW there is SO MUCH!

### Other Reading

This article from @aspittel here on dev.to about using iTerm2 and zsh was linked from elsewhere as well. [Read here](https://dev.to/aspittel/my-terminal-setup-iterm2--zsh--30lm).

[Use zsh in VSCode](https://dev.to/nyanev/how-to-use-zsh-in-vs-code-for-mac-39dp) from @nyanev


Cheers!
Would you relocate for a contract position?
Tags: discuss
Published: 2019-06-04 13:03:51

---
title: Would you relocate for a contract position?
published: true
description: A discussion on the idea of contracting.
tags: #discuss
---

I have talked to a few who have relocated for a contracting position. Overall, these positions have worked out well for those individuals. However, I can't see myself willing to take that risk if I was in their shoes. Would you do it under the right circumstances?
Thinking about coding
Tags: beginners
Published: 2019-06-04 10:04:46

So I have been thinking a lot, well actually planning on changing careers. My current job, though my employer is outstanding, provides me with feeling of, well, just blah.

I really would love to move towards programming or engineering. Maybe even a hybrid. I've bought myself a year of Codecademy and also have a subscription at Linux Academy which is at a pretty good discount due to my veteran status. I hope both of these will provide me with what I need to get started.

At this point everything is about choosing a path. In Codecademy they have a more generic computer science path, a web development path, and a data science path. I started the Web Development path first, I find HTML remarkably boring. I don't know if everyone does, or if it's just me. This made me look closer at the Data Science path. But in all reality I'm still unsure. Sometimes having choices is not good. I am thinking of doing the beginning of each path to see which one I seem to want to continue the most.

On the Linux Academy side I have started their Scripting Automation For SysAdmins path. I like this since it starts by teaching Vim. On a side note, I am using the Vim editor in Standardnotes to write this post.

So I will publish this post to Twitter and Mastodon, maybe even Linkedin. I hope others will read it and offer me some input or share the path they took. Any guidance would be great. I think the thing I may be missing is a mentor. I know no one else that is either a Linux geek like me starting to code or who can help guide and motivate me.

Cheers
Tim
NuxtJS: From Terminal to Browser
Tags: vue, nuxt, webpack, javascript
Published: 2019-06-04 13:00:24

How we changed the developer experience to stop switching between the terminal and browser.

> Nuxt.js is a Vue.js framework to create different kind of web applications with the **same directory structure & conventions**: Universal, Single Page, PWA or Static Generated.

*ℹ️ These features are all available with [v2.8.0 release](https://github.com/nuxt/nuxt.js/releases/tag/v2.8.0).*

## Problems

1. Developing JavaScript applications with Webpack or any bundler requires to switch between your browser and terminal for debugging purpose.
2. Using `console.log` to debug when the app is server rendered requires to remember that logs will be displayed on the terminal when refreshing the page.

## Solutions

1. Forwarding Webpack build state right in the browser and display them in a fancy manner.

![foward-webpack-build-state](https://user-images.githubusercontent.com/904724/58880743-ec7a3280-86d8-11e9-8856-8d9d22b89b70.gif)


2. Same for Hot Module Replacement (really useful when the project gets bigger and takes more time to re-build).

![nuxt-build-indicator-hmr](https://user-images.githubusercontent.com/904724/58547105-129a6100-8207-11e9-9c61-a93956a17727.gif)


3. Forwarding SSR logs to the browser in development mode

![nuxt-ssr-logs-forwarding](https://user-images.githubusercontent.com/904724/58566291-a3396700-8230-11e9-9dd6-09c3ff8578d2.gif)

## NuxtJS Vision

The purpose to these changes is to use the terminal for commands only.

Now you can focus right on your code and its visual result 🙂

> Be lazy, be smart, be Nuxt.

Links:
- Documentation: https://nuxtjs.org
- GitHub: https://github.com/nuxt/nuxt.js
- Loading Screen source code: https://github.com/nuxt/loading-screen
- Twitter: https://twitter.com/nuxt_js
Tech exists to serve humanity, it shouldn't be the other way round
Tags: discuss, productivity, beginners
Published: 2019-06-04 12:43:42

I've joined DEV.to only a few days ago and the vibe I get here is really good!

Unlike some other sites, the devs here are friendly and humane, they don't ridicule or show passive aggressiveness towards those who are new and beginners in software development.

I think that's exactly the way it should be, programming and technical knowledge is used to solve people's problems. Of what use is this knowledge if fragile egos are nurtured through it instead?

I hope that DEV.to continues to work like this in future too, and other networking sites learn from them and show some compassion to their audiences too.

Feeling great to be part of a community, perhaps after a very long time. Best wishes to all you wonderful folks, may you all code to prosperity!
Fixing Open Source Sustainability Through Tech Recruiting
Tags: opensource, career
Published: 2019-06-04 12:40:34

Hi everyone! We’re Yavuz and Yasin, co-founders of TalentNode, a platform for funding open source projects via tech recruiting.

Companies currently pay recruitment agencies and platforms hefty fees to source software engineers, while the open source community, one of the best sources of developer talent, struggles to find sustainable funding sources. TalentNode is an attempt at solving both problems, by enabling companies to find high caliber engineers, and distributing 50+% of revenue to top-voted open-source projects. We’re launching with a job board, but plan on eventually offering agency services, where placement fees can amount to $10 - 40k per hire.

We’ve received generally positive feedback from developers and employers over the last few weeks, and would like to gather more feedback from the broader community. An early version/prototype can be found at https://talentnode.io/, and we’re still brainstorming through several approaches for simplifying the vetting process and allocating funds to open source projects. Let us know what you think -- all feedback would be greatly appreciated.

A little about ourselves: Yavuz is based in Europe and has recently participated in Tim Draper’s accelerator program after working in the VC and recruitment industries. Yasin is an engineer based in the Bay Area, with experience at a couple of startups.
#CodepenChallenge Sandwiches: Hamburger Menu
Tags: codepen, design, ui, css
Published: 2019-06-04 12:39:37

## CodepenChallenge

<p>This is a 3d hamburger menu, with layers of colors resembling a ham sandwich.</p>

<p>Unfortunately, I can't make Z axis overlap each other. I think this is the specification, so I left it as it is.</p>

{% codepen https://codepen.io/takaneichinose/pen/RmdpNa %}
Dynamic index name on Algolia with Rails
Tags: help
Published: 2019-06-04 12:24:51

---
title: Dynamic index name on Algolia with Rails
published: true
tags: help
---

Anyone used/using Algolia with Rails?

I need to set the name of my index dynamically based on an association in my model.

Example:

-> Indexing an article
-> Article _belongs to_ Publication named `dev`
-> Index name should be set to `dev`
-> The new article gets added to the `dev` index

Any help, guys?
Starting my remote journey
Tags: discuss
Published: 2019-06-04 12:13:11

After over 10 years of office working, early mornings, and long commutes ( 2+ hours daily) I'm ready to transition to remote work.  Also it seems that any time I look for work some employers are hesitant to hire due to where I live.  

Honestly though I'm far more productive at home than in an office environment I like peace and quiet, with co-workers such a thing can't exist without headphones lol.  

My goal is to obtain a job working from home, people who work remotely make it seem you're lonely and miss out on things.  Personally I think it depends on the person I'm quiet and stick to myself.  I've have a few start up business, so for me discipline is easy. :-)

First step is finding remote job-site listings.  Will keep you posted!
What do dev.to-ers call themselves collectively?
Tags: discuss, meta
Published: 2019-06-04 11:33:08

By collectivity, I don't mean by our trade i.e. developers, but as in the people who use this site.

- `dev.to-er` (as in _dev two-ers_)
- `The dev community`
- `dev-ers`
- `People what frequent the dev.to`

I'm in the `dev.to-er` camp :D
SOLVED:Modules not found on django migrations
Tags: help, django
Published: 2019-06-04 11:32:10

I was making migrations on my django project when I encountered 2 modules not found; crispy_forms & storages.

My pip list is :
<pre>
Package             Version
------------------- --------
boto3               1.9.159
botocore            1.12.159
certifi             2019.3.9
chardet             3.0.4
dj-database-url     0.5.0
Django              2.2.1
django-crispy-forms 1.7.2
django-heroku       0.3.1
django-storages     1.7.1
docutils            0.14
gunicorn            19.9.0
idna                2.8
jmespath            0.9.4
Markdown            3.1.1
martor              1.4.0
Pillow              6.0.0
pip                 19.1.1
psycopg2            2.8.2
python-dateutil     2.8.0
pytz                2019.1
requests            2.22.0
s3transfer          0.2.0
setuptools          41.0.1
six                 1.12.0
sqlparse            0.3.0
urllib3             1.25.3
wheel               0.33.4
whitenoise          4.1.2
</pre>

and the installed apps on my settings are 

<pre>INSTALLED_APPS = [
     ....
    'crispy_forms',
    'storages',
]</pre>

When I try to migrate on heroku's bash I get:
<pre>
psycopg2.errors.DuplicateTable: relation "blog_about" already exists</pre>

Anyone familiar with this?

### Solution:
Re-installed crispy_forms at django storages
Algorithm Question By Google
Tags: challenge, algorithms, google
Published: 2019-06-04 11:27:20

**QUESTION**

We can determine how "out of order" an array A is by counting the number of inversions it has.

Two elements A[i] and A[j] form an inversion if A[i] > A[j] but i < j. 
That is, a smaller element appears after a larger element.

**CHALLENGE**

Given an array, count the number of inversions it has. Do this faster than O(N^2) time.

You may assume each element in the array is distinct.

For example, a sorted list has zero inversions. 
The array [2, 4, 1, 3, 5] has three inversions: (2, 1), (4, 1), and (4, 3). 
The array [5, 4, 3, 2, 1] has ten inversions: every distinct pair forms an inversion.
A business card in an NPM module.
Tags: npm, npx, node, javascript
Published: 2019-06-04 11:24:21

---
title: A business card in an NPM module.
published: true
description: I create a simple business card using a couple of libs to enhance the output on the terminal
tags: npm, npx, nodejs, javascript
cover_image: https://thepracticaldev.s3.amazonaws.com/i/85avmmytmks5p2h2pla3.png
---

I create a simple business card using a couple of libs to ~~fancy~~ enhance the output on the terminal.

You can just run this code on your terminal:

```bash
npx vicainelli
```

and then:
![](https://thepracticaldev.s3.amazonaws.com/i/134jk80eph4sbk249bd8.png)


---

Check out this project repository on GitHub: https://github.com/vicainelli/vicainelli/
How To Get Route Path Parameters In Non-Routed Angular Components 🦀
Tags: angular, frontend, rxjs, javascript
Published: 2019-06-04 10:06:22

---
title: How To Get Route Path Parameters In Non-Routed Angular Components 🦀
published: true
tags: angular,frontend,rxjs,javascript
canonical_url: https://medium.com/@tomastrajan/how-to-get-route-path-parameters-in-non-routed-angular-components-32fc90d9cb52
---


![](https://thepracticaldev.s3.amazonaws.com/i/4zmmiveitg3u8yyg4rja.jpg)

# In this article we’re going to explore…

* what are route path parameters
* how we can access route path parameters in a standard way
* what are the non-routed components
* why it is hard to access route path params in the non -routed components
* how to access them if we really need to
* other ways around the problem
* ⚡StackBlitz working example of the described concepts…

> Let’s go!


[Read more...](https://medium.com/@tomastrajan/how-to-get-route-path-parameters-in-non-routed-angular-components-32fc90d9cb52)
World First Transparent Admin Template Built With Vue.js
Tags: vue, javascript, admindashboard, webdev
Published: 2019-06-04 10:02:22

---
title: World First Transparent Admin Template Built With Vue.js
published: true
description: Since last few years Vue.js framework was gaining a huge amount of popularity and is currently one of a big three (Angular, React and Vue) front-end frameworks.
tags: vuejs, javascript, admindashboard, webdev
canonical_url: https://flatlogic.com/blog/world-first-transparent-admin-template-built-with-vue-js-announcing-light-blue-vue-js-full-version-release/ 
---
Since last few years Vue.js framework was gaining a huge amount of popularity and is currently one of a big three (Angular, React and Vue) front-end frameworks. There are already lots of vue templates available online and developers tend to use them when creating vue projects from scratch. However, we made our own research and found something interesting – there is still no [admin template] (https://flatlogic.com/admin-dashboards) with transparent widgets and non-standard background. So we decided to create one!

Please meet [Light Blue Vue.js admin template](https://flatlogic.com/admin-dashboards/light-blue-vue/demo)! It is built with latest Vue.js 2.5.2, vuex, vue-router and vue-bootstrap under the hood and contains dozens of pages and hundreds of components.

![vue.js admin dashboard](https://flatlogic.com/blog/wp-content/uploads/2019/04/Screen-Shot-2019-04-25-at-4.01.23-PM-1024x512.png)

###Key features:
- Tens of Pages
- White & Dark themes
- Fully Responsive
- Vue JS 2.5.2
- 8 Charts Library
- 2 Dashboards
- E-Commerce Section
- Fully Documented Codebase

###Why choose Vue.js framework?

Over the 2018 Vue.js framework became extremely popular because it is very adaptive and lightweight. 

If you are new to The Vue.js soon you will find out that the small size of this framework is actually one of the most important advantages. You will download it in no time plus this advantage has no influence on speed. In fact, it beats clunky Angular.js and React.js.

Vue.js has understandable structure, therefore, it is easy to add it to your project. It is a guarantee that in the end, you will have a scalable web application that would be very easy to maintain. 

Top performance of Vue.js in another great advantage of this framework. Vue.js implements Virtual DOM and that means fast rendering and minimal load time. Virtual DOM updates only the part of the DOM in-memory that you change. Other frameworks just re-render everything.

Even if this is not your first application extensive documentation of Vue.js will make the development process much easier for you. 

If you are going to use a template for an admin panel of your application, a comprehensive Light Blue documentation is here.

Good luck with your projects. Take away Light Blue Vue.js admin dashboard and make something awesome with it.

Check out [Light Blue Vue](https://flatlogic.com/admin-dashboards/light-blue-vue) Admin Template!

Originally published at https://flatlogic.com/blog/world-first-transparent-admin-template-built-with-vue-js-announcing-light-blue-vue-js-full-version-release/
You don't need to care about unsubscribing 
Tags: angular, rxjs, performance, fika
Published: 2019-06-04 09:44:10

**Problem:**
Not unsubscribing to observables can cause memory leaks. Unsubscribing is fairly straight forward but could easily be forgotten and cause a fair amount of boilerplate code.

**Solution:**
By using Angulars builtin `async` pipe, we don't need to subscribe or unsubscribe, it's handle automatically for us by the framework.

##Before / Untutored:
**Component**
```javascript
export class AppComponent implements OnInit, OnDestroy {

  recipe;
  componentDestroyed$: Subject<boolean> = new Subject();
  
  constructor(private recipesService: RecipesService) {  }

  ngOnInit() {
    this.recipesService.get().pipe(takeUntil(this.componentDestroyed$)).subscribe(data => this.recipe = data);
  }

  ngOnDestroy() {
    this.componentDestroyed$.next();
    this.componentDestroyed$.complete();
  }
}
```

**Template**
```javascript
{{ recipe }}
```


##After:
**Component**
```javascript
export class AppComponent implements OnInit {

  recipeWithAsyncPipe$;

  constructor(private recipesService: RecipesService) {  }

  ngOnInit() {
    this.recipeWithAsyncPipe$ = this.recipesService.get();
  }
}
```

**Template**
```javascript
{{ recipe$ | async }}
```

Try it yourself:
https://stackblitz.com/edit/thllbrg-angular-fika-4

Official docs:
https://angular.io/guide/observables-in-angular#async-pipe
What would you like to see implemented on DEV?
Tags: discuss, opensource, devteam, meta
Published: 2019-06-04 09:39:37

---
title: What would you like to see implemented on DEV?
published: true
description: What new features/changes/tweaks and anything else, would you like to see implemented on DEV?
tags: discuss, opensource, devteam, meta
---
_Disclaimer: I am **not** part of the DEV team_

Im constantly seeing Ben and other people on the DEV team opening new issues on GitHub to try and implement features from posts that the community has left. Let's centralise this discussion if possible.

**What new features/changes/tweaks and anything else, would you like to see implemented on DEV?**
Basic Soldering: an illustrated guide
Tags: electronics, hardware, beginners, soldering
Published: 2019-06-04 09:05:42

---
title: Basic Soldering: an illustrated guide
published: true
tags: electronics, hardware, beginners, soldering
series: Crash Course on Electronics
cover_image: https://heidislab.ams3.cdn.digitaloceanspaces.com/basic-electronics/cover_image_soldering.png
---

The breadboard is a good place to get started with basic electronics, but there will come a moment when you will *need* to use some basic soldering to get around - whether it's for assembling a kit, finishing a prototype or repairing a board / toy / gadget.

The good news is: soldering is not as difficult as it may seem. Good soldering requires practice, so the better way to learn is to get your way around the soldering iron and build something. I definitely recommend buying a kit with lots of LEDs to have enough room for practicing! That is how I learned how to solder.

## Soldering 101 - an Illustrated Guide

The following step-by-step guide demonstrates the very basics of soldering:

![Soldering Step by Step](https://heidislab.ams3.cdn.digitaloceanspaces.com/basic-electronics/step_by_step.png)

1. Don't be afraid of the soldering iron, but be very careful as it can get **really** hot.
2. Use a bit of solder to "test" the iron. When it melts, it's hot enought to get started. Leave a tiny bit of solder at the tip of the iron, this will help.
3. Heat the surface of the hole where you're going to apply the solder for a few seconds.
4. Touch the tip of the iron with the tip of the solder. The solder will "run" and fill the area surrounding the hole.
5. The finished work should resemble a little "volcano".
6. You can now cut the remaining of the lead / wire.

Another proTip: when it comes to how much solder to use, less is more! Use just enough to *fuse* the lead / wire into the hole. Using too much solder will create blobs that either don't adhere well to the board or just interfere with other components that are placed nearby.

Now let's see all that in action. The following video shows a simple example of basic soldering with a single LED on a prototyping board:

{% youtube d0G4rGd37RY %}

Next, let's see a more real-life example. In the following video, I'm soldering a row of RGB LEDs on an Arduino shield. This is a common scenario when soldering kits: tight space an loads of components to assemble and solder. Great for practicing!

{% youtube 0RWUuWf6RBo %}

## Additional Resources

If you'd like to learn more about soldering techniques and equipment, I highly recommend checking this [Adafruit guide to excellent soldering](https://learn.adafruit.com/adafruit-guide-excellent-soldering?view=all). 

They have a great section explaining about [common soldering problems](https://learn.adafruit.com/adafruit-guide-excellent-soldering?view=all#common-problems), like cold soldering joints and bridges.


## Coming Up Next

Now that we got soldering out of our way, it's time to move to more interesting things. In the next tutorial on this series, we'll start playing with LEDs on Arduino. See you next week!
(NodeJS + Express + Multer) Any suggestions of how can i serve user uploaded files?
Tags: needhelp, fileupload
Published: 2019-06-04 09:02:47

---
title: (NodeJS + Express + Multer) Any suggestions of how can i serve user uploaded files?
published: true
description:
tags: #needhelp #fileupload
---
 Hi!, i'm building a Web App where a user can upload pictures. For the task of receiving the binary files i'm using Multer.
So... Multer stores the pictures in the filesystem by default without the file extension. I'm storing the file data (original name, mimetype, extension, path, ...) in the database. 

How should i serve those files to the user?
Should i use a route, that gets the image data (extension, mimetype, ...) and then sends the file with the right mime type?
Or should i use the express.static("path/to/folder")?