teleren/devto huggingface dataset:
Install Powerline for Powershell
Published: 2021-05-16 20:46:58

I always used **Powerline** in **Linux** but I didn't know it had an option for **Windows**, very nice :-)

Powerline provides a customized command prompt experience providing Git status color-coding and prompts.

# Set execution policy

```cmd
Get-ExecutionPolicy -List
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope LocalMachine
```

# Install **Chocolatey**

```cmd
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
```

# Install **Git** on **Windows**

```cmd
choco install git wget unzip code
```

# Install **Powerline** in **PowerShell**

## Using **PowerShell**, install **Posh-Git** and **Oh-My-Posh**:

```cmd
Install-Module posh-git -Scope CurrentUser
Install-Module oh-my-posh -Scope CurrentUser
```

## If you are using **PowerShell Core**, install **PSReadline**:

```cmd
Install-Module -Name PSReadLine -Scope CurrentUser -Force -SkipPublisherCheck
```

## In your **PowerShell** profile, add the following to the end of the file and Customize your PowerShell prompt:

```cmd
echo 'Import-Module posh-git
Import-Module oh-my-posh
Set-PoshPrompt -Theme paradox' > $PROFILE
```

**List of themes:** https://ohmyposh.dev/docs/themes/

**Powerline fonts:** https://github.com/powerline/fonts

```cmd
cd ${HOME}\Downloads\
wget -c https://github.com/powerline/fonts/archive/refs/heads/master.zip
unzip .\master.zip
Set-ExecutionPolicy Bypass -Scope Process -Force; powershell ${HOME}\Downloads\fonts-master\install.ps1
```

## Set **Ubuntu Mono derivative Powerline** as your font:

```json
{
    "colorScheme": "Solarized Dark",
    "commandline": "powershell.exe",
    "fontFace": "Ubuntu Mono derivative Powerline",
    "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
    "hidden": false,
    "name": "Windows PowerShell"
},
```

**Source:**
https://github.com/powerline/powerline

https://docs.microsoft.com/en-us/windows/terminal/tutorials/powerline-setup
Benefits of Starting a Career in a Small Company
Tags: career
Published: 2021-05-16 20:15:00

In September 2019, I was in the last months of my Bachelor's degree in Computer Engineering at the University of Campinas.


In Brazil, we make a final project that lasts for a whole semester supervised by a professor. At this time my supervisor offered me a job after getting my degree in December. She has a non-profit company that promotes robotics teaching and research, and they needed a new system to manage their organization that supports academic events.

 
The basic explanation is: Students subscribe to a competition, pay for their subscription, they're evaluated, earn certifications, are part of groups(to make their tasks), with mentors that must be part of schools or colleges, and there's the whole administration sector that is by far the hardest and most complex to implement.


In December when we talked more in-depth about the job, she told me that I would be the only developer, and that was my second job, the first that is not an internship(that was also in a small education tech company).


At first, it was pretty scary, because you need to know a lot to build a whole complex system from scratch, and I'm not talking about coding, that's the easiest. 
I'm talking about the decision process of choosing the tech to be used, why, and if they add value to your final product. After that, you need to learn these technologies and make them all work together.


If that challenge wasn't enough we all know that just 3 months later the pandemic hit Brazil and I would never go back to the office again, fortunately, I was able to talk to the employees that use the previous system for a while and know our current robotic events and Olympics and got all the requisites.


I'm in favor to work from home, however in a situation like this the lack of communication was a serious issue, and being completely on my own made everything slower, but my growth as a professional was huge, and it still happening.


Starting my web developer career with a job like this, was the best opportunity possible, it was, and still is really hard, but showed to me that developing is MUCH more than coding. It's all about self-management, soft skills, dealing with clients, learn a lot about how each layer(front, back, design, DB, DevOps) contributes to the final result, communication, and how to learn by myself with efficiency.

I'll discuss in more detail everything involved in this job in my future posts, to make a long series of small texts. Thank you for reading!
My Dev Journey: Week 2
Tags: javascript, codenewbie, beginners, bootcamp
Published: 2021-05-16 19:56:36

My second week at Northcoders, marks the start of a 3 week block where we focus on JavaScript fundamentals.

