teleren/devto huggingface dataset:
KDE Plasma & ssh keys
Tags: kde, plasma, sshagent, wallet
Published: 2020-10-02 19:58:05

---
title: KDE Plasma & ssh keys
published: true
date: 2020-01-03 01:34:00 UTC
tags: KDE,plasma,sshAgent,wallet
canonical_url: 
---

If you're a Linux user, and the desktop environment of your choice is Gnome, you're probably used to letting [Gnome Keyring SSH Agent](https://wiki.gnome.org/Projects/GnomeKeyring/Ssh) handle your ssh keys. You just log in, your ssh keys stored in your _~/.ssh_ folder get loaded in memory, and then you can use them not only in terminals but with any process that requires ssh authentication.  
  
Unfortunately, [KDE Plasma](https://kde.org/plasma-desktop) doesn't have that feature out of the box, so it needs a bit of tweaking to get the same behaviour.  
  
Let's make some changes to [Kwallet](https://userbase.kde.org/KDE_Wallet_Manager) and add some scripts to start our ssh-agent and load our keys:  
  
  
**Kwallet**  
Launch KDE Wallet Configuration and make sure the KDE wallet subsystem is enabled.

[![](https://1.bp.blogspot.com/-Zo24StIt_xA/Xg6X0wi8XwI/AAAAAAAAHkg/TFw0qM6nyFMrdiNnevnXOjpp1ZKXbgZwgCLcBGAsYHQ/s640/Screenshot_20200102_202440.png)](https://1.bp.blogspot.com/-Zo24StIt_xA/Xg6X0wi8XwI/AAAAAAAAHkg/TFw0qM6nyFMrdiNnevnXOjpp1ZKXbgZwgCLcBGAsYHQ/s1600/Screenshot_20200102_202440.png)
Launch Kwallet Manager and create a new wallet if necessary and set a passphrase for it.  
  
  
**Scripts**  
Now we need to create some scripts to start the ssh-agent on startup and add all the keys. For this, it's necessary to have the package [ksshaskpass](https://github.com/KDE/ksshaskpass) installed.  
  
KDE has a designated folder for scripts that will be executed at login but before launching Plasma.  
  
Folder: _~/.config/plasma-workspace/env_  
  
In this folder, we need to create a script to start the ssh-agent. Let's call it _ssh-agent-startup.sh_.  
  

```
#!/bin/bash

[ -z "$SSH_AGENT_PID" ] || eval "$(ssh-agent -s)"

```
  
Also, KDE uses another folder for scripts at login.  
  
Folder: _~/.config/autostart-scripts_  
  
Let's add a script to load all our ssh keys. We'll call our script _ssh-add.sh_.  
  

```
#!/bin/bash

export SSH_ASKPASS=/usr/bin/ksshaskpass

ssh-add $HOME/.ssh/my_ssh_key1 $HOME/.ssh/my_ssh_key2 $HOME/.ssh/my_ssh_key3...

```
  
Don't forget to mark the scripts as executables:  
  

```
chmod u+x file/to/mark/as/executable

```
  
And that's it. After rebooting, the system will prompt you to enter your keys' passphrases, and if everything went well, you should be able to use your keys with any process that needs ssh authentication.
Go Dark mode with CSS Filter
Tags: html, css, codenewbie, adventofcode
Published: 2020-01-03 01:30:35

There are a plethora of plugins to use and JS to write to achieve dark mode on your website. A straightforward and single-layered way of doing this is by adding the CSS rule filter:(invert). An example is below.

``` html 
<section> This is some text. </section>

<a href = "#'> a Link </a>
```

```css
html { 
       background: black;
       filter: invert(1); /* This will flip the contents on the page, from black to its inverted color*/
}

a {
    color: green; /* This will render as a light pink or purple*/
}

```

To have the link render as green, add the hue-rotate()function to the filter property.

```css

html { 
       background: black;
       filter: invert(1) hue-rotate(180deg); /* This will flip the color back to its original value.*/
}
```

Inspiration for this post is by Dev Ed on YT https://www.youtube.com/watch?v=CxC925yUxSI&feature=youtu.be
Timestamp: 17:29

Happy Coding! &#128522;
Data Scientist Roles and Responsibilities(My Opinion)
Tags: beginners, tutorial, career
Published: 2020-01-03 01:30:04

There is a difference in Data Engineer, Data Analysist and Data Scientist. If you want to become a Data Scientist the main moto is to think, learn and analyze globally with your <b>Neuron</b>.It is possible when you work on as many various datasets as you can. ![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/7mctydast4zkeozz8jpf.jpg)<b>Focus Of Role</b><li>Create Hypothesis: </li><li>Test</li><li>Analyse</li><li>Translate Using Clean Data</li><p>In order to get a job in an industry as a data scientist position, the following skills are needed.</p><li>Dealing with various data operations.</li> <li>Involved with several data underlying procedures.</li><li>Can able to handle Structure and Unstructured Data</li><li>possesses knowledge of mathematics, statistics, and machine learning algorithms</li><li>Proficient in Python, R, SAS, Matlab, Hadoop and Spark</li>![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/2aeog15bhfjx9qtx10e1.jpg)
Finding a job in 2021
Tags: career
Published: 2020-01-03 01:07:15

Tips for finding a new job in 2021.

One of the best resources for finding a job is LinkedIn. The reason is that recruiters live there. 

They post openings daily, and if you hang out there daily; you will make plenty of contacts. 

Present your best profile and continually improve it. Flip the 'Available and Looking' switch on, and wait for the calls to arrive.

1) Treat your job hunt as a full time job. Seriously, work 8 or 9 hours a day.

2) Take as many interviews as you can. This teaches you how to interview, what the current industry hot skill sets are, and also; it allows you to see different company cultures, some of which you'll like and some of which you won't.

3) From the interviews and posted job openings, learn the most in demand skills you found from interviewing. Pick just one to improve on and start studying.

4) *Never allow rejection to affect who you are*. Just chalk it up as a lack of skill. 

