teleren/devto huggingface dataset:
Linux History Commands
Tags: linux, beginners
Published: 2021-10-29 08:19:31

Hello Folks 👋 , Ankit here so now let's have a quick look at the most used and favourite command among linux users i.e the history command.

 In your shell, there is a history of the commands that you previously entered, you can actually look through these commands. This is quite useful when you want to find and run a command you used previously without actually typing it again.

$ **history**

**Some Shortcut tricks and Wow factors of history Command**

**↑** ---> we can also use the upper arrow key to run the previous commands

**!!** ---> if you want to run the command that you used earlier without writing the whole command you can just type in this **!!**
and it will run the last command you ran .

Next in the list is ctrl - R 

**ctrl - R** ---> this is the reverse search command . so how it works is simple you have to press ctrl r and then you can write some parts of the command for e.g :- you write ls and then you pressed ctrl - R again so what it will do is it will show you the matches and you can just navigate through them by pressing ctrl -r again
and if you find a suitable match for the command for e.g :- ls -a
you can press the enter key to use it again 

our terminal is getting a little cluttered so to clear up the display we can use the below command 👇👇👇

**clear** 

So now if we are talking about so much useful features of the linux without tab completion how can my article be completed 😅😅
The most useful feature in any command-line environment is our all time-favourite  😁😁

**Tab-Completion** ---> So how it works is if you type chr or firef and then press tab it will autocomplete the command like if u typed chr it will autocomplete the command with chrome 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/90gks7nlbofox7t7xzpv.gif)
 

So that was all from my side . Have a great day ahead  ✌✌
Octoparse 8.4 | Herramienta de Web Scraping en Español
Tags: webscraping, webscrapingtool, datamining, dataextract
Published: 2021-10-29 07:46:15

