teleren/devto huggingface dataset:
Who am I?
Tags: test
Published: 2020-04-30 16:05:23

---
title: Who am I?
published: true
description: This is just an introduction of myself, just writing this to waste some time doing something new.
tags: test
---

Hi, I'm Recson! You can call me Son (mostly people that do know me, calls me with that name, strange right? They're not my parents. jk.) So what do we have here is not something worth reading so you can close this blog post right now.. nope.. just kidding.. I'm writing this blog post to share who I am, what I do, what my dreams are, who I am in the next 5 years of my life.
The Shebang #!
Published: 2020-04-27 01:15:22

Lets assume you have a Ruby file ./program with the following line of code:

```puts 'hello world'```

If you run ./program in your terminal, your computer would be agnostic to what type of program you are trying to run. For your computer ./program might be a Bash script, Perl, Python, or an actual binary executable. This is when shebangs become relevant. 

For the terminal, the *shebang* acts as a hint on how to execute a file if you don't explicitly tell your computer what to use to execute such file. For example, if you run ruby ./program, you are explicitly telling your computer to use ruby to run your program, but if you simply run ./program, your computer would know to use ruby as the interpreter *if your program includes a shebang.* 

```Tip: Note that having a shebang at the beginning of your file would not affect the program itself.```

**So what is a shebang?!**

This character sequence is called a shebang: ``` #! ``` and it is used to tell a Unix-like operating system (such as OS X or Linux) which interpreter to use to parse or execute a file. 

A **#! (shebang)** is followed by an interpreter directive path, which specifies the program to be run.

See below the structure of a shebang interpreter directive:

``#![path to your interpreter directive] argument```

Note that your shebang interpreter directive should be the first line of your script.

There are 2 ways to use the shebang directive and set the interpreter:
1) Using the absolute path 
2) Using the env directive

Here is an example using an absolute path:

```#!usr/bin/python```

In this example, your computer would execute the file using python.

Here is an example using the env directive:

```#!/usr/bin/env ruby```

In this example the **env** command would locate the path to the ruby interpreter by itself, whether it is located in the /usr/bin/directory, or somewhere else, you would not need to find the absolute path by yourself, instead the env program would figure it out at runtime.

`Tip: Using the env command makes your program more portable.`
How to set Git for multiple GitHub accounts
Tags: git, github
Published: 2020-04-30 15:57:43

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/oel4yhy4ubilnw54t7mi.jpg)

Let's say we have GitHub `org` with `team` of 2 members (`member1`, `member2`) having `Write` access to a `repo` with URL of `https://github.com/org/repo.git`

We are going to setup Git (repository and global options) on macOS to be able to commit to the `repo` using the above GitHub user accounts including different network authentication

* Configure macOS system credential helper
```bash
git config --system credential.helper osxkeychain
git config --system credential.usehttppath true
```

* Remove user personal name and email from system configuration
```bash
git config --system --unset user.name
git config --system --unset user.email
```

* Setup `member1` account
```bash
login member1
```

* Get repo
```bash
mkdir -p ~/projects
cd ~/projects
git clone https://github.com/org/repo.git
cd repo
```

* Setup user personal name and email
```bash
git config user.name member1
git config user.email member1@email.io
```

* Setup authentication credentials
```bash
git config credential.username member1
```

* Repeat the above steps for `member2` account

```bash
login member2
```

* Get repo
```bash
mkdir -p ~/projects
cd ~/projects
git clone https://github.com/org/repo.git
cd repo
```

* Setup user personal name and email
```bash
git config user.name member2
git config user.email member2@email.io
```

* Setup authentication credentials
```bash
git config credential.username member2
```

Now user names, emails, and credential names are stored in the corresponding repo's `.git/config` and will be used by Git to push commits to GitHub on behalf of the corresponding users

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/e0q3tkukfav7gvrvood9.jpg)
Opinions on hidden menus. Yay? Nay?
Tags: ux, webdev, design, discuss
Published: 2020-04-30 15:51:36

Hiding the main menu within a hamburger or similar is relatively commonplace on the web these days. You generally see it on modern sites or sites that are targeting a younger demographic. 

***The question is, does hiding the menu degrade the user experience?*** I get asked this question regularly, and my answer is, it doesn't hurt UX at all. We've had enough exposure to this concept that I believe that ***most*** users will grasp this kind of functionality.

When I did a quick search on the internet for opinions, I didn't find much, but I did get a sense that people are split 50/50. What I did discover was this [study](https://www.nngroup.com/articles/hamburger-menus/), which was written in 2016. 