You can always learn new things. Allow the rejection to be your motivator.

5) Practice coding skills daily.

6) *Continually* improve your resume. Resumes are like programs, they are never done.

7) *Never sell yourself short*. As far as you know, you are the best and only person a company can find. 

One last tip... make sure all of your online profile pictures represent the business persona.

If you do these things you will get a great opportunity that you could have never planned or imagined.

What's the hottest things today?
Cloud, Cloud, Cloud.
What is a JWT?
Tags: jwt, javascript, rails, react
Published: 2020-01-03 01:03:27

# The JSON Web Token

JWT stands for JSON Web Token. If you are also wondering what JSON stands for it is: JavaScript Object Notation. Lastly if you are wondering if JWT has a pronunciation, it does, and it is pronounced "jit".

JWTs being tokens, unsurprisingly, use token-based authentication which is stateless. This means that no information about a logged in user is stored on the server. The client (browser) is doing the storing of the token. The client will send the token to any request that needs to be authenticated within the headers. The JWT is encoded, so when you are sending your user data with it, if it is intercepted by anyone shady it will be protected.

# JWT Auth Flow

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/lzhrko3j6l8uut86tkz1.png)
Photo Credit: Learn.co (https://i.stack.imgur.com/f2ZhM.png)

When a user signs in with a valid username and password (validated by the back end) the backend gives a signed token to the client. The client will store the token and it will be supplied in the headers to every request that needs authorization. Effectively, it is an access pass for the user that stores unique encoded identifiers and the unique signature from the backend. It proves the user is who they say they are.

# JWT Format

JWTs are a singular object of three concatenated strings separated by a . A sample JWT would look something like this: aaaaaaaaaaaaaaa.bbbbbbbbbbbbbbbbbbbbb.ccccccccccccccccccc

The first string (aaa...a) is the header which contains the algorithm used to encrypt it and the type of token which of course is JWT. The second string (bbb...b) is the payload which contains all the meat. It can contain what you want, but generally you'll include the user id and username etc. The third string (ccc...c) is the signature which contains a hash (encryption) of the header and the payload. It is hashed with a secret key that is provided by the developer.

If you are curious you can go to [jwt.io](https://jwt.io/#debugger) and try this for yourself!

# Environment Variables on Rails With Figaro Gem

The [Figaro](https://github.com/laserlemon/figaro#getting-started) Gem is a helpful Ruby Gem that allows the developer to user environment variables. Environment variables are simply key value pairs that can be called within your app. 

Upon installing the Figaro Gem it will create a file in your config folder called 'application.yml'. The 'application.yml' file will be in your '.gitignore'. This means that when you push your project to GitHub your 'application.yml' will not be visible. That way your secret key can not be seen by the public and you avoid a huge hole in your security.

Using the environment variables looks like this:
```ruby
# config/application.yml
my_secret_key: "b1g_s3cr3t"

# And to access the environment variable we use this syntax
ENV["my_secret_key"]
```

And that's all I am covering, thanks for reading and I hope you learned something!
How to Backup MySQL Database using mysqldump
Tags: backup, mysql, mysqldump
Published: 2020-01-03 00:19:54

## Backup MySQL Database using mysqldump

One of the most common ways to backup MySQL database is to use a command called “**mysqldump**“.

### Backing Up

The basic syntax of the command to backup mysql with mysqldump is:
``` 
mysqldump -u your_username -p database_to_backup > backup_file_name.sql 
```
### Restoring Dumped Data
To restore a database backup we created with mysqldump, we have to point the file into MySQL again.
First, log into MySQL by typing:
```
mysql -u your_username -p
```
Second, we need to create a blank database to restore the data into. The command below create a new database which will hold all of the data that will dumped and then exit out of the MySQL prompt:
```
CREATE DATABASE new_database_name;
exit
```
Next, we can restore the dump database file into the newly created database by using the command below:
```
mysql -u username -p database_name < backup_file_name.sql
```
You should have all your information restored to the database you’ve created.
[How to Reset MySql Root password on MacOS 10.13](https://anansewaa.com/how-to-reset-mysql-root-password-on-macos-10-13/)
The beginners guide to Kubernetes in Azure
Tags: kubernetes, azure, guide, tutorial
Published: 2020-01-03 00:11:19

If you know some basics about what containers and what they are, and you want to take the next step and expand that into a more robust cloud hosted solution, your research and go-to solution will eventually land on Kubernetes. It has become more or less the standard for containerized application hosting these days.

Kubernetes (or k8s as it is often shortened to) can at first look a bit intimidating but it only looks that way. It is actually quite easy to understand if you sit down and learn the basics. 

My preferred platform for running k8s clusters is Microsoft Azure since I already have around 10 years of experience with that environment from development, DevOps and architecture. K8s on the hand i've only worked with for about two years and it's been a road of trial and errors :) I was trying to learn k8s at the same time as Azure Kubernetes Services (AKS) was new, before it became GA and before you could do any customization to the hosting environment itself - kinda painful. 

What I missed when I started was a really good "AKS for dummies" guide. A little late for me now, but not long ago i found just that in the [Kubernetes Learning Path](https://azure.microsoft.com/mediahandler/files/resourcefiles/kubernetes-learning-path/Kubernetes%20Learning%20Path%20version%201.0.pdf) Microsoft published early 2019. 
![Kubernetes Learning Path](https://thepracticaldev.s3.amazonaws.com/i/qnxju6lzbu8pgzv7w82m.png)
In it, it's a really good link to a [youtube video guide](https://www.youtube.com/playlist?list=PLLasX02E8BPCrIhFrc_ZiINhbRkYMKdPT&fbclid=IwAR2o6qfj8yDR-EB4GCgPBbPG_rRnHQdhwmfxQOEc0q9F-FH_sA3VG9zqEeQ) that walk you through all the pieces of Kubernetes and how they work. I highly recommend it for anyone wanting to learn k8s even more if you plan to run your workload on Azure. 
![AKS youtube guide](https://thepracticaldev.s3.amazonaws.com/i/2sv4hkddzbjl7ldgs6fi.png)
changed github used for signup
Tags: help
Published: 2020-01-03 00:02:18

Hi There ,

I needed some help .

I signed up for DEV platform with github account.  I want to link to another github account which i have started using.  Is there any way to link the existing account on the DEV to the new github account.  

On searching in the settings, i didn't see any option for the same.  Let me know either case ! 

Thanks for the help !
AsyncStorage, localStorage & cookies
Tags: javascript, react, reactnative
Published: 2020-01-02 23:54:33

My first experience implementing authentication was in a full Rails app. For this project I learned how to issue cookies through Sessions. I was introduced to the 'bcrypt' gem and learned some of the basics around password management, encryption, hashing and salts. It seemed I had the learned the essentials to continue creating user-oriented Apps that require account validation. 

Soon after building my Rails app I built a React app with a Rails API backend. For this project I learned how to implement authentication combining 'bcrypt' and localStorage. The transition introduced me to more new concepts, such as Tokenization. I was curious why cookies were being phased out of many modern projects in favor of localStorage.

localStorage offers two major improvements:

1. localStorage allows for 5MB of client-side storage vs 4KB with a cookie.

2. localStorage does not travel with each HTTP request, unlike cookies. This seems to be the most important difference, as limiting the amount of data traveling back-and-forth to the server is very important when dealing with high volumes.

My most recent project, a React Native app with a Rails API backend, introduced me to a new type of client-side storage, AsyncStorage. AsyncStorage is very similar to localStorage, but built for React Native. It was built to integrate with both iOS and Android to utilize their storage management efficiently. 

My takeaway after utilizing cookies, localStorage & AsyncStorage is that localStorage and AsyncStorage are more efficient than cookies, but the most important quality of any authentication system is that sensitive data is well encrypted and handled with care. My research on the topic led me to many other options, such as Redux-persist, Realm & SQLite. Excited to implement one of those for a future project.
Kubernetes with OpenShift, data wrangling with Pandas – watch December 2019 online meetup recordings
Tags: meetup, webinar, ibmcloud, tutorial
Published: 2020-01-09 21:18:10

---
title: Kubernetes with OpenShift, data wrangling with Pandas – watch December 2019 online meetup recordings
published: true
description: Kubernetes with OpenShift, data wrangling with Pandas – watch December 2019 online meetup recordings
date: 2020-01-02 23:47:32 UTC
tags:  meetup, webinar, ibmcloud, tutorial
canonical_url: https://maxkatz.org/2020/01/02/kubernetes-with-openshift-data-wrangling-with-pandas-watch-december-2019-online-meetup-recordings/
---

[IBM Developer SF team](https://www.meetup.com/IBM-Developer-SF-Bay-Area-Meetup/) hosts weekly online meetups on various topics. [Online events are one of the best ways to scale](https://dev.to/ibmdeveloper/using-online-meetups-to-scale-your-developer-relations-program-17li) your Developer Relations program and reach developers anywhere, anytime and for a long time after the event.

The following online meetups we hosted in December 2019 with links to watch the recordings.  I also encourage you to join our [meetup](https://www.meetup.com/IBM-Developer-SF-Bay-Area-Meetup/) so you will always know when our online meetups are scheduled. Our meetups are hosted by the wonderful [Lisa Jung](https://twitter.com/LisaHJung)  👋.

**📹 Kubernetes with OpenShift (December 11 & 17, 2019)**

In this hands-on online meetup with [Dave Nugent](https://twitter.com/drnugent)developers learned:

- What is OpenShift, and how does it compare to and improve Kubernetes
- Provision an OpenShift cluster for you on IBM Cloud, so that you can complete two interactive workshops.
- Creating OpenShift projects
- Creating OpenShift Applications
- Managing OpenShift Applications

Watch two different recordings:

- December 11: [Watch the recording](https://www.crowdcast.io/e/kubernetes-workshop-with) 📺
- December 17: [Watch the recording](https://www.crowdcast.io/e/online-meetup-kubernetes) 📺

**📹 Data wrangling and exploration with Pandas (December 18, 2019)**

In this online meetup with [Upkar Lidder](https://twitter.com/lidderupk) developers introduced and analyzing data using Python, Pandas and Jupyter Notebooks. Developers also learned:

- How to obtain/read a data file using python in Watson Studio
- How to clean noise in data
- Selecting and querying data
- Reshaping and filtering data
- Grouping data into a hierarchy
- Simple graphing of data

[Watch the recording](https://www.crowdcast.io/e/data-wrangling-and) 📺
React Native
Published: 2020-01-02 23:32:30

Hey i am kest.  Just want to share my personal experience with react native.  I aint introducing anything.  What do i know? I just want to encourage you out there if you just started. Its not going to be easy but you need to continue learning... You need more than the "i just want to learn".  You need the desire and passion to react... 😆. So i was introduced to react by my siwes supervisor who hardly had time for me. But i really want to learn, hence my relentless effort.  Glory to God i am trying bit by bit.  You can too. 
Its interesting.  Its captivating and it joy unspeakable when you actually see the result of your work on that device, on that emulator.  So sweet. 
So dont stop please. 
Dont. 
Well, have you heard of npm...? 
Its gonna piss you off trust me.  But you need that piece to react.  Keep running npm no matter what! Its an advice from/for a senior dev, they say!
This is for my colleague; beginners.
Opening Multiple Files in Vim
Tags: vim, cli
Published: 2020-01-02 23:04:04

---
title: Opening Multiple Files in Vim
published: true
description: 
canonical_url: https://bphogan.com/2020/01/opening-multiple-files-in-vim/
tags: vim,CLI
---

I was working on my [Hugo book](https://pragprog.com/titles/bhhugo) and I was working through some modifications to some of the companion files. I wanted to view several files to ensure they had the content they needed. I do all my writing and other work in the Vim text editor, and I know I can open multiple files by specifying them on the command line, like this:

~~~
$ vim file1.md file2.md
~~~

I wanted to open up all the files in my project called `about.md`. Unfortunately, each file I needed to open was in a different location in the project. Specifying the path to each file would take a long time if I did it manually.

By combining the `find` command and `vim`, you can accomplish exactly what I was looking to do. Here's the command:

~~~
$ vim `find . -name about.md`
~~~

This opens all of the files, each in their own buffer. The backticks around the `find` command execute the command and then return the results to the `vim` command as a list of files. This is a concept called *command substitution*.

Issuing the command `:bn` moves to the next file.  (Think "buffer next").  And `:bp`, or "buffer previous", goes back to the previous file.  The `:ls` command in Vim shows all of the buffers.

Close all the files with `:qa`.  If you've accidentally changed one, discard changes and close all files with `:qa!`.

You could open each file in a new tab instead by adding the `-p` switch to the command:

~~~
$ vim -p `find . -name about.md`
~~~

The next time you need to open up multiple files across your project, you might find this approach handy.
Day 62 : 2019 Rap Up
Tags: hiphop, code, coding, lifelongdev
Published: 2020-01-02 22:50:44

_liner notes_:

- Professional : First day of 2020 back at work. Weird thing is that it still doesn't feel like work. haha I would be doing this anyway. Now I just get paid for it and have a focus for projects. haha. So yeah, more research and working on projects.

- Personal : Made a lot of progress on my current side project, at least until I got to the library. I got it hooked up to Firebase for hosting and Firestore database. That took awhile because there are some steps to make Sapper / Svelte work with Firebase. Thanks to some research and tweaking, got it working and a test site deployed. Came to the library downtown so I would be closer to the venue. Using my phone's hotspot to connect my laptop to the internet, I noticed I was getting errors when I wasn't on my home's WiFi. Looks like the scripts for Firebase and Firestore are taking a while to download of the hotspot's connection and it causes errors with my code that relies on them to get data from the backend. I think I saw a video from Firebase where they did some things to speed it up with hydration. Got to find that video again. Pretty sure it was during the Chrome Developer Summit.

![Looking down a waterfall in Kerepakupai Meru, Venezuela](https://thepracticaldev.s3.amazonaws.com/i/p1bgo3fkx6qga1apd99f.png)

Headed to my first meetup of 2020! It's a VueJS meetup at a coffee shop. Just some folks nerding out about Vue. I haven't built anything with it yet so I'm interested in seeing what others think about it and what they've built.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube HS3Mj2VbZRM %}
Setting up gated content, for members only, with Webflow and MemberStack.
Tags: nocode, visualdevelopment, showdev
Published: 2020-01-02 22:37:01

### Howdy!

I always love getting ideas in front of people fast to gauge a market. I've recently ventured into the whole No Code thing and have been screencasting what I'm learning along the way.

Just put out a new one and wanted to share:

####11 minute, step-by-step Video setting up gated content, for members only, with Webflow and MemberStack.

{% youtube PKs7EiLMJuY %}

Full post:

https://nocodequest.com/membership-website-on-webflow-with-memberstack/
Getting started with Domain Oriented Laravel
Tags: php, laravel
Published: 2020-01-02 22:35:39

A couple of days ago my colleague Brent published [a blogpost on Domain Oriented Laravel](https://stitcher.io/blog/laravel-beyond-crud-01-domain-oriented-laravel). In short, he makes the case for organising your code around business concepts or features. That might sound very "heavy" or daunting, but it's actually for easy to get started with. 

In this short video I explain how you can use PhpStorm to refactor your code. Make up your own mind if you need this in your projects.

{% youtube yPiMzw-lLF8 %}

If you want to know some more about how I like to structure my code, check out [my talk on controllers I gave at this year's Laracon US](https://freek.dev/1433-supercharging-common-controllers).