teleren/devto huggingface dataset:
Linux Command Line for Beginners
Tags: linux, beginners
Published: 2021-05-25 13:50:25

The [Linux](https://www.linux.com/what-is-linux/) command line is for power users. It is not for the faint of heart or for people who are afraid to take a risk. 

If you are new to Linux and are afraid to take the plunge into using the command line interface, then [this tutorial](practicelinux.com/) is a good start. 

## What is Linux and CLI? :computer:

Linux is an open source operating system that is used on everything from smart phones to main frame computers. 

Linux provides a command line interface (CLI) that provides a quick and powerful way to control and manipulate your computer. Once mastered, the Linux CLI can save you time and provide a powerful tool to aid in your daily tasks.

## Commands

The command line can be intimidating but learning the basics will give you access to a world of scripts and automation tools that will make your life a lot easier and more productive.

The Basics: You will be using the command line to type various commands and tasks. Commands are what Linux runs. In Linux, the Command Line can be used for various things.

![cat enters pc](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xjwh38xzh6neufqr0hev.gif)

To start, open up a terminal. Now, let's try using some basic Linux commands! 

Most of these commands are applicable for all Linux distributions. Linux is case sensitive (capitalization matters).


**Navigation**

`ls`	 List directory
`cd DIR` Change the current directory to the DIR directory
`cd ~`	 Change to home directory
`cd /`  	 Change the current directory to the root directory
`cd ..`	 Go one directory lower
`pwd`	 Show name of current working directory 

**File Commands**

`mkdir -p DIR` Create directory DIR 
`rm FILE` Remove FILE
`rm -r DIR` Remove DIR and its contents recursively
`rm -f FILE` Force remove FILE 

**System Info**

`date`	 Print or set the system date and time
`cal`	 Displays a calendar
`uptime` Tell how long the system has been running
`w` 	 Show who is logged on and what they are doing
`whoami`  Print effective userid
A simple Oracle DB connection in Python
Tags: database, webdev, python, beginners
Published: 2021-05-25 13:48:20

If you are managing a python backend with an wanting an Oracle database to serve you data you will likely need to use the cx_Oracle module to create an Oracle DB connection. Heres a little Python snippet to create an Oracle DB connection.

## Why Oracle? 
Many of use small time use common Opensource DBs like mySQL and PostgreSQL but in large corporations many of the database estate is Oracle therefore it helps to have an idea on how to work with it.

```python
import cx_Oracle
import os

inst = os.environ["ORACLE_SID"]

try:
  dbconn = cx_Oracle.connect (mode=cx_Oracle.SYSDBA)
  print ("Connected to Oracle instance " + inst + " (" + dbconn.version +")")
  release = ((dbconn.version).split ('.'))[0:2]
except cx_Oracle.DatabaseError as e:
  error, = e.args
  print("Error connecting to instance: " + inst + " : " + error.message")


        
db = dbconn.cusrsor()```
Node.JS - Foal framework - version 2.4 is here
Tags: typescript, javascript, node, webdev
Published: 2021-05-25 13:48:06

---
title: Node.JS - Foal framework - version 2.4 is here
published: true
description: This articles presents the features of version 2.4 of FoalTS
tags: typescript, javascript, node, nodejs, webdev
cover_image: https://foalts.org/assets/images/banner-1a892e7cbebe358fc06789a6968738f1.png
---

Version 2.4 of Foal has been released! Here are the improvements that it brings.

<!--truncate-->

## `$data` references for validation

Version 2.4 allows you to enable the AJV `$data` option so that you can use the verified data values as validators for other values.

*config/default.json*
```json
{
  "settings": {
    "ajv": {
      "$data": true
    }
  }
}
```

*Example of auth controller*
```typescript
import { Context, Post, ValidateBody } from '@foal/core';

export class AuthController {
  @Post('/signup')
  @ValidateBody({
    type: 'object',
    properties: {
      username: { type: 'string' },
      password: { type: 'string' },
      // "password" and "confirmPassword" should be identical.
      confirmPassword: {
        const: {
          $data: '1/password',
        },
        type: 'string',
      },
    }
    required: [ 'username', 'password', 'confirmPassword' ],
    additionalProperties: false
  })
  signup(ctx: Context) {
    // Do something.
  }
}

```

## Cache option for file downloading

Starting from version 2.4 the `Disk.createHttpResponse` method accepts an optional parameter to specify the value of the `Cache-Control` header.

```typescript
import { Context, dependency, Get } from '@foal/core';
import { Disk } from '@foal/storage';

import { User } from '../entities';

export class ProfileController {
  @dependency
  disk: Disk;

  @Get('/avatar')
  async readProfileImage(ctx: Context<User>) {
    return this.disk.createHttpResponse(ctx.user.avatar, {
      cache: 'no-cache'
    });
  }
```

## Bug fixes

See issue [#930](https://github.com/FoalTS/foal/issues/930).

## Contributors

[@ZakRabe](https://github.com/ZakRabe)
How to get your first job as a Software Developer
Tags: career, watercooler, webdev, codenewbie
Published: 2021-05-25 13:37:15

Lately I've been reviewing junior frontend CVs and technical tests at my current job to help with the hiring process. They kinda remind me of me when I started and I realize now all the things I could've done better.

First of all, there's a problem with people applying to jobs. Junior Frontend job offers can easily get 100+ sign-ups. It's impossible to check them all. If you don't have a degree or have no experience, or both, it's really easy for your CV to be ignored. I know it sucks, I've been there. But that's the reality.

Maybe Netflix, Google and Apple can afford to hire enough people to check all the CVs but most businesses don't.

What I recommend you do is cultivate a network so you don't have to rely on this process to find jobs. I did this without realizing.

## Building your network

I know most developers despise LinkedIn but without it, I probably wouldn't have made it. I wouldn't say I have a LinkedIn strategy but here's what I believe works best.

1. Find job-offers you want to apply to.

2. Connect with people from that company (use the LinkedIn search to find them)

3. Ask someone, recruiters or engineers, questions about the offer. Be polite. Let them know you know they are busy, and it's okay if they can't respond.

4. Ask them who can you contact to ask more questions about the offer (whoever is in charge of the process)

5. Add them through LinkedIn and pitch them (politely) why you think you're a good fit for the job.

You'll probably have to do this a bunch of times until you get a job, but in the process you're cultivating a pretty good LinkedIn network.

With a LinkedIn network when you share stuff about what you're learning and building they will see it and most (in my experience) will like it. Eventually you'll start getting connection requests and messages from people that are looking for Junior Developers.

In my experience, most people are pretty cool with you contacting them and will try to help you somehow if you let them know you're looking for a job. Specially developers.

Some will be assholes, forget about it and move on.

### Follow me on [twitter](https://twitter.com/jordienr) for more
Amazing Specific Select File Using HTML CSS & JS
Tags: html, css, javascript, webdev
Published: 2021-05-25 13:36:36

Today I created a Amazing Specific with HTML & JS. I use JavaScript to select this file name and upload this file you can be use a post method after choose the file using axios or http I hope you like this also comments about your thoughts.

For more content follow me on Instagram  [@developer_nikhil27](https://www.instagram.com/developer_nikhil27/).

{% codepen https://codepen.io/NikhilBobade/pen/eYvRzpd %}
Kinx v1.0.1 and v1.0.2, Official Release Update!
Tags: ruby, javascript, kinx
Published: 2021-05-25 13:31:33

Hello everyone!

I published Kinx v1.0.1 and v1.0.2 as an official release. See [Release Page](https://github.com/Kray-G/kinx/releases) for detail.

* Reference
    * First motivation ... [The post of introduction](https://dev.to/krayg/kinx-as-a-script-language-4iko)
        * Kinx, I wanted a scripting language with a syntax of C family.
    * Repository ... https://github.com/Kray-G/kinx
        * I am waiting for pull requests.

Those are minor updates, but I will try to make it stable more and more.

I hope you'll try this language and it is useful for you. Of course I will welcome any feedback.

See you!
Why Use Vim for Programming
Tags: linux, vim, programming
Published: 2021-05-25 13:26:26

Vim is the most famous text editor many programmers use for coding on the Linux terminal.

Vim is a text editor for Linux. Many people have grown up using Vim, that and its ubiquitous nature means it can be found on any Unix/Linux system. 

Many “power users” swear by the power and functionality of Vim, however many people see it as intimidating and complicated. If you are new to vim, I recommend [these exercises](https://vim.is/)

## Installation

Vim can be downloaded and installed from a software repository. Vim is often installed by default on Linux systems and even on Mac OS X.

You can install vim with your package manager

```
sudo apt-get install vim
```

## Why vim?

The reasons for this are simple: it's fast, it's powerful, and it comes in both a terminal emulator and a GUI version. 

You can use it locally or over an ssh connection. It can even be used inside IDEs as a plugin.

Vim allows programmers to edit text quickly and efficiently. You can jump to the end of file using `G`, top of file using `gg` and to line 10 using `10G`. Vim allows you to record and replay keystrokes and has many many more features.

![vim keystrokes](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q29uls0rogayd9kxsjt0.gif)

Vim 8 comes with built-in support for [Python](https://python.org), [PHP](https://php.net), [Perl](https://www.perl.org/), [Ruby](https://www.ruby-lang.org/en/) and Tcl programming languages.

Vim as a code editor but it's much more powerful than you may think. Before you do anything else, you should know that:

* Vim is not a text editor that uses a mouse. It's a program that uses keyboard shortcuts to perform all of the tasks.
* Vim is hard to learn. You will have to spend a lot of time practising and mastering your skills before using it effectively.
🧩 What is Caching and How It Works
Tags: security
Published: 2021-05-25 13:20:45

#### 🖥 Let’s see why caching has become one of the most crucial concepts in computer science. We will dive into the concept of caching, understanding what it is, how it works, and what are the most important types of caching.

### <br>

Over the past few years, information technology has been improving whatever kind of business drastically. Meanwhile, software architectures have become increasingly complex, and the number of their users has grown exponentially. This has represented a performance challenge for any application. Slow performance can undermine the strategic goals of any company, which is why finding smart ways to improve it is critical. As a consequence, avoiding overhead and reducing data retrieval and processing time has become imperative. This is where caching comes into play and why no developer can ignore it anymore.

Firstly, we will delve into the concept of caching, understanding why it is important and the possible risks related to it. Then, we will study the most important types of caching.

## What is Caching

Caching is a mechanism to improve the performance of any type of application. Technically, caching is the process of storing and accessing data from a cache. But wait, what is a cache?
A cache is a software or hardware component aimed at storing data so that future requests for the same data can be served faster. 

The main reason why caching was born is that accessing data from persistent memories takes a considerable amount of time. Thus, whenever data is retrieved or processed, it should be stored in a more efficient memory. We call such a memory *cache*, which can be thought of as a high-speed data storage layer whose primary purpose is to reduce the need to access slower data storage layers. To be cost-effective and efficient, caches must be relatively small, especially if compared to traditional memories. This is why they are usually implemented by using fast access hardware such as [RAM (Random-Access Memory)](https://en.wikipedia.org/wiki/Random-access_memory) plus a software component.

Thanks to caches, it is possible to implement a mechanism to efficiently reuse previously retrieved or computed data. Whenever a new request arrives, the requested data is searched first in a cache. A *cache hit* occurs when the requested data can be found in a cache. On the contrary, a *cache miss* occurs when it cannot. Obviously, reading the required data from caches is assumed to be faster than recomputing the result or reading it from the original data store. So, the more requests can be served from a cache, the faster the system will be. 

In conclusion, caching is a fairly simple way to achieve performance improvements. This is especially true when compared to algorithm optimization, which is usually a much complex and time-consuming task. 

![What is Caching](https://images.ctfassets.net/23aumh6u8s0i/2fNadw2WJZjxWw4vlmEwtq/ec47b60f009e5dbae3ab41cf79e64b08/01_caching-sep.jpg)

[Read more...](https://auth0.com/blog/what-is-caching-and-how-it-works/?utm_source=content_synd&utm_medium=sc&utm_campaign=caching)
Interesting people to follow for UI/UX/Webdesign
Published: 2021-05-25 13:02:32

**If you are interested in UI/UX or webdesign, here are a few people for you to follow!**

These are really interesting people which post regularly about new tools, tips...

---

## Geoffrey Crofte

He is a UX in Luxembourg and posts almost every day on Linkedin in French, English, or both.

Also, he has a blog *(written in French)* named **Creative Juiz** with a lot of interesting posts.

### Links
- [LinkedIn](https://www.linkedin.com/in/geoffreycrofte/)
- [Creative Juiz](https://www.creativejuiz.fr/blog/)

### Posts examples
Here is some example of tools which he talked about :
[Open Color](https://yeun.github.io/open-color/?ref=shuhari)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ap5qaorzjvcou7yvv6mj.PNG)

[Luge](https://luge.cool/)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hycqwqeedxp3tfzhfmmz.PNG)

---

<br/>

## Colbys Dovi

He is a Product Designer in Paris. As Geoffrey, he posts almost every day on LinkedIn in French and English.

### Links
- [LinkedIn](https://www.linkedin.com/in/colbysdovi/)

### Posts examples
Here is some example of what he talked about : 
[Tabler Icons](https://tablericons.com/?ref=shuhari)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t3jh22ef6jzql53r2kvc.PNG)

[5 steps to faster web fonts - Blog post](https://iainbean.com/posts/2021/5-steps-to-faster-web-fonts/)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pntga2z5mwwlxck5xowj.PNG)

---

<br/>

## Laetitia Bouloc

Also known by the name of **Néographe Factory** *(The name of her enterprise)*, she is a freelancer in Bordeaux, France.

She posts in French, generally in a video format, and it's really interesting and fun!

{% youtube N8cEEuoRzVI %}

Also, on her website, she has a page that can be your next bookmark! A huge [toolbox](https://www.neographefactory.com/toolbox.html)!
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mya569zbp7ire1wahpd4.PNG)

> **Note:**
> She is currently writing a book to be able to create your visual identity. It will be in French, but if you understand french and like her job, I think it will be a great buy.
> [Néographe Factory - Book](https://www.neographefactory.com/book-.html)

### Links
- [LinkedIn](https://www.linkedin.com/in/laetitiabouloc/)
- [YouTube](https://www.youtube.com/c/N%C3%A9ographeFactory/videos)
- [Néographe Factory - WebSite](https://www.neographefactory.com/)

---

So go follow them and go give them some love about their great job about sharing knowledge!

I hope it will help you!
What's it like sitting a Microsoft exam at home?
Tags: discuss, exam, certification, devrel
Published: 2021-05-25 12:55:15

Exams and certifications can be great ways of helping you learn something and also proving to others that you have a certain skill.  They aren't the be the only way to learn or the only indicator of skills but they are part of the process. 

Over the last few years I've sat a number of [Microsoft certifications](https://docs.microsoft.com/learn/certifications/browse/?WT.mc_id=modinfra-29533-salean). And I've increasingly found it more convenient to sit the exams at home instead of travelling to a test centre. 

However, the exams at home can be quite daunting trying to understand the dos and don'ts. In this video I share my experiences and answer questions.  So find out what it's like to sit a Microsoft exam at home and prepare yourself for the experience. 

{% youtube zhwYGhEog_w %}
Coding in VS Code with the help of an AI assistant
Published: 2021-05-25 12:48:19

Do we really need AI in our code? Is it going to replace us? How does it work? What's the difference between Tabnine and IntelliCode?
Watch now Burke Holland from VS Code and Yotam Shinan from Tabnine in this fascinating video hosted by VS Code

{% youtube vV0zH2ccaGc %}
#AI #VSCode #ML #Productivity #Coding
why use useState?
Tags: usestate, react, javascript
Published: 2021-05-25 12:40:59

# useState

useState is a react API to change the state of elements or components.
Why do we require a seperate hook to change a value of an element?<br>
Well,Its always a bad practise to mutate the state directly.<br>
Let me explain things along with the code itself.

```JSX
import { useState } from "react";
import "./styles.css";
export default function App() {
  let [user, setUser] = useState("user");
  return (
    <div className="App">
      <h1>sample program to show declarative programming</h1>
      <hr />
      <button
        onClick={() => {
          user = "prajwal";
          setUser(user);
          // if you dont use setState line no 19 does not run => function is not called => rerendering does not occur.
          console.log("from onclick", user);
        }}
      >
        Click Me{" "}
      </button>
      {console.log(user)}
      <h1>welcome {user}</h1>
    </div>
  );
}
```

What does this code aim to do?<br>
We want to display user's name instead of just user as a text when button is clicked.<br>
A bad dev like me would probably do something as <p style="color:red">(which is wrong)</p>

```JSX
import "./styles.css";
export default function App() {
  let user = "user";
  return (
    <div className="App">
      <h1>sample program to show declarative programming</h1>
      <hr />
      <button
        onClick={() => {
          user = "prajwal";
          console.log("from onclick", user);
        }}
      >
        Click Me{" "}
      </button>
      {console.log(user, "this is from user")}
      <h1>welcome {user}</h1>
    </div>
  );
}
```

<br>

> _Note: I am purposely showing the wrong approach.Sometimes looking at what is wrong helps us understanding what is correct!!_

<br>

Here goes the sandbox link for the right approach.

{% codesandbox bqw1u  %}

If you see the console.log within onClick you could see that the value of user has been updated.But Wait!Why isnt it reflecting in the view?

Its because..

1. if there is no setState =>(implies) React does not see any state changed => re-rendering of function does not occur => view would no be updated.

2. if you dont use setState, `{console.log(user, "this is from user")}` does not run => function is not called => rerendering does not occur.

> everytime setState() is invoked,a re-render is triggered.

Conclusion:<br> <b>only when the state is changed through setState the re-rendering of function occurs.</b>

Thank you for reading till the end. If you notice something wrong do suggest me in the comment box.
Do give it a like if it helped you understanding the concept.
TIL that sometimes you need to pass a header to nginx’s gprc module
Tags: todayilearned
Published: 2023-05-19 20:39:29

---
title: TIL that sometimes you need to pass a header to nginx’s gprc module
published: true
date: 2021-05-25 12:39:00 UTC
tags: TIL
canonical_url: https://www.zufallsheld.de/2021/05/25/til-that-you-need-to-pass-a-header-to-nginxs-gprc-module/
---

I am running [Percona Monitoring and Managent](https://www.percona.com/doc/percona-monitoring-and-management/2.x/index.html) (“PMM”) as a service for my fellow colleagues so they can monitor their databases.

PMM runs as a container on a virtual machine, listening on port 8080.

On the same virtual machine runs another nginx webserver as a reverse proxy for the container. The configuration looks like this:

```
server {
        listen 443 ssl http2;
        server_name pmm.internal;

        location / {
                grpc_pass grpcs://172.29.0.108:8080;
                grpc_ssl_verify off;
        }

}

```

Now this worked if I opened https://pmm.internal/graph. However If I opened https://pmm.internal (without the “graph” path), I was redirected to https://172.29.0.108:8080/graph instead of https://pmm.internal/graph.

The nginx webserver inside the container has the following rewrite:  
`rewrite ^/$ $scheme://$http_host/graph/`  
The `http_host` variable is derived from the `Host`-Header. So because of the reverse proxy the `Host`-Header was wrong and I had to explicitly set the header in the location to the correct domain:

```
server {
        location / {
                grpc_pass grpcs://172.29.0.108:8080;
                grpc_ssl_verify off;
                grpc_set_header Host pmm.internal.mms-support.de;
        }

}

```

This works. :)
ThinkingElixir 049: Pushing for Modularity with Maciej Kaszubowski
Tags: elixir, architecture
Published: 2021-05-25 12:35:40

In episode 49 of [Thinking Elixir](https://thinkingelixir.com/the-podcast/), [Maciej Kaszubowski](https://github.com/mkaszubowski94) returns to talk about how read models can help modularize our systems. There is a focus on background job systems and how they fit in our modular designs. We cover push vs pull based systems and which is more maintainable. Maciej also shares his approach to learning and understanding a new Elixir library and more!

[Podcast Episode](https://thinkingelixir.com/podcast-episodes/049-pushing-for-modularity-with-maciej-kaszubowski)
[New Release] Ade Custom Shipping Pro
Tags: woocommerce, shipping
Published: 2021-05-25 12:25:24

https://www.youtube.com/watch?v=7d0sig18Lh0

* Amazing features added ��
* Add, Delete, Modify LGA’s �

Upgrade to PRO Now

Download https://www.biggidroid.com/product/new-release-ade-custom-shipping-pro/

#wordpress
#webdevelopment #webdevelopment