The benefits of hiding the menu are purely aesthetic. It's also important to note that if you were to hide the menu in any sort of way you should provide alternatives for navigation, for instance, placing top tier pages as links in the footer and linking to content via the body.

So, ***Yay?*** or ***Nay?***
RxJs switchMap Operator
Tags: javascript, rxjs, frontend, webdev
Published: 2020-04-30 15:45:09

Hello everyone 👋, I hope you're doing great.

Every RxJs developer should know about this operator.

##switchMap
Consider typeahead functionality. Whenever a user enters something we will make calls for each keypress event. Ofcourse, we can use debounce and throttling methods to reduce unnecessary function calls. 

Let's say you want to search for Canada. Without rxjs the functionality would be like calling 6 times XHR request. Ideally, we don't want to bother response for the first 5 calls. We want a response only for the 6th call. That achievement would make a great developer. Let's do that.

Add an event listener to the input element and pipe it with switchMap operator.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/hzv0v8555yqb9uazfkm3.png)

**Note: getCountry method should return Observable**

Basically observables should be subscribed. Only then it invokes. SwitchMap will subscribe inner function and here it is subscribing getCountry method.

Tada!!!

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/fs5t2gk1msuqvvm6nrqb.png)
If you observe the above image, all the requests got cancelled except last one. 

_According to official docs, switchMap defines_
**Projects each source value to an Observable which is merged in the output Observable, emitting values only from the most recently projected Observable.**


Thanks for your time✌️
Bug reporting for watchOS apps
Tags: watchos, ios, objectivec, swift
Published: 2020-04-30 15:42:01

Finotes has released a framework for watchOS to detect bugs. It finds bugs like NSException based crashes, API issues, high memory usage and more. The framework is available for both iOS and objective C.

https://www.blog.finotes.com/post/how-to-detect-bugs-in-watchos-apps
ShareMyOffer-Twilio Hackathon
Tags: twiliohackathon, github
Published: 2020-04-30 15:37:58

# ShareMyOffer


## What we built

ShareMyOffer is a web application that allows users to post offers that they come across and connect with others to grab the offer by sharing the discount.

#### Category Submission:
Exciting X-Factors

