teleren/devto huggingface dataset:
A Guide for Upgrading macOS to Catalina and Migrating the Default Shell from Bash to Zsh
Tags: macos, catalina, zsh, bash
Published: 2019-10-10 09:29:14

---
title: A Guide for Upgrading macOS to Catalina and Migrating the Default Shell from Bash to Zsh
published: true
description: A Guide for Upgrading macOS to Catalina and Migrating the Default Shell from Bash to Zsh.
tags: macos,catalina,zsh,bash
---

## Index

- From Bash to Zsh
- Configure Zsh
  - Minimal Configuration
  - Enable Git Completion
  - Define Aliases
- Prettify the Console with Starship 🚀

## From Bash to Zsh

After upgrading macOS to Catalina (lol), the command below changes the default shell to zsh:

```
$ chsh -s /bin/zsh
```

That's it!

## Configure Zsh

### Minimal Configuration

To configure zsh, just populate `~/.zshrc` like this:

```zsh
# enable the default zsh completions!
autoload -Uz compinit && compinit
```

### Enable Git Completion

To enable git completion, try commands below:

```
# make the `.zsh` directory
$ mkdir -p ~/.zsh
$ cd ~/.zsh

# download the scripts for completion
$ curl -o git-completion.bash https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash
$ curl -o _git https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.zsh
```

After that, we can load the scripts in the `~/.zshrc`:

```zsh
zstyle ':completion:*:*:git:*' script ~/.zsh/git-completion.bash
fpath=(~/.zsh $fpath)
```

Finally, remove the cache:

```
$ rm ~/.zcompdump
```

### Define Aliases

My favorite and minimal aliases are:

```zsh
alias ..='cd ..'
alias ...='cd ../..'
alias ls='ls -GwF'
alias ll='ls -alh'
```

Yes `ll` is not defined when using zsh.

And if we use [VSCode](https://code.visualstudio.com), we can edit `~/.zshrc` by running the command `zshrc`:

```zsh
alias zshrc='code ~/.zshrc'
```

In the same way, to edit `~/.gitconfig` by the command `gitconfig`, add the line below in the `~/.zshrc`:

```zsh
alias gitconfig='code ~/.gitconfig'
```

## Prettify the Console with Starship 🚀

Do you know [starship](https://github.com/starship/starship)?

TLDR, see my pretty console :)

![my pretty console image](https://thepracticaldev.s3.amazonaws.com/i/4shhf0liyw00d9cwg958.png)

I love this console! lol

### Installation

```
$ brew install starship
```

And add the init script to the end of `~/.zshrc`:

```zsh
eval "$(starship init zsh)"
```

### Configuration

For full information, please see [the documentation](https://starship.rs/config).

My minimal configuration as a TypeScript developer, a cat lover and a basketball enthusiast is:

```toml
# in `~/.config/starship.toml`

[character]
symbol = "🐈💕"

[directory]
fish_style_pwd_dir_length = 10

[git_branch]
symbol = "🏀 "

[nodejs]
symbol = "⚡ "

[package]
symbol = "🎉 "
```

| symbol | why or what |
| --- | --- |
| 🐈💕 | just so cute - nyaaan in Japanese / meow in English |
| 🏀 master | git branch |
| ⚡ v12.11.1 | nodejs version |
| 🎉 v6.6.0 | package version |

## Conclusion

No console, no developers :)
Duplicating elements with the Node.cloneNode() method
Tags: html, javascript
Published: 2019-10-10 09:28:53

In one of the projects I'm working on, i needed to have new elements containing a lot of elements. I had already created one element and styled it. But i needed the content to be dynamically updated from a `.json` file. <br>

So, I thought of a way to duplicate that element and give each its own unique content. Using the `Node.cloneNode()` method.

It's pretty straight foward

First, you declare and assign your node, the element you want to clone

 `var node = document.querySelector("#element");`

Declare your clone 

`var clone = node.cloneNode(`*[deep]*`)`

You can set the *[deep]* to be `true` if you want to copy the children of the node

Set to `false` if you don't

Now, you can append it into your DOM
 `document.getElementById("#papa").appendChild(clone);`

> Enjoy! 😁

These sites explain it way better!

https://www.w3schools.com/jsref/met_node_clonenode.asp
https://developer.mozilla.org/en-US/docs/Web/API/Node/cloneNode

> By the way, this is my first post, I apologize for it's awkwardness 🙂
Trigger a Job with Email in Jenkins
Tags: jenkins, email, devops, cicd
Published: 2019-10-10 08:50:02

In this article we are going to see, how to trigger a Jenkins job with Email. We will be using Jenkins Poll Mailbox Trigger Plugin for this purpose.

Goto Manage Jenkins, in your Jenkins instance and install this plugin. 

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/ibgkakteqd889xpp5fqp.png)

Now, create a freestyle job and in the configuration add below in "Poll Mailbox Trigger" settings:
host: imap.gmail.com
UserID: < enter your gmail userid >
Password:< enter your gmail password >
Advanced Email Properties: subjectContains=Trigger_Job_Demo
Schedule: H/1 * * * *
Attachments: Ignore

So, it will check email account for unread emails in every one minute and if any email with subject "Trigger_Job_Demo" is found it will trigger the job.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/5suyczogu96xcfn7bvm5.png)