If you enjoyed the past couple of posts too, then maybe consider following me on [GitHub](https://github.com/fearneyork).


## What I've learnt this week

 A big focus this week was getting used to pair programming, which is something we'll all be getting used to for our time at Northcoders.

### JEST

Testing with JEST has been really fun this week! It's been great to change mindset on how I write code to be TDD focused. Using JEST I've been incrementally adding functionality to my code to pass unit-tests each time and make my functions more robust!

At times it has taken a lot of self-control to not go ahead and implement functionality to the code before it's needed! I've found this has been great for two main reasons. One of the reasons has been to not add complexity to a function, and it has also been great to understand how every bit of code works in more depth.

### Value vs Reference

Learning the difference between where primitive types are passed by their value, and non-primitives are passed by a reference to that object in memory. This has shed light on a lot of the quirks I encountered early on in learning JS. As well as being meaningful when testing for mutation across my functions

### Destructuring Assignment

On the first time of seeing array/object destructring, it seemed like a syntax error! 😂

Seeing square/curly braces on the left-hand side of the assignment operator, was so odd to start with, but oddly made so much sense, especially in the context of exports and requires!

## Resources I've found useful this week

### State of JS

Whilst not a resource per say, [State of JS](https://2020.stateofjs.com/en-US/technologies/testing/) been increadibly useful to put a little more context to a lot of the techonologies I see mentioned accross Twitter and job specs. Also who doesn't love a good bit of data visuisation 😅🤓

### JEST docs

When getting familiar with testing and what certain assertions *actually* test for, the [JEST docs](https://jestjs.io/) have come in handy to solidify the points that the tutors have been driving home this week!

### My partners

Learning from my partners this week has been increadibly valuable. I have definitely felt more comfortable towards the end of this week with working in a pair, screen sharing whilst *trying* to type, and communicating in both the Driver and Navigator role, but I know there's a lot of improvment and work to do on this very specific skill.

Writing this makes me think of a [CodeNewbie](https://www.codenewbie.org/podcast/what-good-soft-skills-look-like) podcast from not that long ago, highlighting just how important these soft skills are in dev roles.
CSS Flex Explained in 1 Animation
Tags: css, flex, animation, design
Published: 2021-05-16 19:47:49

#A picture is worth a thousand words!
#How many an animation?

Today I have this simple write-up. It explains how `justify-content` property works in CSS flex. So techincally it's not all of flex. But it does capture a large chunk of its functionality.

![CSS Flex justify-content animation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/03iduji2vo00lo1vbanr.gif)

There is a lot you can learn about flex just from watching this animation. I think spacing items is at the core of Flex functionality. So I made this animation to demonstrate that.

Note this won't work when `flex-wrap: wrap` is applied, as it will create a line break once the content no longer fits on one row. (Not shown here.)

##How It Was Made

Each lane is just an CSS Flex container with styled items.
It was animated using jQuery `.animation()` with `easeOutBounce` effect.

CSS animation could have been used here, but jQuery animation uses a better bounce effect that would be too time consuming to recreate using beizer curve or CSS's `@keyframes` directive.

I recorded the video with [OBS Studio](https://obsproject.com) which you can see in [my tweet](https://twitter.com/javascriptual/status/1393977189327151105).

The GIF animation in this tutorial was created using [ScreenToGif](https://www.screentogif.com/) software.

I took a deep dive into CSS after writing my book [CSS Visual Dictionary](https://www.amazon.com/dp/1983065633).

# `#Octopack` is my coding book bundle.

***Hey readers!*** At the end of each tutorial I advertise my coding book bundle. I don't know if it's going to work as I don't really do marketing well. But I decided to follow this protocol just to see what happens.

The **pack** includes [CSS Dictionary](https://javascriptteacher.com/h/jsg), [JavaScript Grammar](https://javascriptteacher.com/h/jsg), [Python Grammar](https://javascriptteacher.com/h/jsg) and few others. Just see if you might need any of the books based on where you are on your coding journey! Most of my books are for beginners-intermediate XP.

I don't know who is reading my tutorials but I put together this coding book bundle that contains some of the best books I've written over the years. Check it out 🙂 **I reduced price** to some regions like **India**, **Nigeria**, **Cairo** and few others. Prices are just so different here in the U.S. and all over the world.

You can **get Octopack** by following my [My Coding Books](https://javascriptteacher.com/h/css) link.

![css book](https://semicolon.dev/static/buy-javascript-python-css-book-bundle-pdf.png)

![css flex diagram](https://javascriptteacher.com/devto.png)
Understanding Async Resources with Async Hooks
Tags: node, asynchronous, asynchooks
Published: 2022-02-08 00:51:49

---
title: Understanding Async Resources with Async Hooks
published: true
date: 2021-05-16 19:37:56 UTC
tags: node,asynchronous,nodejs,asynchooks
canonical_url: https://blog.insiderattack.net/understanding-async-resources-with-async-hooks-3416de574f30
---

[![](https://cdn-images-1.medium.com/max/2600/1*kXXx-kB0kYg3PJJwED97FA.jpeg)](https://blog.insiderattack.net/understanding-async-resources-with-async-hooks-3416de574f30?source=rss----57f0c4748c10---4)

Advanced NodeJS Internals — Part 3

[Continue reading on Deepal’s Blog »](https://blog.insiderattack.net/understanding-async-resources-with-async-hooks-3416de574f30?source=rss----57f0c4748c10---4)
"Should I learn React?"
Tags: react
Published: 2021-05-16 19:37:19

If you're asking this question...

Then the answer is _no._ Why?

{% youtube -IZySRgEHXk %}

When you know _for sure_ what wall you've hit, what needs to happen, what tool makes that happen, and you understand the tech debt you'll incur, then (and only then) - should you even consider learning it. That goes for anything. 

Should you learn CSS Grid? 

(If you're asking... then - _no_)

Should you learn Rails? 

(If you're asking... then - _no_)


---

Would you like to learn "All the things" in order of importance and skip all of the "Should I..." and all the youtube videos and late nights and tutorials?

Check out what we're doing at Perpetual Dot Education.
Multi-Touch Touchpad Gestures on Linux
Tags: linux, gestures, ubuntu, touchpad
Published: 2021-05-16 19:21:49

A guide to enable multi-finger gesture support on any Linux distro, be it Ubuntu, Pop!_OS, Fedora or Arch. Supports pinch-to-zoom in Chrome, Firefox & other browsers.

### Enabling touchpad gestures on Linux:
1. Go to [Touchégg's Github Repo](https://github.com/JoseExposito/touchegg).

2. Scroll down a bit and you’ll see the [Installation](https://github.com/JoseExposito/touchegg#installation) & [Configuration](https://github.com/JoseExposito/touchegg#configuration) instructions, which will guide you through rest of the process.

*Tip: Restart your PC if gestures do not work right away.*

#### GUI to Configure Touchégg.
Use [Touché](https://github.com/JoseExposito/touche), the desktop application to configure Touchégg, by the same developer, so less compatibility issues (I found none).

#### Gesture Support for Gnome
To enable multi-touch gestures on Gnome, install [GNOME Shell X11Gestures extension
](https://github.com/JoseExposito/gnome-shell-extension-x11gestures) from [Gnome Extensions](https://extensions.gnome.org/extension/4033/x11-gestures/).

Credits:
Jose Exposito on [Github](https://github.com/JoseExposito)
What is the best RAM for gaming?
Tags: gamedev
Published: 2021-05-16 19:20:30

What will be the best gaming ram? I wanted to know what size of ram will I get from the store for my PC. 8GB, 16GB or 32GB I wanted to build my computer for gaming purposes.

This short guide publishes on <a href="https://gameinstants.com/how-much-ram-for-gaming-ideal/">gameinstants.com</a> tell to purchase the RAM according to the CPU configs such as Motherboard and Cooling Fans and along with that I wanted to know which company RAM will best for gaming in 2021 and soon years
My Portfolio which mimics an Ubuntu Terminal
Tags: javascript, react, firebase, terminal
Published: 2021-05-16 17:50:17

Check out my Online Portfolio which mimics an Ubuntu Terminal - https://ArunD.in 

I have used React JS, Firebase, Firestore, and Material UI to develop this.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1inwho4jhizjj5rho4ko.PNG)
Salt - 🚀 Task managment++
Tags: rust, cli, task
Published: 2021-05-16 17:44:24

For so long, I've been using github issues to keep track of things I need to do. It gets annoying, relying on a server to respond, and waiting a while. Say less my friends, I have a solution!

[salt](https://github.com/Milo123459/salt) \- A better way to keep track of tasks. No server, everything is local and can be organized very easily. No more "oh hey that's where it was", more "oh god I have to write code!"

Jokes aside, salt is an attempt to redefine task management. With a VSCode extension in development, for the ultime experience, and tasks synced with other platforms (wip) you can basically throw away anything else. 

## Concepts

Nodes (not nodejs 🚀)
Tasks
Task status

### Node

A node is the parent of some tasks, think of it like a tree, where the tree is the node, and the apples are the tasks, all under one big node. 

### Tasks

Something you have to do...

### Task status

Either checked, or not checked, this allows you to keep track of tasks you have to do!

## Why

Why not? A task management system for the CLI is the one thing I've needed for so long, and I spoke to a few friends and they loved the concept and using it as well.

## How

Rust. The CLI is pure Rust.

## Install

```
# macos
brew tap eternalmoon1234/brew
brew install salt
# windows
scoop bucket add sushi https://github.com/kidonng/sushi
scoop install sushi/salt
# other
curl -fsSL https://raw.githubusercontent.com/Milo123459/salt/master/install.sh | bash
```

 Thanks for reading! Suggestions can go in the comments 😉
Reduce React app loading time with lazy loading
Tags: react, javascript, beginners
Published: 2021-05-16 17:42:35

When I pushed a front end portfolio project to production, I noticed that there was a delay when the web app loaded for the first time.


Being a beginner, I started researching why. Here's what I found out:


React is based on components ( obviously ) and it makes use of bundlers like webpack to bundle up all the imports ( components, views etc) into a single file, which is then loaded when the user first opens the app.


Which means, even if the user never visits a particular component,it is still loaded.


How do we solve this? By code splitting.


The solution is to dynamically import components depending on the route or components the user is trying to access. This results in only those components loading, thereby reducing the load time.


Here's how the syntax is;


Without lazy, `import About from './about'`

With lazy, `const About = React.lazy(()=> {import './about'}`


Additionally, we use Suspense, which allows us to use a fall back when the components are loading.

Example:

`<Suspense fallback={<p>Loading></p>}>
<App />
</Suspense>`



For detailed explanation on this, visit https://reactjs.org/docs/code-splitting.html
What I gained by completing 'JavaScript Algorithms and Data Structures' in freeCodeCamp.org

Tags: javascript, beginners, career, codenewbie
Published: 2021-05-16 17:33:59

> **This is my personal opinion and I don't force anything on you. 
So be calm and keep learning.**

From the last few days, I have been obsessed with completing lessons in freecodecamp.org. Well, after my first certification of 'Responsive Web design', I wanted the next one which is 'JavaScript Algorithms and Data Structures'. 
### So what did I gain ?
Certainly, it was no loss to me. Practicing is never a loss. But here, it helped me with my weak points in javascript which otherwise I would never would have discovered.
* Writing Regex
* constructor functions
* Prototypes
* Reduce function of Arrays

And a lot more which would certainly help in my career.

### And what did I lose ?
Almost nothing, apart from a little amount of time which I would call an investment rather than a loss.

### My suggestion
It's obvious. My suggestion is to check freecodecamp.org and similar sites, especially if you are a beginner and never been there. Even if you are not a beginner, who knows, you might just stumble upon something new and that might help in your career. 
Its never bad to discover things.
compiler for sql
Tags: matlab, compiler
Published: 2021-05-16 17:33:47

we know that sql is also one of the programming language which are mostly used in database so in this article we will see <a href="https://pythonslearning.com/2021/05/which-is-best-and-free-online-compiler-editor-for-sql.html">different compiler for sql</a>
Source : https://pythonslearning.com/2021/05/which-is-best-and-free-online-compiler-editor-for-sql.html
compiler for Matlab
Tags: matlab, compiler
Published: 2021-05-16 17:31:06

we know that Matlab is also one of the programming language which are mostly used in image processing so in this article we will see <a href="https://pythonslearning.com/2021/05/which-is-free-online-compiler-or-editor-for-matlab.html">different compiler for matlab</a>
Source : https://pythonslearning.com/2021/05/which-is-free-online-compiler-or-editor-for-matlab.html
Palindromic Substrings
Tags: java, substring, expandaroundcenter
Published: 2021-05-16 16:52:29

```java
class Solution {
    public int countSubstrings(String s) {
        int count=0;
        for(int i=0;i<s.length();i++){
            count+=expand(s,i,i);//palindromes of the form WCW'
            count+=expand(s,i,i+1);//palindromes of the form WW'
        }
        return count;
    }
    private int expand(String s,int start,int end){
        
        int len=0;
        while(start>=0 && end<s.length() && s.charAt(start)==s.charAt(end)){
            len++;
            start--;
            end++;
        }
        return len;
    }
}
```


There are basically two types of palindromes, odd length and even length.
Odd length palindromes are of the form WCW'
for example, DAD, MOM, RACECAR. In all of these examples there's one character that separates the equivalent characters around it. To satisfy this condition we compare the character to itself and then go on expanding around it as the code shows. This is also the case of single characters where the character itself is a palindrome considering the Ws on both sides to be null.
W' being the reverse of W.

On the other hand, for even palindromic strings like bb, aa, you directly compare it with the character right next to it. If it is a palindrome the characters match and you move forwards in W' and backwards in W thereby comparing the characters at the same position but in reverse.
Discovering .Net interactive
Published: 2021-05-16 16:31:40

<sub>Photo by <a href="https://unsplash.com/@sigmund">Sigmund</a> on <a href="https://unsplash.com/s/photos/interactive">Unsplash</a></sub>

I am discovering [.Net interactive](https://github.com/dotnet/interactive) through its [vs code extension](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.dotnet-interactive-vscode).
It allows to play with C#/ F# / Powershell and display data easily, and can even [connect to SQL server to interact with](https://devblogs.microsoft.com/dotnet/net-interactive-with-sql-net-notebooks-in-visual-studio-code/).

It seems interesting to document diagnostics or data vizualisation. Yes, you can [import you code](https://github.com/dotnet/interactive/blob/main/samples/notebooks/csharp/Docs/Importing-packages.ipynb) to interact with.

[This video](https://www.youtube.com/watch?v=KlZje8GNDEQ) shows many potential for this technology (mermaid support, Sandcastle etc ...).

Hope this helps !