Hola, todos. ¡[Octoparse](https://www.octoparse.es/) versión en español ya está disponible! Octoparse es una herramienta con la que puedes extraer datos web fácilmente sin codificación.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a9quwuz6g4brdcchpnog.png)[Haz clic aquí para ver el video.](https://youtu.be/6aXtSo-eiZM)

En la versión 8.4, Octoparse puede [exportar automáticamente tus datos en la nube con Zapier](https://helpcenter.octoparse.es/hc/es/articles/4406544781081-C%C3%B3mo-Conectar-Octoparse-con-Zapier) a Google Drive, Google Sheet y más software. Zapier es una herramienta que te ayuda a integrar flujos de trabajo entre diferentes aplicaciones sin necesidad de código.
Cuando ocurre un evento en una aplicación, Zapier se activará para decirle a otra aplicación que realice una acción en particular, de acuerdo con el Zap que hayas creado. Conectarte con Zapier, te ayuda a automatizar tu trabajo y tener más tiempo para lo que más importa con miles de aplicaciones más populares.

¡Y hay más! Puedes personalizar el agente de usuario, hacer una copia de seguridad de los datos locales en la nube y formatear la marca de tiempo. Siempre hay más de los que esperas.
when i click enter button automatically focus on textbox or select box ?
Published: 2021-10-29 07:33:19

 const refs = useRef(null)
  const handleKeyPress = (value, event) => {
    if(event.key === 'Enter'){
      refs[event].focus()
    }
  }
<input onKeyPress={(event) => handleKeyPress(textbox1, event)} />
<input ref = {textbox1} onKeyPress={(event) => handleKeyPress(textbox2, event)} />
Top Parenting Tips For Single Mothers 
Published: 2021-10-29 07:27:01

Being a mother is one of the massive encounters a lady can have. Yet, being a solitary parent can be hard. Bringing up a youngster can be unpleasant if you need to do it isolated. 

Today, numerous people are picking to be single guardians and it can be great some of the time to raise a youngster in a glad home. Single guardians are more normal than at any other time. Kid raising is troublesome in any case. In any case, as a solitary parent, the stakes are higher as the single parent is having the sole liability of all parts of youngster care that can bring about added strain, stress and exhaustion. Shuffling work and childcare can be monetarily troublesome and socially segregating simultaneously. 

With regards to the prescribed procedures for nurturing, there can be many replies. Truth be told if you would ask hundred unique moms, you would find hundred distinct solutions. As it is properly said, various strokes for various people. Notwithstanding, we have attempted to come up here for certain tips for single parents to carry some lucidity and quiet to the circumstance that can be a troublesome excursion now and again. 

It is truly hard, yet not feasible and you're in good company. Eventually, seeing your youngster develop into an all around raised, aware and cherishing individual will merit all the work and difficulties, trust me, you will fail to remember this battle for the last time. 

Here are a few hints for single parents to make the best of their day to day life. 

Show some adoration That's very significant. Remember to applaud your kid. Give the person in question your unrestricted help and love to make him/her accept that you're with them and they can admire you in case they are confronting any test. Put away some an ideal opportunity to go through with your kid, be it recess, understanding time or just to sit and talk. 

Have a set daily practice – Having a set daily schedule or timetable aides everyday life run all the more easily. You'll be coordinated, less pushed and will figure out more opportunity for pleasant exercises. Day by day schedules can foster fundamental abilities in kids and help to assemble solid propensities. Be predictable and don't change the schedules all the time. Attempt to lead with activities and not words. 

Find quality childcare – If you believe you really wanted childcare routinely, search for a certified individual guardian and can give incitement in a protected climate. Try not to ask another companion or accomplice to watch your kid until you trust them completely. Try not to depend completely on the more seasoned kid as the sitter. 

Set family runs – Family administers are essential to cause kids to get what practices are OK and what are not. Having rules at home cause kids to observe them at different places as well. Impart runs unmistakably to keep away from any force battles. You should be exceptionally cautious with regards to keeping family manages as they ought not be extremely unforgiving. Visit at - https://singlemomhelpblog.blogspot.com/2021/10/top-parenting-tips-for-single-mothers.html
Angular : RxJS BehaviorSubject
Tags: javascript, typescript, webdev, angular
Published: 2021-10-29 07:22:47

As we know multiple components share the common data and always need updated shared data. In such scenarios most of the time BehaviorSubject is used which acts as a single store to hold updated shared data.
* BehaviorSubject is both observer and type of observable.
* BehaviorSubject always need an initial/default value.
* Every observer on subscribe gets current value.
* Current value is either latest value emitted by source observable using next() method or initial/default value.

Let’s implement BehaviorSubject to understand a concept better!

For e.g In order tracking app, display **total items in cart** and **total items in wish list** on UI in header and dashboard section based on user action.

Now we have three components -
HeaderComponent, DashBoardComponent, TableComponent

![UI](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/erwmls05vpdt8k46286h.png)
[Run Live](https://gvf3i.csb.app/)

When user add items in the cart/wishList, total count needs to be updated in the header and dashboard component.

1.First create a BehaviorSubject in order service which holds the initial state of order count ,so that it can be used by any component.
![service](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lm878gn53zi2wnvnu5bu.png)
2.Now all observers(3 components) need to subscribe to source observable to get current value and show it on UI.
![header](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sy0cm0xvr8z80y9d67ke.png)
![dashboard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2ne51tzrgygyf33kw4pj.png)
![table](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5xwxjbma1o3jwl5ssx7a.png)

3.When a user performs any action, call the next() method of BehaviorSubject. When the next() method gets called it will **update current count** with **new count** and **notifies** updated count to all observers(3 Components) who subscribed to source observable.

![Action](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vjdclty5j36jwndhp7an.png)

This way BehaviorSubject makes components communication more effective.

P.S. Don't forget to unsubscribe all subscriptions in ngOnDestroy() to avoid memory leaks & unexpected output.

Thanks for reading! If you found this helpful please share!
Step 1, reboot the server
Tags: beginners, codenewbie, coding, decodingcoding
Published: 2021-10-29 07:15:04

---
title: Step 1, reboot the server
published: true
description: Yes, switch on and off that computer. Same principle, different computer.
tags: beginners, codenewbies, coding, decodingcoding
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ouchro9vwzkj8jvfwa8d.jpg
---

## *Yes, switch on and off that computer. Same principle, different computer.*

---

Some days, just [rubberducking](https://dev.to/jasonleowsg/rubberducking-29gm) alone doesn't help.

Today I had to seek help for a bug again again, but this time writing out the question out loud (aka rubberducking) didn’t work. A friend helped me out in the end, and all it took was that dreaded question: “Did you reboot the server?” 

You know how the first thing you should try when your computer/smartphone acts up is to switch it off and back on again? Yep. Same principle, different computer. A server is a computer too. It was hands-down a mistake that only a rookie can make. One of those laughable yet relieving moments. Thankfully, I didn’t spend the whole day on it!

My friend mentioned that he used to have a sticky note stuck on his screen, outlining the tips for debugging before he asked someone else for help. The very first point was “Reboot the server”. That got me thinking…if I had to write the same sticky note, what should it contain?

* Reboot the server.
* Rake/migrate db (for Rails users).
* Check the code for syntax errors, missing semi-colons, commas or closing brackets.
* Type out the code if you had copy-pasted over some bits of code.
* Google {language/framework} {error message}.
* Search Stack Overflow.
* Stop all debugging after 30min, take a break.
* Try a new approach after break, whatever it may be.
* Rubber ducking: Write out what you’re trying to do, talk about the error you got, outline the things you tried, paste public code repo. And wait. Don’t send it out yet.
* Continue debugging for 30min.
* Send it out to friends.

That definitely can’t fit into a sticky note for sure! But as a first noob version, it’ll do. For now.

---

Follow my daily writings on [Lifelog](https://golifelog.com/goals/30), where I write about learning to code, goals, productivity, indie hacking and tech for good.
HTML tags | label
Tags: html, tags, label
Published: 2021-10-29 07:05:49

It is used to **represent the title of an element in a user interface**. This element can be `<button>`, `<input>`, `<meter>`, `<output>`, `<progress>`, `<select>` or `<textarea>`.

To associate a `<label>` with an element, it can be done in two ways:
* Matching the value of the `for` attribute of the `<label>` with the `id` attribute of the element.
```
<label for="name"> Name </label>
<input id="name" name="name" type="text" />
```
* Putting the element inside the `<label>` itself, in which case the `for` and `id` attributes are no longer necessary as the association between both is implicit.
```
<label>Name<input name="name" type="text" /></label>
```

Associating a `<label>` with an element **offers two main advantages**:
* The association between the two is not only visual but also programmatic, which means that, for example, a screen reader will be able to read the tag aloud when the user focuses on the element, making it easier for him to understand what data he should enter.
* You can bring the focus or activate the element by clicking on the label in addition to the element itself, which increases the sensitive area and represents an improvement for many users, such as those who use a touch device or who have difficulties with the mouse operation.

It has two attributes:
* `for`: the `id` of a form element that supports `<label>` and is in the same document. This association occurs with the first of these elements whose `id` is equal to the `for` attribute. If that first element were one that does not support `<label>`, the association does not occur and other elements are not considered in the document even if they meet `for`-`id` equality. If the `<label>` contains an element inside, its `for` attribute must be equal to the `id` of said element.
* `form`: the `id` of the form to which the `<label>` belongs, and which must be in the same document.

Some considerations about accessibility:
* **Do not put interactive elements** such as `<a>` or `<button>` inside a `<label>`, as it makes it difficult for the user to activate the form element associated with the `<label>`.
* You should **not put headings** inside a `<label>`, as it can interfere with some types of assistive technology when using headings as a navigation aid. If the `<label>` text needs to be adjusted visually it has to be done with CSS. If a form or part of it requires a title, you must use `<legend>` within a `<fieldset>`.
* An `<input type="button">` or `<button type="button">` element that has a valid `value` attribute does not need a `<label>` to be associated with. Doing so may interfere with how some assistive technologies parse the item.

A form element can be associated with multiple `<labels>`.

When a `<label>` is clicked and it has an element associated with it, the `click` event is also fired on that element.

- Type: *inline*
- Self-closing: *No*
- Semantic value: *No*

[Definition and example](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label) | [Support](https://caniuse.com/mdn-html_elements_label)
Implementing React Check Permissions: Intro
Tags: react, typescript, tutorial
Published: 2021-10-29 07:00:27

There is too much info on this so I am splitting it into a series.

Sometimes we render components conditionally in frontend applications, and sometimes these conditions are based on authenticated users having certain permissions.

It should also be noted that under no circumstances no sensible data should rely on frontend permission checks, as they are laughably easy bypassed by anyone why has a tiniest desire to do so.

So if you are hiding checkbox with admin rights behind some if statement on the frontend without checking permissions for the action on the backend, you better cease reading this article and hurry to do something about that timebomb.

Yet, I digress. So let us imagine what tools we want in our application for checking user permissions.

For the sake of simplicity I will assume the following in this series of posts:

- permissions are merely strings, they form an array of strings stored somewhere in our frontend application;
- permissions check is a process checking if required permissions are present in the permissions available to the user;
- permission check should be able to verify if all or some of the required permissions are present in the available permissions array;
- permission are set once and never change during the application lifecycle (in our case until the user leaves the page).

Permissions check is a feature, so it should be somewhat independent from other components of our system. Maybe to the extent of it being able to exist as a separate package, in case we want to reuse it in some other applications. Therefore its implementation should not be coupled with the application where it is used.

We will need:

- obviously a function to check permissions, this is the most primitive and the easiest part to test;
- a hook, as a ~~fashionable~~ means of delivery of our function;
- a component that can wrap other components and display them if user permissions match the required.

What we do not need is to know anything about where do permissions come from and how are the obtained.

Overall it's just glorified way of checking two string arrays, but it's quite interesting.

In the next part we'll be creating the function to check permissions and covering it with tests, since it is going to be the core of our check permissions module and we want to ensure it works as intended.
Vueコンポーネント一例
Tags: vue, javascript
Published: 2021-10-27 18:01:37

## はじめに

- vue.jsの公式サイトで学んだことをアウトプット

[vue.js 公式](https://jp.vuejs.org/v2/guide/index.html)

## コンポーネントとは

- ある機能を持った付け外し可能な、部品(スクリプト)のことで、Vue.jsでは部品を組み合わせてページを完成させる.

### 例　順番付きリストのコンポーネント

```vue.js
<html>
  <head>
    <link rel="stylesheet" href="index.css">
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
  </head>
  <body>
    <div id="app">
      <ol>
        <order_lists
          v-for="ol in order_lists"
          v-bind:item="ol"
          v-bind:key="ol.id">
        </order_lists>
      </ol>
    </div>
    <script src="index.js"></script>
  </body>
</html>

Vue.component('order_lists', {
  props:    ['item'],
  template: '<li>{{item.text}}</li>'
})

var app = new Vue ({
  el: '#app',
  data: {
    order_lists: [
      { id: 0, text: 'aiueo' },
      { id: 1, text: 'kakikukeko' },
      { id: 2, text: 'sasisuseso' }
    ]
  }
})
```

### 出力

[![Image from Gyazo](https://i.gyazo.com/f6268cb6725b8954101283f84618f475.png)](https://gyazo.com/f6268cb6725b8954101283f84618f475)

- 属性値を設定することで、コンポーネントの値を変化させる

```vue.js
<div id="app">
  <ol>
    <order_lists

      // 配列を一つずつ取り出してolに代入
      v-for="ol in order_lists"

      // item(変数)にolを代入
      v-bind:item="ol"

      // kyeを設定
      // 順番付きリストを扱う際はkeyを設定するのがベターらしい
      v-bind:key="ol.id">
    </order_lists>
  </ol>
</div>

Vue.component('order_lists', {

  // itemを取得後、テンプレートをレンダリング
  // propsでデータを受け取ることができる.
  props:    ['item'],
  template: '<li>{{item.text}}</li>'
})
```
Facebook REBRANDS to Meta? 😲 Does it mean FAANG is now MANGA?
Tags: discuss, webdev
Published: 2021-10-29 06:27:35

So if you haven't already heard, Facebook is now called Meta. An interesting twist so head down to the comments and let me know what you think.

But the sarcastic and mischievous one in me couldn't help but have a few little digs 😉:

The rebrands logo is one of the saddest attempts at a logo I have seen in a while, like the love child of Virgin Media and Visual Studio but after it has been told it can't have icecream. 

![Virgin Media and Visual Studio logos with arrows pointing to the new Meta logo which looks like a sad infinity symbol in Blue](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2lrf8outzuvx4lh26h08.png)

Or maybe the inspiration came from Charlie Brown?

![Charlie Brown crying with the "Facebook" Meta logo perfectly inset into his mouth showing text "Charlie Brown the inspiration behind the Meta Logo?"](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4mfrebq96yhr8kh6d3zb.jpg)

The new name is just going to make conversations fraught with accidental mentions of the evil corporation with a new name and make my conversations with clients horrendous.

Me: "We need to set a meta description"
Client: "Don't worry, I have a meta profile"
Me: "No, we need to set your meta tags"
Client: "It is fine, I know how to tag people".

And now you can't work at FAANG companies anymore, you work at MANGA companies?

I mean, I tagged this post as "meta" originally - how confusing is that going to be? 

Or what will now happen to [meta.stackexchange.com](https://meta.stackexchange.com/), is it going to get over-run with confused people looking for help uploading Cat pictures?

## I am just being silly, just want to see what people think?
Seriously though, what do people think of the new logo, the new name, the cost of such a rebrand and why?

My only theory on the why is that they are that desperate to get Gen Z involved they think a rename is the only way, will it work or will it just alienate their current user base?

Over to you!
如何在 elementary OS 安裝 Firefox Beta
Tags: firefox, linux
Published: 2021-10-29 06:24:48

## Firefox Beta

Firefox 除了一般的版本之外，還另外有 Beta、Developer、Nightly 版，這些額外的預覽版本是用來供應給網頁開發者等等的早期用戶，這些早期用戶可以透過預覽版的 Firefox 來測試新的網頁技術，當然既然是預覽版那麼它們的穩定性一定是不如一般版的，喜歡嚐鮮或工作上對新的網頁技術有需求的朋友可以斟酌安裝。

## elementary OS

elementary OS 是以 Ubuntu Desktop 為基礎，再改用 elementary OS 自己的桌面環境而來，提供了比原本 Ubuntu Desktop 更美觀也更友善的桌面體驗，並且依然保留了 Ubuntu 的系統架構與沿用 Debian 流派的套件管理系統 APT，所以網路上對 Debian / Ubuntu 的文章大多也可以適用於 elementary OS。

## PPA

前面提到過 elemantary OS 是基於 Ubuntu 的，並且也是用 APT 作為套件管理系統，因此若要安裝普通版的 Firefox，則只要一行簡單的指令：

```sh
sudo apt install firefox
```

因為普通版的 Firefox 有被收錄在 Ubuntu 的套件庫內，而 elementary OS 也是有沿用 Ubuntu 的套件庫，才能安裝的這麼輕鬆寫意。

然而如果想嘗試 Firefox Beta，你會發現好像有難度，在 Firefox Beta 的下載頁雖然有列出 Linux 版的下載包，但是它只提供 .tar.bz2 的壓縮包，雖然解開免安裝就可以用，但並未整合入 elementary OS 的 app 選單內，有點像以前 Windows 上的綠色軟體，但這不是我想要的，本人還是較偏好與 OS 能夠做到整合的做法，因此我們必須手動把 Firefox Beta 的 PPA 套件庫加入系統內。

PPA，即 Personal Package Archive，是讓任何大眾可以寄存自己的 DEB 套件的平台，最大的 PPA 平台 Launchpad 也是由 Ubuntu 背後的公司 Canonical 所營運的。

[Firefox Beta PPA 的專案頁面](https://launchpad.net/~mozillateam/+archive/ubuntu/firefox-next)。裡面的說明有教導我們如何把這個 PPA 套件庫加入我們的 elementary OS 之內，依照頁面的指示加入 PPA 套件庫：

```sh
sudo add-apt-repository ppa:mozillateam/firefox-next
```

然後重整套件庫清單：

```sh
sudo apt update
```

最後安裝 Firefox Beta：

```sh
sudo apt install firefox
```

注意到，套件的名稱還是 `firefox`，也就是說這個 PPA 內的 Firefox Beta 的套件名稱還是 `firefox`，並且取代了原本 Ubuntu 套件庫的那個普通版的 `firefox`。

安裝完之後我們的系統內的 Firefox 應該就會被取代成 Firefox Beta。
RudderStack Product News Vol. #015 - Distributing Alert Messages From Grafana With Webhooks
Tags: grafana, webhooks, rudderstack
Published: 2021-10-29 05:29:48

Distributing Alert Messages From Grafana With Webhooks
======================================================

For our pro and enterprise customers, we offer intelligent dashboards powered by Grafana. Currently we track over 275 metrics with Grafana.

Learn how simple it is to set up alerts within Grafana and send them to a RudderStack Webhook Source which can then deliver the alert notice to downstream tools such as Email and Slack as well as tools like Data Dog and Pager Duty.

[Read the Blog](https://rudderstack.com/blog/distributing-alert-messages-from-grafana-with-webhooks)

Other happenings at RudderStack
-------------------------------

TechCrunch session: Data warehouse - the foundation of the modern data stack. Join our breakout session at TC Sessions: SaaS on October 27 to hear from a panel of industry leaders on why architectures are increasingly built around the data warehouse. *We have 100 free passes for the expo and breakout sessions. Click the link to grab one before they're gone!* [Register for free](https://events.bizzabo.com/316787?promo=rudderstackSocial) or [buy tickets here](https://techcrunch.com/events/tc-sessions-saas-2021/).

The Data Stack Show: Improving Data Quality Using Data Product SLAs with Egor Gryaznov of Bigeye. You don't want to miss this conversation about how data teams can apply principles from software development to increase data quality. [Listen](https://datastackshow.com/podcast/57-improving-data-quality-using-data-product-slas-with-egor-gryaznov-of-bigeye/)

Live Tech Session: The Modern Data Stack is Warehouse-first. On November 9th, we're hosting a live session with leaders from Snowflake, Mixpanel, and Mammoth Growth. They'll share how you can unlock your data's full potential by building your stack around the data warehouse. [Register for free](https://rudderstack.com/video-library/the-modern-data-stack-is-warehouse-first)