To test this, send an email from your account with given subject. And, the job at Jenkins will be executed.

Read more here: https://github.com/jenkinsci/poll-mailbox-trigger-plugin
Git & Github basic tutorial
Tags: git, github, javascript, beginners
Published: 2019-10-10 08:36:09


Git is an essential tool for every programmer, and this is why we want to show you how to use it, in a simple way. This video will cover the primary usage of Git and GitHub, creating a new repository, a few simple commands, and git GUIs. Let's watch it!

{% youtube 70e58se9lHk %}
Speed up your website in 1 minute with Instant.page
Tags: webdev, performance, javascript
Published: 2019-10-10 08:32:05

Behind this clickbait title lies a really nifty little tool. I stumbled upon this while browsing Hacker News a while back. Actually it's been active on this website [since february](https://github.com/fbnlsr/primative.net/commit/d862953f35a2ae0992ed11bd8c294bf8d7658a91) now but I never took to time talk about it. **Instant.page** is a tiny Javascript library which is using *just-in-time preloading* – it preloads an anchor right before a user clicks on a hyperlink.

The technique used if fairly simple: **Instant.page** calculates the time a user spends hovering a link (which is an obvious behavior when you want to click on something) and will start preloadind said link if that time exceeds 65ms. Since [the average human perceives actions taking less than 100ms as instantaneous](https://www.nngroup.com/articles/response-times-3-important-limits/), **Instant.page** tricks the brain, hence allowing your users to get a faster, better experience.

The installation is fairly simple, just insert the `<script>` tag containing the link to the script right before the closing `</body>` of your website (which is where all your scripts should reside anyways), and you're all set! **Instant.page** will glue itself automatically to each link on the page. The library is small, a mere 1kB. It's free and open source (MIT).

**Instant.page** allows you to control what content should be preloaded or not. You might want to prevent it from preloading some anchors, like logout links for instance. To do that, simply add a `data-no-instant` attribute to said links and **Instant.page** will ignore them. You can even specify that you want to allow preloading for external links.

Simple, light and easy. If you want to try it yourself, check out **Instant.page** here: [https://instant.page](https://instant.page/)
Creating multiple steps in BitBucket Pipelines
Tags: bitbucket, cicd, pipeline, maven
Published: 2019-10-10 07:31:47

This is the continuation of my previous article "BitBucket CI/CD Pipelines"  https://dev.to/raghwendrasonu/bitbucket-ci-cd-pipelines-399e.

In BitBucket Pipelines, we can also have multiple steps.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/xks34v424hioph4ml6q2.png)

Edit your bitbucket-pipelines.yml file with multiple steps as below:

image: maven:3.3.9
pipelines:
  default:
    - step:
        name: Maven Clean Build
        caches:
          - maven
        script:
          - mvn -B clean
    - step:
        name: Maven Compile Build
        caches:
          - maven
        script:
          - mvn -B compile
    - step:
        name: Maven Package Build
        caches:
          - maven
        script:
          - mvn -B package

So, as you see i have 3 different steps now. First step is Clean then Compile and finally Package. Once done, push the code to BitBucket and enable pipeline.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/16zjfx7hb264bd1fmd9t.png)