##Link to code
[Git Repository](https://github.com/NeerajaGoli/ShareMyOffer)

## How it works

- Provision to post the offers.
- Simple search for the list of offers based on location.
- Provision to shop in groups and avail exciting offers.



## Features

- Share offers with others through posts.
- Connect with people around and shop with them.
- Simple UI to view list of available offers.



## TechStack 

- Back-End : Spring boot
- Front-End : Thymeleaf, HTML, CSS, JavaScript
- Database : MySQL
- Notifications : Twilio SMS API

## Future Enhancements
- Implement chat feature to connect with other users
GrayLog parou após disco cheio?
Tags: graylog, elasticsearch
Published: 2020-04-30 15:36:53

Se você tiver um problema com disco cheio no servidor, precisará reativar o modo de escrita do elasticSearch pois ele ficará parado até que isso seja feito.

No meu caso, este problema ocasionou no stop completo do `GrayLog`. Se você tiver o mesmo problema, basta realizar a seguinte chamada para seu servidor do Elastic.

```
curl -XPUT -H "Content-Type: application/json" https://SEU_ELASTIC:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'
```

Para identificar esse problema no Graylog, acessei a tela de falhas dos índices `http://GRAYLOG:9000/system/indices/failures`.

E lá tinha uma lista de mensagens como esta:

`{"type":"cluster_block_exception","reason":"blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"}`

![Tela de Erros de Indice do Graylog](https://dev-to-uploads.s3.amazonaws.com/i/851afjbxmyz58rf20i25.png)
How to prepare Raspberry Pi for Docker Swarm
Tags: docker, raspberrypi
Published: 2020-04-30 15:36:20

## Swarm Cluster

### Introduction

With the release of the **Raspberry Pi 4B** using the board to run container orchestrators
like **Kubernetes** and **Docker Swarm** is a viable option both a learning platform but also
as a low power development lab. In this series we will build a Swarm cluster on those little boards.

### Components

* x3 Raspberry Pi 4B
* x3 SD Cards
* x3 External Storage ***optional***

### OS Prepare

We will use the **hypriotOS** a lightweight arm distribution optimized for docker engine with some cool
features like cloud-init and a nice flash tool which we will use.

```bash
curl -LO https://github.com/hypriot/flash/releases/download/2.5.0/flash
chmod +x flash
sudo mv flash /usr/local/bin/flash
```

Then download the latest hypriot.img

```bash
wget https://github.com/hypriot/image-builder-rpi/releases/tag/v1.11.5
```

#### Cloud-Init

A convenient configuration tool mostly used in cloud environment.  
Below is a template you can find the vars you should change with `"{{ var_name }}"` useful for ansible 😉

```yaml
hostname: " {{ your_hostname}} "
manage_etc_hosts: true

users:
  - name: " {{ your_user }} "
    gecos: "Swarm Admin"
    sudo: ALL=(ALL) NOPASSWD:ALL
    shell: /bin/bash
    groups: users,docker,video,input
    lock_passwd: true
    ssh_authorized_keys:
      - ssh-rsa "{{ your_pub_key }}"

runcmd:
  # Pickup the hostname changes
  - 'systemctl restart avahi-daemon'
```

Flash the img to each sd card better to use different hostname for each

```bash
flash -u cloud-init.yml hypriotos-rpi-v1.11.5.img.zip
```

Choose your sd card in the prompt and let it flash it!  
ssh to your pi with your rsa-key and you are ready for the final configurations.

#### Docker Engine optimize

Although you can run everything in the sd card and work perfectly fine the docker-engine
performs some heavy writing and *sd cards are slow bricks* so we will use the external drives
to mount the `/var/lib/docker` path to them and improve the performance and our sd cards lifetime.

Find your disk with `lsblk` and modify your `/etc/fstab` file similar to this:

```bash
cat /etc/fstab

/dev/sda1 /var/lib/docker ext4 defaults,auto,nofail,noatime 0 0
```

Now all your docker related data will be stored in the external disk improving the performance.

### Why Swarm

It's clear Kubernetes won the orchestrator war and is a much for feature complete proposition but also
a more complex one. Swarm is much easier to begin especially when you are just starting to learn about
Docker and Container Orchestration.

## Conclusion

That's it your raspberries are ready with a lightweight os with docker-runtime ready to create a small
cluster. We will continue the series with creating the cluster start running swarm `services` and `stacks`
on it.

Check how to deploy your Docker Swarm [***How to deploy Docker Swarm in Raspberry Pi Cluster***][backlink_01]

[backlink_01]: https://clusterstacks.codes/how-to-deploy-docker-swarm-in-raspberry-pi-cluster/
🔍 Find Your Outdated VSCode Extensions
Tags: vscode, extensions, microsoft, editor
Published: 2020-04-30 15:23:06

{% youtube nYnTT59rgOk %}

If you are like me & use VSCode as your code editor, you might then want to learn some tips & tricks about it. There is an awesome [course](https://vscode.pro/) on VSCode just for this, which at the end of it, turns you into a VSCode power user. ⚡️

Staying up-to-date with everything has become crucial nowadays whether it's your OS, a CLI, or your VSCode extensions. In this piece, I am going to show you guys an easy way to check your outdated VSCode extensions so you can then update them. Now without further ado, let's jump right in! 🙌🏻

## 👨🏻‍💻 VSCode Outdated Extensions

Follow the steps below to see your outdated extensions.

- 🚀 STEP #1: Launch your VSCode
- 📦 STEP #2: Open Extension's Area located at the sidebar.
- ✍️ STEP #3: Write `@outdated` in the extension search box.

Once you are through these steps, you will see a list of your outdated VSCode Extensions, if there are any. If there isn't, you will get the message of `No extensions found`.

![VSCode outdated extensions](https://i.imgur.com/q3xg8WL.png)

That's it for today, folks! If you have found this piece useful then please hit the like button. If you have any questions, just drop them in the comment section below. Till then, cheerios! 🤞
Building a developer program from scratch
Tags: devrel, podcast
Published: 2020-04-30 15:16:25

**Trick questions of the week:**
*How do you start building a developer program from zero?*

Talking about a challenge! In our previous episodes we covered how you can engage developers, become more inclusive and diverse, scale your program and educate developers. All these suggest that there is a developer program in place already. How can you do all these things, if you don’t?

You’ll need to build one. Sounds like a huge endeavour. It’s not something that can be done overnight, but we are here to help. In this episode we discuss:

- Where you should start
- What you prioritise
- What you will need
- What challenges to expect

And a step-by-step walkthrough from our guest who within 1+ year managed to build a developer program and results show that he did well. Luke Kilpatrick, Senior Manager - Developer Marketing at Nutanix and the only author of “[Developer Marketing + Relations: The Essential Guide] (https://www.devrelx.com/book?utm_source=LukeKilpatrick&utm_medium=devro_article&utm_campaign=Podcast)” to contribute two chapters, shares in this episode the story of how he built a developer program from scratch.

An insightful episode, rich with useful information for everyone, with or without a developer program. [Listen here] (https://www.devrelx.com/podcast/episode/1aeac3a7/building-a-developer-program-from-scratch-with-luke-kilpatrick?utm_source=LukeKilpatrick&utm_medium=devro_article&utm_campaign=Podcast)

**Luke Kilpatrick** *started as web site developer in 1996, transitioning to managing technology communities in 2007. In 2010 Luke moved to marketing program management as his full time role on VMware's social media marketing team. 2012 saw Luke at Sencha working in developer relations programs as well as focused social media, speaking at events around the world. Since 2014 Luke managed Atlassian’s ecosystem developer events and programs bringing hundreds of new apps to their marketplace. Recently Luke has joined Nutanix to bring an engaging experience to developers using their new PaaS products.* 

This was originally published at [DevRelx] (https://www.devrelx.com/post/how-do-you-start-building-a-developer-program-from-scratch?utm_source=LukeKilpatrick&utm_medium=devro_article&utm_campaign=Podcast).

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/uycpohkkfyy82y3f2c2o.png)
Flat Pricing Table In Bootstrap 4
Tags: css, html, beginners, webdev
Published: 2020-04-30 15:14:37

Flat design is most important nowadays to attract the user’s on your website. So here we design Flat Pricing Table In Bootstrap 4 with some CSS properties.

In this element, we used a bootstrap grid and Html tags. Here we used a custom button and also modify bootstrap 4 classes. This is fully responsive to mobile and tablet views.

Make it yours now by using it, downloading it, and please share it. we will design more elements for you.

[Download Source code](https://w3hubs.com/flat-pricing-table-in-bootstrap-4)
Twilio Hackathon - Final Day Pt2
Tags: twiliohackathon
Published: 2020-04-30 15:13:27

[Comment]: Well, the video API is now working. The only issue that I've run into is that Twilio/Chrome doesn't like me serving the video chat over http (since I'm running node on my machine and not my server for development). 

#### What I built
An Omegle type product for first and second-degree friends in order to facilitate more spontaneous conversations 

#### Category Submission: 
Covid19 Communications

#### How I built it (what's the stack? did I run into issues or discover something new along the way?)
- Firebase Auth
- Firebase DB
- Twilio Video
- React & Material UI
- Python & Flask for Video API
Html Entities 😄😍💗🌺
Tags: html, webdev
Published: 2020-04-30 15:13:01

An HTML entity is a piece of text ("string") that begins with an ampersand ( & ) and ends with a semicolon ( ; ) . Entities are frequently used to display reserved characters (which would otherwise be interpreted as HTML code), and invisible characters (like non-breaking spaces).
HTML entities give different varieties of characters which helps to assign icons, mathematical operators and even geometric complex shapes.
#EXAMPLES
<h2>Currency Symbol:</h2>
```
<ul>
<li>&#8358;</li>
<li>&#8364;</li>
<li>&#163;</li>
<li>&#165;</li>
<li>&#8486;</li>
</ul>
```
Results:
-₦
-€
-£
-¥
-Ω
<h2>Some Cool emojis:</h2>
```
<ul>
<li>&#128525;</li>
<li>&#128677;</li>
<li>&#129505;</li>
<li>&#128540;</li>
<li>&#129334;</li>
</ul>
```
Results:
-😍
-🚥
-🧡
-😜
-🤶
#important link:
[Read More](https://www.w3schools.com/html/html_entities.asp)
Embedding React project to Wordpress
Tags: react, wordpress
Published: 2020-04-30 15:01:59

I am going to build a simple project with React.js +Wordpress.
The frontend will be built with React.js and the data will be saved in Wordpress as post.

I just want to know if it is possible to Reacts.js to Wordpress.
  It is like emdbeding React.js to Laravel

Thanks
Range Over Ticker In Go With Immediate First Tick
Tags: engineering, go, programming, tutorial
Published: 2020-04-30 15:04:20

---
title: Range Over Ticker In Go With Immediate First Tick
published: true
date: 2020-04-30 15:01:44 UTC
tags: Engineering,Golang,Programming,Tutorial
canonical_url: https://qvault.io/2020/04/30/range-over-ticker-in-go-with-immediate-first-tick/
---

![](https://qvault.io/wp-content/uploads/2020/04/Profile_-_Tick_Toc_Croc.jpg)

The Go standard library has a really cool type – [Ticker](https://gobyexample.com/tickers). Tickers are used when you want to do something at a regular interval, similar to JavaScript’s [setInterval](https://www.w3schools.com/jsref/met_win_setinterval.asp). Here’s an example:

```go
package main

import (
	"fmt"
	"time"
)

func main() {
	ticker := time.NewTicker(time.Second)
	go func() {
		for range ticker.C {
			fmt.Println("Tick")
		}
	}()

	time.Sleep(time.Second * 4)
	ticker.Stop()
	fmt.Println("Ticker stopped")
}
```

As per the [docs](https://golang.org/pkg/time/#Ticker), a ticker is a struct that holds a receive-only channel of time.Time objects.

```go
type Ticker struct {
    C <-chan Time // The channel on which the ticks are delivered.
}
```

In the example at the beginning of the article, you will notice by running the program that the first tick sent over the channel happens **after** the first interval of time has elapsed. As such, if you are trying to build, for example, a rate limiter, it can be inconvenient because to get the first immediate execution, it would seem your best option is:

```go
func doSomethingWithRateLimit() {
	ticker := time.NewTicker(time.Second)
	doSomething()
	for range ticker.C {
		doSomething()
	}
}
```

There is in fact a better option!

In go, a channel can also be iterated over in a normal for-loop, so our solution is to build a for loop that executes automatically on the first iteration, then waits for each subsequent loop.

```go
package main

import (
	"fmt"
	"time"
)

func main() {
	ticker := time.NewTicker(time.Minute)
	for ; true; <-ticker.C {
		fmt.Println("hi")
	}
}
```

Hopefully this helps keep redundant code out of your projects!

## Thanks For Reading

Hit me up on twitter [@wagslane](https://twitter.com/wagslane) if you have any questions or comments.

Follow me on Dev.to: [wagslane](https://dev.to/wagslane)

The post [Range Over Ticker In Go With Immediate First Tick](https://qvault.io/2020/04/30/range-over-ticker-in-go-with-immediate-first-tick/) appeared first on [Qvault](https://qvault.io).
Calling out developers for help fighting COVID-19
Tags: webdev, help, css, html
Published: 2020-04-30 14:50:45

Hey all, I am Rohith Gilla from [CovIndia](https://covindia.com/). We are creating really amazing impact in the society, our data is one of the most reliable. 
Our data is being used by the World Bank, many researchers around the world.

Now we want to improve analytics, UI of the web app.
So we are calling out devs to help us. The whole website is [Open Source](https://github.com/covindia/CovIndia-Website/).

If you want to contribute back to society with the skills you have please watch out for the [issues](https://github.com/covindia/CovIndia-Website/issues) and please feel free to create a PR :)

The technology stack we use is basic HTML, CSS and Vanilla Javascript.
We use [ChartJS](https://www.chartjs.org/) for charting, [Netlify](https://app.netlify.com/) for CI/CD of the web application.

Once we are done with issues, we also have plans to create a world stats, you can check out here with the [basic prototype](https://world.covindia.com/) we made. There is so much cool, amazing things to code, it would be really a great learning experience.

Peace ✌🏻,
Rohith Gilla
Twilio Texts (Twilio Hackathon submission)
Tags: twiliohackathon
Published: 2020-04-30 14:38:33

[Comment]: # (All of this is placeholder text. Use this format or any other format of your choosing to best describe your project.)

[Reminder]: # (Make sure you've submitted the Twilio CodeExchange agreement: https://ahoy.twilio.com/code-exchange-community)

[Important]: # (By making a submission, you agree to the competition's terms: https://www.twilio.com/legal/twilio-dev-hackathon-terms)


## What I built
#### Category Submission: 
COVID-19 Communications

## Demo Link
 n/a don't have a server :(

## Link to Code
https://github.com/hdimitrov1/twilio-tic-tac-toe

## How I built it

The stack is JavaScript/NodeJS, Twilio and express. Uses text messages for all communication


## Additional Resources/Info
Algolia is OUT! Elasticsearch is IN!
Tags: elasticsearch, changelog
Published: 2020-04-30 14:26:21

With the merging of the below PR, DEV no longer requires Algolia to run!

{% github https://github.com/thepracticaldev/dev.to/pull/7577 %}

This is a huge step forward for our community because it means that those contributing no longer have to sign up for an Algolia account. Instead, contributors can simply download the open-source software from Elastic when they are setting up their development environments. 

For more information on how DEV uses Elasticsearch, [checkout our new docs page](https://docs.dev.to/backend/elasticsearch/).

Happy coding!