teleren/devto huggingface dataset:
So What Is That Bookmark Emoji Actually For
Tags: devto, emoji, reaction
Published: 2019-02-15 05:26:03

---
title: So What Is That Bookmark Emoji Actually For
published: true
description: I found lots of people asking what the bookmark emoji means. Many said well it kind of show your love to the author. Instaed of replying to some comments, i made this post!
tags: dev.to, emoji, reaction
---

I found lots of people asking what the bookmark emoji means. Many said well it kind of show your love to the author. Instaed of replying to some comments, i made this post!

## What Observation Tells Us

Well that is the bookmark emoji

![alt text](https://thepracticaldev.s3.amazonaws.com/i/g4of2iqg5po4m6euiifv.png)

Now we see a similar icon on the homepage

![alt text](https://thepracticaldev.s3.amazonaws.com/i/qyfze2i79bsojuku8fa6.png)

It says saved list, when we click we see some articles

![alt text](https://thepracticaldev.s3.amazonaws.com/i/4t2tbp42pouyfis37vdv.png)

Now when we go to the article, we see two reactions:

![alt text](https://thepracticaldev.s3.amazonaws.com/i/e4oj2hrsw3p4jj5kzv8w.png)

## Building Our Hypothesis

Because of the similar emojis and it being present on the article in question, i dared say that this emoji saves posts

## Testing Our Hypotesis

Let us bookmark a new post and see the effect

![alt text](https://thepracticaldev.s3.amazonaws.com/i/1b7mse3qq2cn1nf7420i.png)

Going to the homepage we see the number of saved articles increased to two

![alt text](https://thepracticaldev.s3.amazonaws.com/i/ddt22dn4t2tvxqtxx59o.png)

When we finally check we see the bookmarked article in the saved list

![alt text](https://thepracticaldev.s3.amazonaws.com/i/9znaa0kpz2skxdb6w027.png)

## An Observation and Thorough Testing

We see save being written on our article

![alt text](https://thepracticaldev.s3.amazonaws.com/i/7sndjlix6q8fq65m2rop.png)

if we click it, it returns to save, i.e. the post goes out of our saved list

![alt text](https://thepracticaldev.s3.amazonaws.com/i/0d2w8wa56cwd0fd87umw.png)

if we check the article, the bookmark emoji is unselected

![alt text](https://thepracticaldev.s3.amazonaws.com/i/in2seb3xbl29gpv5fmhp.png)

## Conclusion

The bookmark emoji saves your post for further reading, btw what is that unicorn icon for? I wonder ...
Vue Unicons for developers
Tags: vue, icons, githunt
Published: 2019-02-15 05:06:55

---
title: Vue Unicons for developers
published: true
description: Vue Unicons for developers
tags: vue, icons, githunt
---

After while I developed vue-unicons, I myself began to use them. I came to the conclusion that it’s not very convenient to add icons to the project, yes, I had previously developed a way to copy the finished tag by clicking on the button, but as it turned out it only works when you need a couple of icons, if you need a lot, then this method is already tiring.

Nothing improves the product like the beginning of its use 😀

I decided to do something like a basket, where you can add the necessary icons, and then go into it and get the installation code ready.


![](https://thepracticaldev.s3.amazonaws.com/i/9f75g8t72g9m6l56jnwe.gif)

https://antonreshetov.github.io/vue-unicons/

Enjoy!
TIL:When n + 1 == n in python?
Tags: python, toolargenumber, todayilearned
Published: 2019-02-15 03:48:15

---
title: TIL:When n + 1 == n in python?
published: true
description: When n + 1 is equal to n
tags: python, too large number, todayilearned
---

Today I was looking to python docs for [doctest](https://docs.python.org/3/library/doctest.html) and found following 

```python
if n+1 == n:  # catch a value like 1e300
    raise OverflowError("n too large")
```

Immediately I opened the shell and try it:

```python
>>> from math import exp
>>> n = exp(300)
>>> n
1.9424263952412558e+130
>>> n + 1 == n
True
```

TIL `n+1 == n`! and how to guard against a **ridiculously large number**
BASH : NAVIGATING THE FILESYSTEM
Tags: bash, linux
Published: 2019-02-15 02:44:38

---
title: BASH : NAVIGATING THE FILESYSTEM
published: true
description: navigate around the file system using bash commands
tags: Bash, Linux
---

This post was originally published on my blog, find original post [here](https://santhoshkumarr0.github.io/posts/bash-navigating-the-filesystem/)


We'll see about how we can navigate around the file system using bash commands.

First thing, we need to know is where we are in the file system.
We call that directory as current directory or working directory.

To find out the working directory, we can use <code>pwd</code> command.

```shell
santhosh@ubuntu:~$ pwd
/home/santhosh
```

> Full form of <code>pwd</code> is Print Working Directory .
> Lot of bash commands are abbreviations. So it is easy to remember.

we can see the  files and folders are under the current directory by using the <code>ls</code> command.

```shell
santhosh@ubuntu-18-04:~$ ls 
Dev     Documents    Downloads
```

> <code>ls</code> is short for list.

We can also provide arguments to bash commands which makes it more powerfull.

to see the hidden files, use <code>ls -a</code>

```shell
santhosh@ubuntu-18-04:~$ ls -a
Dev     Documents   Downloads .bash_history  
```

> Refer the manual of <code>ls</code> for more arguments

We can move around the system using <code>cd</code> command.

```shell
santhosh@ubuntu-18-04:~$ cd Documents
santhosh@ubuntu-18-04:~/Documents$ _
```

To move to parent directory 

```shell
santhosh@ubuntu-18-04:~/Documents$ cd ..
santhosh@ubuntu-18-04:~$ _
```

> <code>..</code>(double dot) is reference to the parent directory.

> <code>.</code>(single dot) is reference to the current directory.

> <code>~</code> is reference to the home directory.

> <code>/</code> is reference to the root directory.

if we run <code>cd</code> command without any argument, we will move to the home directory irrespective of working directory.

> Command line  can autocomplete our command and paths with <code>tab</code> key. You can try it yourself.
Abstract Factory Design pattern [creational]
Tags: blog, designpattern, designpatterns, programming
Published: 2019-02-18 18:13:27

---
title: Abstract Factory Design pattern [creational]
published: true
tags: blog,Design Pattern,Design Patterns,programming
canonical_url: https://itscoderslife.wordpress.com/2019/02/15/abstract-factory-design-pattern-creational/
---

The motivation behind using the abstract factory design pattern is to create objects which belong to a group but inherit from several different base classes or implement different protocols.

- The actual classes which are used to create the objects remained hidden, which lets us modify the factory without having to refactor the caller’s code.
- The abstract factory design pattern should be applied when you need to create a set of related objects.
- The approach makes it possible to change the factory classes without modifying the callers. 
- To create single objects, choose the factory method pattern instead.

> The abstract factory pattern is same a factory pattern but it hides the classes involved in the creation process

The abstract factory defines a method that will return an implementation of a factory protocol or a factory base class. The concrete implementation class is selected, which is a class that implements the factory method design pattern.

**Example** :

- A Computer Store – user or store vendor will never know where and how parts are manufactured
- A car factory – Same applies here as the computer store

**Summary** : By hiding the concrete factories that are used to create the objects, this pattern allows us to modify the factories without affecting the caller. The abstract factory pattern should be used if we want to create a set of objects which are part of a group, but do not implement the same protocol or base class. The abstract factory defines a method that will return an implementation of a factory protocol or a factory base class. The concrete implementation class is selected, which is a class that implements the factory method design pattern. Finally, the factory method is invoked, and the required instance is created.
4 fast ways to run JavaScript
Tags: javascript, webdev, productivity
Published: 2019-02-14 21:31:34

---
title: 4 fast ways to run JavaScript
published: true
description: My 4 ways to run JavaScript experiments
tags: javascript, webdev, productivity
cover_image: https://thepracticaldev.s3.amazonaws.com/i/v2t1ow5epis8of55wtx6.png
canonical_url: https://maciek.cloud/4-fast-ways-to-run-javascript/
---



I like to learn new things.
When I experiment, I need a fast way to run a code snippet, do some debugging and figure out what is working and what is not.
Depending on the situation and mood 🌅 I switch between these setups:

## VSCode

Most of the time I will write the code in my code_notes repository.
I have the simplest VSCode configuration possible:

```json
{
  "type": "node",
  "request": "launch",
  "name": "single file",
  "program": "${file}"
}
```

With this config, VSCode will run currently opened file in the debugger.  
Just hit `F5` and look for the output in `DEBUG CONSOLE`.
Of course, you will have all the debugging goodies - read more [here](https://code.visualstudio.com/docs/editor/debugging)

## VSCode + Quokka.js

To have 'live reload' for code evaluation check out [Quokka.js](https://quokkajs.com/)

> Quokka.js is a rapid prototyping playground for JavaScript and TypeScript. It runs your code immediately as you type and displays various execution results in your code editor.

I use it when I am just starting out with an idea.
It really helps to understand what effect has each line of the code.

## Chrome Snippets

Sometimes the quickest way to run JavaScript is in Chrome directly.
![logTree](https://thepracticaldev.s3.amazonaws.com/i/lne5bhe3zrd57g513hz1.PNG)
Just open `Developer Tools`, switch to `Sources` tab and create a new code snippet. `Snippets` might be hidden under the `>>` icon.
Remember to wrap the code in `{}` to have a new local scope on each run.

## Python Tutor

![python tutor](https://thepracticaldev.s3.amazonaws.com/i/5qkkz9wdrlbhrqxlklps.PNG)
Don't be fooled by the name! It can run JavaScript also. And it even has a live mode too. 
The cool thing about this tool is that it visualizes what is happening at each step.
It's great for educational purposes.
[link](http://pythontutor.com/live.html#mode=edit)
Open question. Is it really possible to keep a big project code clean?
Tags: javascript, webdev, tips
Published: 2019-02-14 18:48:47

---
title: Open question. Is it really possible to keep a big project code clean?
published: true
description: Is it possible to keep a medium/big project code clean?
tags: javascript, webdev, tips
---

I've been coding for more than 15 years now. I've worked on many different technologies and tryied some different patterns. I always find struggling with the code when the project reach some level of complexity and size. No matter if using MVC, modules, components, event driven. At some points and as soon projects need evolution during the time, it gets messed up in some way. 

During the years I've seen that the more design at the beginning the longer it keeps neat, but at some point always get messed up in some way.

I don't mean totally uncontrolled code, or unreadable one, but it's hard to know what parts interacts with each other, what code is related in some manner to another one, ...I always find myself wanting to refactor the project almost from scratch.

I'd like to have an honest opionion from your experiences and if you **really** find a way to keep the things totally under control.

Is always design before already code the main reason to keep your code clean?

Did you find your tool/framework that **sincerely** allows you to keep it neater?

Thank you!
Writing HTML in a Gatsby Project
Tags: gatsby, react, beginners
Published: 2019-02-15 19:46:26

---
title: Writing HTML in a Gatsby Project
description: We take our first look at React and how to use it to split HTML markup into reusable components.
canonical_url: https://michaeluloth.com/gatsby-writing-html/
tags: gatsby, react, beginners
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/r4lahbedvqxuholh9c3s.png
series: Up & Running with Gatsby
published: true
---

This is the fourth video in our [beginner series](https://www.youtube.com/watch?v=jAa1wh5ATm0&list=PLHBEcHVSROXQQhXpNhmiVKKcw72Cc0V-U) exploring GatsbyJS and how to use it to easily build performant apps and websites.

In this video, we take our first look at React and how we can use it to split our HTML markup into reusable components.

Check out the video below or [view the entire playlist](https://www.youtube.com/watch?v=jAa1wh5ATm0&list=PLHBEcHVSROXQQhXpNhmiVKKcw72Cc0V-U) on YouTube.

Enjoy! 🎉📺

{% youtube MMFvFtpyoIQ %}

---

_Originally published at [michaeluloth.com](https://www.michaeluloth.com/writing-html-in-a-gatsby-project/)_
Theming Slack using a message
Published: 2022-05-09 13:59:10

---
title: Theming Slack using a message
published: true
date: 2019-02-15 00:00:00 UTC
tags: 
canonical_url: https://carl-topham.com//articles/slack-theme
---

The Slack (desktop) client allows you to create your own themes. But did you know that you can also set the theme via a message. Simply send a message with the contents being 8 comma separated hex codes. You don't have to send the message to anybody either - Just send it to yourself!

```
#DCDCDC,#ED6970,#ED6970,#FFFFFF,#FFFFFF,#291d1f,#1c7c5a,#3a4a8ff

```

These stand for the following elements:

- Sidebar & top bar background
- ????
- Highlighted channel background
- Highlighted channel text
- Highlighted channel background (hover)
- sidebar text
- Online indicators
- Message indicator

As soon as you send this to yourself a little button will appear giving you the ability to trigger a theme change.
Articles/Stories written by AI, do you think it is scary? 
Tags: discuss, ai, machinelearning
Published: 2019-02-14 22:48:46

---
title: Articles/Stories written by AI, do you think it is scary? 
published: true
tags: discuss, AI, Machine Learning
---


https://blog.openai.com/better-language-models/

I just read this blog post from Open AI, and the sample articles written by AI. I was like so impressed. The articles/stories feels thought out and well planned.  

Do the articles feel like they are written by human to you? 
What do you think?
Getting My Enterphone to Work with Nexmo and Webtask.io
Tags: serverless, webtask, nexmo, auth0
Published: 2019-02-14 21:15:35

---
title: Getting My Enterphone to Work with Nexmo and Webtask.io
published: true
description: When I moved to my new building, I needed a way to get my enterphone to work with my cell phone. This is how I made this work using Nexmo and Webtask.
tags: #serverless #webtask #nexmo #auth0
canonical_url: https://auth0.com/blog/getting-my-enterphone-to-work-with-nexmo-and-webtask/
---

I’ve recently moved to Toronto. Moving to the big city meant for me to move from a house into a condo tower. For the first time, I actually had an Enterphone to let my guests into the building.

I moved here from the Ottawa area, which meant that my old phone number is technically a long-distance call. Now I didn’t want to change my phone number because I have 2FA enabled on most of my web accounts that will let me use it. Long distance fees don’t really exist on cell phones anymore but the problem is that the system they use for the Enterphone in my building cannot dial long distance numbers.

Another limitation that the system had is that we can only have one entry in the system. While this is usually okay for most people, between my work as a technical evangelist and my wife who is a flight attendant, there are many times when there is only one of us at home.

With all of that in mind, our building manager suggested that we get a basic landline that we could use only for the Enterphone.

Sure, but what’s the fun in that?

[Read on ☎️](https://auth0.com/blog/getting-my-enterphone-to-work-with-nexmo-and-webtask/?utm_source=dev&utm_medium=sc&utm_campaign=enterphone_nexmo)

![Getting My Enterphone to Work with Nexmo and Webtask.io](https://thepracticaldev.s3.amazonaws.com/i/rr1pj1s20o9nqlidw21x.png)
I made a fetch-wrapper for making graphql api calls!
Tags: graphql, javascript, fetch, api
Published: 2019-02-14 20:41:56

---
title: I made a fetch-wrapper for making graphql api calls!
published: true
description: An overview of a fetch-wrapper for making simple graphql queries called jraph!
tags: graphql, javascript, fetch, api
---


The other day, I was playing around with GraphQL queries for a side-project that I'm building, when I realized that eventually - I'm gonna need to make calls to that API on the client-side. My first instinct was to look around for a way to do it using fetch, because I *love* the fetch API. However the way to do it using fetch is kinda gross, if I'm being honest. The first answer I found on stack overflow, showed it like this:

<small>note that, for the examples, an example API that I created is used</small>

```javascript

fetch('https://csb-xpwq1o2824-xravvsjkul.now.sh/', {
    method: "POST",
    body: JSON.stringify({query: "query {items{title}}"})
})

```

Now, that's pretty nasty-looking. You could make it better with some variables, maybe a template string, something like this:

```javascript
const url = "https://csb-xpwq1o2824-xravvsjkul.now.sh/";
const query = {
    query: `
        query{
            items{
                title
            }
        }
    `
}
const body = JSON.stringify(query);

fetch(url, {
    method: "POST",
    body
})

```

Now while that **may** look satisfying, it didn't feel like a healthy-enough balance between the feel of fetch, and graphql. So I created a function that did just that for me. I realized how useful this could be to other developers, so I wrapped it up in an npm module, and published it. I call it `jraph`, <strike>and it works like this</strike> and thanks to a comment from @qm3ster, it now works like this:

```javascript
import { jraph } from "jraph";

let jql = jraph("https://csb-xpwq1o2824-xravvsjkul.now.sh/");

(async () => {
    let result = await jql`{
      items{
        title
        info
      }
    }`
    console.log(result)

})();
```

If you like it, you can check it out on npm, [here](https://www.npmjs.com/package/jraph)!

Have a great day guys!
GitHub draft PRs are here!
Tags: discuss, git, github, news
Published: 2019-02-14 19:56:36

---
title: GitHub draft PRs are here! 
published: true
tags: discuss, git, github, news
canonical_url: https://www.iamdeveloper.com/posts/github-draft-prs-are-here--26aa/
cover_image: https://thepracticaldev.s3.amazonaws.com/i/b39jftkiva9vith3bew9.jpg
---

Photo by [EJ Yao](https://unsplash.com/photos/D46mXLsQRJw?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/search/photos/construction?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)

Gone or soon to be gone are the days of creating a PR and marking it as WIP or DON'T MERGE!

For galentine's, GitHub has given us Draft PRs

![Happy Galentine's](https://media.giphy.com/media/xUOwG3SLkvkEzSwZJC/giphy.gif)

{%twitter 1096093162345508864 %}

I think it's great. What are your thoughts on draft PRs?

![SNL Coffee Talk](https://media.giphy.com/media/l2SpQRuCQzY1RXHqM/giphy-downsized.gif)
Setting up a simple DNS server
Tags: linux, homelab, unix, beginners
Published: 2019-02-14 18:01:55

---
title: Setting up a simple DNS server
published: true
tags: linux, homelab, unix, beginners
---

Right after I’ve configured [the FTP server](https://dev.to/denisnutiu/installing-and-configuring-a-ftp-server-47fm), I wanted to be able to “name” my server and so I’ve installed a lightweight DNS server.

>“dnsmasq is a lightweight DNS, TFTP, PXE, router advertisement and DHCP server. It is intended to provide coupled DNS and DHCP service to a LAN.”

I’ve chosen this over the bind 9 dns server because it was very easy to setup, I almost got it right the first time.

To install and configure dnsmasq, you’d usually do the following:

```bash
# On Ubuntu
sudo apt-get install dnsmasq
sudo cp /etc/dnsmasq.conf /etc/dnsmasq.conf.orig
```

And override **/etc/dnsmasq.conf** with this configuration:

```conf
#/etc/dnsmasq.conf
domain-needed
bogus-priv

expand-hosts
 
# The address 192.168.0.176 is the static IP of this server 
# You can find this ip by running ifconfig and look for the 
# IP of the interface which is connected to the router.
listen-address=127.0.0.1
listen-address=192.168.0.176
bind-interfaces
 
# Use open source DNS servers
server=8.8.8.8
server=8.8.4.4
server=208.67.220.220
 
# Create custom 'domains'.
# Custom 'domains' can also be added in /etc/hosts
address=/busyserver.net/192.168.0.176
```

And that’s basically it.

You can check the status of dnsmasq server by running: `sudo systemctl status dnsmasq`.

To actually use the server and make your computer recognize your custom domains you need to tell your computers to use the IP of the server on which dnsmasq is installed, in my case it is 192.168.0.176.

Thank you for reading!

[Twitter](https://twitter.com/denisnutiu) | [DORefferal](https://m.do.co/c/22f012126c25)
Pro tip: Custom Search Engine Settings
Tags: protip, chrome
Published: 2019-02-14 16:52:51

---
title: Pro tip: Custom Search Engine Settings
published: true
description: Using custom search engines in chrome is invaluable.
tags: pro-tip,chrome
---

# [chrome://settings/searchEngines](chrome://settings/searchEngines)

This page is where you define your search engines.  So what?  Here's what you can do with them:

![Navigate AWS](https://thepracticaldev.s3.amazonaws.com/i/rvrrkfl782m2jsqza0wg.gif)

### My search engines

These are some of my most used custom search engines:

|Search Engine|Keyword|Query URL|
|---|---|---|
|aws|aws|https://console.aws.amazon.com/console/home?region=us-east-1|
|aws|aws|https://console.aws.amazon.com/%s|
|s3|s3|https://console.aws.amazon.com/s3/home?region=us-east-1|
|gist|gist|https://gist.github.com/search?utf8=%E2%9C%93&q=user%3Akyleparisi+%s|
|code|code|your repo host|
|wiki|wiki|your company wiki|
|jira|jira|your company jira|
|watch|watch|infrastructure monitoring|
|mail|mail|your email host|

Some websites will autogenerate search engines for chrome.  Most of them are too verbose for my liking.  In any case, have fun with them.

|Search Engine|Keyword|Query URL|
|---|---|---|
|rl|rl|https://www.twitch.tv/directory/game/Rocket%20League|
Change font and theme of WSL/Bash
Tags: wslbash
Published: 2019-02-14 13:50:17

---
title: Change font and theme of WSL/Bash
published: true
description: How to set the font and theme of the wsl bash on windows 10
tags: wsl bash
---

# Theme

As this [post](https://blogs.msdn.microsoft.com/commandline/2016/09/22/24-bit-color-in-the-windows-console/) pointed out, windows console supports 24bit color. Open a cmd.exe or ubuntu bash window, right click the title bar, select `Properties` and you are good to go.

Just for curiousness, this script(https://github.com/bitcrazed/24bit-color) can display color bar in your terminal for test.

## Color tool

In this [post](https://blogs.msdn.microsoft.com/commandline/2017/08/11/introducing-the-windows-console-colortool/), a color tool can help you quickly apply a `itemcolors` theme to your terminal.

## Tmux

Tmux now supports 256 colors, we can set colors like this:

```
# .tmux.conf
set -g status-fg colour255
```
Tips: You have to kill all other tmux sessions to see your changes. 

For full color name list, check [this] (https://unix.stackexchange.com/questions/105568/how-can-i-list-the-available-color-names) out.

# Font

Windows console are very nitpicking, we can only choose fonts designed for the current code page. The bash on ubuntu on windows uses utf8 code page, and the cmd.exe usually uses another code page. We can't change it permanently, that is very annony.

After a lot of dirty works, I still could not get it work, and finally this [font](https://github.com/be5invis/Sarasa-Gothic) comes to rescue, set it to cmd.exe and the wsl/bash separatelly.


Here is the screen shot.

![screenshot](https://thepracticaldev.s3.amazonaws.com/i/38q8mdssx3z8nwn46x54.png)