After that, you will see repo getting automatically built and result of each step will be displayed.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/fzb2namvj4kgwam6ad6h.png)

BitBucket link for the Repo: https://bitbucket.org/raghwendrasonu/obfuscation_implementation/
Adding TTS to the Twitch Shoutout Bot [Live Coding Recap]
Tags: python, twitch, streaming, beginners
Published: 2019-10-10 07:54:03


## Streamed: 10/9 on Twitch

**🚨 Streamer tool upgrade!** During this live coding session, we added TTS functionality to the Twitch Shoutout Bot!

⭐ **Star** ⇒ [Project Repository](http://bit.ly/twitchsob)
💜 **Follow** ⇒ on [Twitch](http://bit.ly/nb9kTwitch) and [GitHub](https://github.com/NinjaBunny9000)
🔴 **Watch** ⇒ [Twitch VOD](https://www.twitch.tv/videos/492548255) (replay)


**Topic(s):** Creating a single-purpose bot for shouting out Twitch team members and subscribers in chat
**Language(s):** [Python](http://bit.ly/nb9kPython), Javascript
**Tech, Lib(s):** [VSCode](http://bit.ly/vscodenb9k), [TwitchIO](https://github.com/TwitchIO/TwitchIO), websockets (SocketIO)

## During the stream we...
✔ decided on an audio library to use (pygame) 
✔ built out a little classymajig to play the audio
✔ added a method to the class to play tts
✔ debated endlessly on how to play mp3s from api calls w/python
✔ forgot to hide chrome while coding (hawwwkkwarrrd 🙄)
✔ got some help from [jigo](https://www.twitch.tv/jigokuniku) ♥ tyyyyy
✔ tried using a diff library (cuz ofc)
✔ diff library was a bad choice 😬
✔ learned how eyebrows work 🤪
✔ struggled w/ pygame holding on to files after it plays it, blocking subsequent tts calls
✔ resolved the bug and discovered a "technique" called "double-buffering"
✔ GOT TTS TO PLAY! implemented the function into event logic 😎
✔ cleaned up the code a bit and made commits to dev
✔ fed some sheep b4 we raided [al sweigart](https://www.twitch.tv/alsweigart) :3
✔ accidentally hit the raid button too soon... 😏

## In the next stream...

We'll tie up any loose ends and make sure everything is documented and easy to deploy... then start planning our next project!
Best programming languages of 2019 for web development 
Tags: webdev, javascript, react, angular
Published: 2019-10-10 07:52:16

Every different project has a different use of programming language, meanwhile, it’s all up to the developer that which kind of programming language he/she uses for his/her project as well as it is not also compulsory to use one language to all the project.

If we talk about web development, it is divided into two parts first the front-end and the second one is back-end. The front end is everything you use and interacts with and back-end is data management.

Meanwhile, JavaScript is the most easier platform to build a website as well as one more programming language which is React-Native-Web, but this language is not used by everyone as people know less about it and this language is also easy to run.

JavaScript has three main frameworks:
1. React
2. Vue.js
3. Angular

There are some more best as well as useful programming languages that are given below:

Programming languages:

R language
SQL


apart from this, there are different types of project that are list below:

Mobile apps
Machine language, AI and big data analytics
Back-end software development

to know about their popular language of 2019- https://codersera.com/blog/best-programming-languages-for-2019/
Everything Under One Roof
Tags: coupons, discount, webs, design
Published: 2019-10-10 07:50:24

Coupons are a developing business part, existing because of the rise of internet shopping. A fast pursuit of Google will list a great many outcomes for existing coupon destinations. Originating from the better costs accessible on the web, the dealmecoupon business offers clients further decreases when purchasing items on the web. There's plenty of coupon locales that exists and whether you're in Asia, America or in Europe, it doesn't make a difference. Online coupons are accessible to anybody. Also, that is a standout amongst the most prominent advantages of shopping on the web. For more details click here: https://www.dealmecoupon.com/
DropboxAuthError: Error getting request token. Is your app key and secret correctly set? Server returned 400: Bad Request
Tags: paperclipdropbox, rails, carrierwave
Published: 2019-10-10 07:21:24

rake aborted! DropboxAuthError: Error getting request token. Is your app key and secret correctly set? Server returned 400: Bad Request.

/home/test/.rvm/gems/ruby-2.3.1/gems/dropbox-sdk-1.6.5/lib/dropbox_sdk.rb:277:in get_token'

/home/test/.rvm/gems/ruby-2.3.1/gems/dropbox-sdk-1.6.5/lib/dropbox_sdk.rb:293:inget_request_token'

/home/tesr/.rvm/gems/ruby-2.3.1/gems/dropbox-sdk-1.6.5/lib/dropbox_sdk.rb:299:in get_authorize_url'

/home/test/.rvm/gems/ruby-2.3.1/gems/paperclip-dropbox-1.3.2/lib/paperclip/dropbox/rake.rb:11:inauthorize'

/home/test/.rvm/gems/ruby-2.3.1/gems/paperclip-dropbox-1.3.2/lib/paperclip/dropbox/tasks.rake:11:in block (2 levels) in '

/home/test/.rvm/gems/ruby-2.3.1/gems/rake-12.3.3/exe/rake:27:in'

/home/test/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in eval'

/home/test/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in'

Tasks: TOP => dropbox:authorize
BitBucket CI/CD Pipelines
Tags: bitbucket, cicd, pipelines, git
Published: 2019-10-10 07:09:59

This feature in BitBucket allows build to get triggered on each code push. The build will execute on Docker engine so we need to create a build configuration yml file with name bitbucket-pipelines.yml . In the configuration file we will mention which image to use and different commands to build the repository.
Here is our BitBucker repo, you can use this for practicing this concept: https://bitbucket.org/raghwendrasonu/rest-assured_cucumber_project/

Goto pipeline section in BitBucket and select the Template you want to use to build your repository. In my case i am going to choose Java with Maven. Once you select that BitBucket will show default template. 

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/l93jnzen89qcg3xbbxrt.png)

Copy the contents and create a new file in your project with name bitbucket-pipelines.yml. 

image: maven:3.6.1
pipelines:
  default:
    - step:
        caches:
          - maven
        script:
          - mvn -B clean install

Paste contents in this file and modify the script as your your need.
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/qyzhv83syz64l2gy2cqq.png)

Once done, push the code, and you will see build is triggered automatically. Test will run and results will be displayed.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/i9drohu0246vg2hf05gj.png)

I hope this was informative.
Flexible Gatsby Starter
Tags: showdev, javascript, gatsby
Published: 2019-10-09 10:35:48

<p align="center">
  <a href="https://www.gatsbyjs.org">
    <img alt="Gatsby" src="https://www.gatsbyjs.org/monogram.svg" width="60" />
  </a>
</p>
<h1 align="center">
  Flexible Gatsby
</h1>

A simple and clean Gatsby starter for your blog. [Demo](https://flexible-gatsby.netlify.com/).

Inspired by [flexible-jekyll](https://github.com/artemsheludko/flexible-jekyll).

## Screenshots

![screenshot](https://thepracticaldev.s3.amazonaws.com/i/6jc6tklv1eo1irukbw7d.jpg)

![home-page-screenshot](https://thepracticaldev.s3.amazonaws.com/i/2kiwp0x3znec7y5x5za7.jpg)

![blog-page-screenshot](https://thepracticaldev.s3.amazonaws.com/i/uizb52tk7chrbclan00r.jpg)

## Quick Start 🚀

1.  **Create a Gatsby site.**

    Use the Gatsby CLI to create a new site, specifying the default starter.

    ```sh
    # create a new Gatsby site using the flexible-gatsby starter
    gatsby new my-blog https://github.com/wangonya/flexible-gatsby
    ```

2.  **Start developing.**

    Navigate into your new site’s directory and start it up.

    ```sh
    cd my-blog/
    gatsby develop
    ```

3.  **Open the source code and start editing!**

    Your site is now running at `http://localhost:8000`!

    _Note: You'll also see a second link: _`http://localhost:8000/___graphql`_. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the [Gatsby tutorial](https://www.gatsbyjs.org/tutorial/part-five/#introducing-graphiql)._

    Edit `gatsby.config.js` to update site metadata.

    Add blog posts in markdown in `content/blog`. Example blog posts have been provided.
Jenkins Multibranch Pipeline
Tags: jenkins, pipeline, cicd, devops
Published: 2019-10-10 06:38:55

This will automatically trigger job execution for every branch, you have for your project repository. This solves the problem of creating new build for every new branch we create on the fly. 
Multibranch Pipeline is a plugin in Jenkins. In this article we will see how to create multibranch pipeline. Ensure that Pipeline: Multibranch plugin is installed in Your Jenkins instance. 
Once the plugin is available in Jenkins, We are going to create a multibranch pipeline job in Jenkins.
As you see my project at GitHub is having two branches: https://github.com/sonucogni/Jenkins_Pipeline_Demo/
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/grnvga8enuchqcdzm607.png)

I will create a Multibranch Jenkins job with configuration as shown in below image.
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/yovy12kbf3o1o9dvfdza.png)

Also, ensure that you have created Jenkinsfile as this is a pipeline job. You can read about Jenkinsfile creation here: https://dev.to/raghwendrasonu/create-jenkins-pipeline-with-an-example-3p7j

Once done, save the job configuration and build. Jenkins will automatically scan for all the branches and will execute job for all the branches. 
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/7erpfzh3c6ysvxbl3zuk.png)

I hope this was helpful.
How do you list social media links on a website without using icons?
Tags: discuss
Published: 2019-10-10 06:24:27

I know the easiest way to list social media links is to use icons representing the respective platforms, but have you tried doing it without icons or seen it in the wild? Something more than just a plain list like :

- [Twitter](#)
- [Dev.to](#)
- [Github](#)

I'm looking for styling inspiration.
A SwiftUI CollectionView (with proper custom layouts)
Tags: swiftui, swift, ios
Published: 2019-10-10 05:58:38

We've been working with SwiftUI lately and worked some generics magic to implement a SwiftUI CollectionView (with UICollectionView underlying it).

Check it out at https://github.com/apptekstudios/ASCollectionView

Any ideas for changes in the API or other improvements are very welcome in the issues tab :)


![Example 1](https://thepracticaldev.s3.amazonaws.com/i/wr5cxquxs2evobxj4x79.PNG)
![Example 2](https://thepracticaldev.s3.amazonaws.com/i/eln839agducq7aorofmi.PNG)
How to Transfer MySQL Databases

Tags: mysql, database, migration, mariadb
Published: 2019-10-10 05:47:25

There is often a need to migrate MySQL databases - be it to transfer the data to a testing server or to completely migrate the entire database to a new production server. dbForge Studio for MySQL provides robust database migration capabilities, as most popular MySQL-compatible cloud databases, storage and search engines are supported - including MariaDB, AmazonRDS, Amazon Aurora etc.
Databases can be transferred either within the same instance or between different instances, and there are three ways in which you can approach this:

* Copy MySQL Database
* Backup and Restore MySQL Database
* Import/Export

Learn more at https://www.devart.com/dbforge/mysql/studio/migrate-database.html
Trigger a Jenkins build whenever there is a code push in GitHub
Tags: jenkins, webhooks, cicd, github
Published: 2019-10-10 04:48:13

For this we need to use, Github WebHooks. Webhook is an HTTP callback, an HTTP POST call that occurs when something happens through event-notification via HTTP POST. GitHub webhooks in Jenkins are used to trigger the build whenever something is committed to the branch.
For this we need to configure both at GitHub and Jenkins. We will be creating a webhook from GitHub and later use that in Jenkins Job. So, let us first do the configurations at GitHub.
Go to your project repository -> Settings -> webhooks -> Add webhooks.
Enter Payload URL as Jenkins URL where Jenkins instance is running. In my case jenkins is running at : https://626b9g85.ngrok.io

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/yytg8yz7rbxrq3j2exmq.png)

Here is one problem you have to take care,if you are running Jenkins on localhost then https://localhost:8080/github-webhook/ will not work because Webhooks can only work when they are exposed to the internet.

That's the configuration at GitHub, Now let’s see how to use this webhook in Jenkins. Goto your job configuration in Jenkins, and check "GitHub hook trigger for GITScm polling" option.
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/gbhouhybhrbm1c0ixuzh.png)

In this way, we can add a webhook to our job and ensure that everytime a developer commits a code to GitHub, our build will be triggered.

I Hope this article was useful to you. You can use my GitHub repository for practicing this. Here is the link: https://github.com/sonucogni/Jenkins_Pipeline_Demo
My #HACKTOBERFEST PRs got reviewed 😄
Tags: hacktoberfest, github, opensource
Published: 2019-10-10 04:47:35

Yay Malaika you did it! Finally my PRs got reviewed and I completed #Hacktoberfest 😄✨🙏 #github  ![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/6hkjowjecy8w9cy7qynq.png)
FireDI Migration Started
Tags: firedi, php, showdev
Published: 2019-10-10 04:49:32

---
title: FireDI Migration Started
published: true
date: 2019-10-10 04:36:25 UTC
tags: firedi,php,showdev
canonical_url: https://ua1.us/updates/firedi/firedi-migration-started/
---

As [announced earlier this week](/updates/firedi/moving-ulfberht-to-ua1-labs-and-renaming-it-to-firedi/), Ulfberht (a dependency injection container written for PHP) has started to migrate to UA1 Labs. So far, we have moved the repo from my personal GitHub account to UA1 Labs and started the refactor/rebranding we are doing to fit it into our vision for our Fire suite of development tools.

Our very first pull request for FireDI is starting the refactoring. [https://github.com/ua1-labs/firedi/pull/2](https://github.com/ua1-labs/firedi/pull/2). I wanted to throw this PR out there just in case there were others who wanted to review what we are doing. Please feel free to comment on the PR!

Also note that we have started a project page for FireDI. We will be posting more about how to use it, API reference, etc, there at the project page. That project page can be found [https://ua1.us/projects/firedi/](https://ua1.us/projects/firedi/)

The post [FireDI Migration Started](https://ua1.us/updates/firedi/firedi-migration-started/) appeared first on [UA1 Labs](https://ua1.us).
Looking for honest feedback for my first portfolio 🙏
Tags: career, help, review, showdev
Published: 2019-10-10 04:04:02

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/ousb9r7qx0iv4r6oqo2f.jpeg)


First I would appreciate that you clicked on my post 😀 I just finished my portfolio website. It made with the middleman and GitHub pages.

I’d love your criticism, suggestions, and etc so please have a play around with it!✨

Here's the link:
https://jun-low.com/

Thank you in advance!!