teleren/devto huggingface dataset:
#twiliohackathon #WeHelp - A platform made for everyone in the town (Submission)
Tags: twiliohackathon, node, vue
Published: 2020-04-29 16:19:48


## What I built

We help is a platform that connects local citizens and volunteers, with the goal of helping them getting necessary products from local markets with the help of volunteers

# How it works?
This application has the backend built in NodeJS using Sequelize as ORM Manager, ExpressJS as handle server for Twilio API, and Socket.IO as client handle server. The frontend is entirely built in VueJS, CSS and Bulma.

# How it works for the local citizens?
A local citizen can call the free phone number provided by local authority, and say his requirements, with some contact data like his name, street, etc. 2-3 volunteers would have to forward his requirements to the volunteers from the field, with, who have a local budget and maybe a car. The field volunteer will receive through SMS Volunteer Delivery System, the contact data (contact name, phone number) + a little description, and his mission would be to contact the local citizen and provide his requirements right to his door.


## Demo Link
[We Help](https://we-help-5b11d.web.app/)

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

## Link to Code
[Github Repo](https://github.com/GabrielLeonte/Dev.To-Hackathon)

# Test Account
Phone: +15014380799
Password: 1234

# Free USA Call Number (you may test it with skype)
Number: +18554101733

# Register Codes (Only USA Numbers)
`E6LS-CZQ6-17I2
S2LP-JJY9-14C9
A5YH-YKJ1-38G5
J3OP-PAW3-62V1
I7NV-TZI1-55H7
L1TE-DBP2-41B1
L1VZ-GYH5-43Y2
H9XL-YWK1-61Y8
D8CP-OCA6-14J8
K6IV-KDM3-29X9
D8HE-FAD4-77Y3
R8XV-MBF5-23T4
B1SU-GAQ1-42R4
K1AK-PFW6-82W3
U1VP-GMB1-57H5
C5UT-XDR5-74W4
M5TB-FMI3-32X6
V4AF-XCT7-88L8`

!Reset password may now work because the phone number may be in a wrong format or the Twilio api is replying a [21308 ERROR](https://www.twilio.com/docs/api/errors/21408)

## How I built it (what's the stack? did I run into issues or discover something new along the way?)

Well, actually twilio api was something new for me, and i can say that i am lucky. The last month was a productive one for me.

I've started from the idea that such a country like Romania, has a lot of small villages where a lot of population are 65+ years, so a platform like mine may be a essential one.

As a conclusion after 1 month, building this was not only a Hackathon project, it was a fun project, because while doing this i've experience so much things, from math homeworks to beautiful README fashion models 😆 
Just check my commits name [Right Here 😸](https://github.com/GabrielLeonte/Dev.To-Hackathon/commits/master)

## Additional Resources/Info
- [GitHub's repository template](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template) functionality
- [Ilustrations from Undraw.co](https://undraw.co/illustrations)
- [Bulma Framework](https://bulma.io/)
What is short-circuit evaluation?
Tags: javascript
Published: 2020-04-29 16:16:33

#Introduction
We all know about the different kinds of operators in Javascript. There's arithmetic, logical, relational, unary, ternary and so on. We also know what they do and when they should be used. Here I'm going to discuss some peculiar conditions using a few of these operators to see how they behave with other data types and more importantly about **short-circuit evaluation**


All logical expressions evaluate from left to right. The logical operators **&&** and **||** behave differently when dealing with values of different types. 
####&& operator
- When the value to the left of the **and** operator is evaluated to false, the condition returns false
- When the value to the left of the **and** operator is evaluated to true, it checks if the value to the right is true or false and accordingly provides a result.  

```javascript
console.log(NaN && 0)
//NaN
console.log(0 && NaN)
//0
console.log(NaN && null)
//NaN
console.log(null && NaN)
//null
console.log(1 && NaN)
//NaN
```
**Note:** 0, -0, NaN, null, undefined and ""(empty string) are considered as false in Javascript. 




####|| operator
**or** operator works the other way around.
- When the value to the left of the **or** operator evaluates to true, the operation returns true.
- When the value to the left of the **or** operator is evaluated to false, it checks if the value to the right is true or false and accordingly provides a result. 
```javascript
console.log("" || "user")
//user
console.log(null || "user")
//user
console.log("i"||"u")
//i
```
The above code shows an interesting way **or** works. The first value that evaluates to true is returned. 
The cases seen till now are all due to **short-circuit evaluation**. You can read more about it [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_Operators).



##Relational Operators
```javascript
console.log(2 < 3)
//true
console.log(10 < 2)
//false
```
This is how a typical relational operator(<,>,>=,<=, etc) works.
But what if we were to compare other data types like below.
```javascript
console.log("ant" < "Bat")
//false
console.log("Ant" < "Bat")
//true
```
Strings are compared from left to right. The ASCII representation of strings can be found [here] (https://www.w3schools.com/charsets/ref_html_ascii.asp). Lowercase letters are always greater than uppercase letters. So the code above is valid. 

##Summary
- Short-circuit evaluation handles logical operation with different data types
- **and** operator behaves in such a way that it returns the value which evaluates to false
- **or** operator behaves in such a way that it returns the value which evaluates to true
- Strings are compared from left to right depending on their ASCII value

That's it for this article. Hope you liked it and please leave your comments below. :)
Big data, mathematics, and social predictions, nowadays
Tags: psychology, bigdata, mathematics, dictatorship
Published: 2020-04-29 14:43:12

Hi, all.

Yes, maths are powerful. And we all are victims of it: 2 ears, 1 mouth, 2 eyes, 1 head, 1 gravity law,...

We cannot run from mathematics, because we are, **we are mathematics**.

Mathematics is an extension of logic, and so it is taught in the factories of the farm: (paid) universities *(because University should be Free, but humans are only rats)*.

**Even our thoughts, emotions and decisions are a mathematical product**. This, in philosophy, is called *determinism*. But in Science, it is an old law of the universe, probably the oldest one.

**Big data gives information about us, our habits, our decisions, our preferences, our actions, and how they evolve**. In the world of Big Data, you, your very center of the whole universe, are just a mere variable.

```js
delete variable;
```

We cannot run. And that information is closed to those who can afford it (, am I right, Mr. Zuckerberg?).

The current state of the world, and the current flow of information it has built along time, has stablished this scenario.

**We are just a *live* function to disassemble**. Strictly, this is how mathematical thinking see us. And it is, as usual, right. We are nothing but an encrypted function. That is why your brain is protected with a good bone structure: because of natural encryption.

**Human times**. Humanity is very busy trying to justify mutual slavism. Yes, there are good intentions. But human Economy (this is, the mathematization of natural and artificial resources) does not give a chance. We saw it in the last crysis, we can see it with the current crysis too. It prizes effectiveness, and damn, mathematics are too effective!

What if the effectiveness to anticipate masses behaviour is something real? What if it has been for centuries already? What if, with Big Data, the formula has been refinated, sophisticated, consolidated?

And what if the people that can afford the data to fill the formula, also are who know the formula?

Well, I will tell you what.

**Nothing**.

Because humans living in farms is real, but scabies with pleasure does not itch.
Shahaab Manzar: Tribute Page
Tags: codepen
Published: 2020-04-29 15:59:01

<h1>This is the first project to complete the Responsive Web Design course provided by freecodecamp.</h1>

<h2>I have taken help from the actual FCC: Tribute Page where necessary.</h2>

{% codepen https://codepen.io/shahaabmanzar/pen/qBOXdwJ %}
Emulate GeoLocation for Manual Testing
Tags: devtools, webdriverio, testing
Published: 2020-04-29 15:54:46

In a web world so advanced that it is almost mandatory to deliver unique *User Experiences* to unique *Customers Profiles*, we need to make sure our system behaves as expected under different circumstances, and those circumstances can be as simple as where my customers are located.


##Old fashion way!
One simple solution to test **Geo Location** features is to use a VPN provider that can easily transport us to almost anywhere in the world. But as simple as the solution looks like, it also comes with several constraints: Limited to the VPN provider location points and really hard to programmatically change location on demand, and of course the monetary cost of acquiring the service.


##Google Chrome DevTools to the rescue!
With google chrome devTools we can easily override the user current geo location and test our unique experience. Check it out [here](https://developers.google.com/web/tools/chrome-devtools/device-mode/geolocation).

###Let's try it out!

Once you have followed the previous link and know how to change the default location, let's make some tests around it.

1. Navigate to [https://www.where-am-i.net/](https://www.where-am-i.net/), and check the current location.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/hlwuoes9xg3w6ln4e64t.png)

2. Let's override the default user location to Berlin, and notice how the map is automatically updated.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/xfgrl1iq1sbgj6todadx.png)

3. Let's try one more time with a different city.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/be9ls4qjglteos5wvflt.png)

So far pretty awesome...

###Custom locations
We can basically add anywhere in the world as a custom location, as long as the timezone matches with the geo coordinates. 

Check [this list](https://cloud.google.com/dataprep/docs/html/Supported-Time-Zone-Values_66194188) to find the supported timezones.

1. First find a timezone you want to test. i.e. `America/Costa_Rica`.
2. Go to google maps and find the right coordinates. ..www.google.com/maps/place/San+Jos%C3%A9,+Costa+Rica/@**9.9314988,-84.0951252**,14.76z/data..
3. Then add everything as a new custom location on the Sensors window.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/qtjwt4a0f4r7czeuj9uk.png)


As simple as that you can know use your custom timezone.

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


## Final Thoughts
Geo Location testing just turned very simple with Google Chrome and devTools. Of course you are limited to this specific browser and I think that the use of a VPN will be a solid complement for this kind of testing.


Comment below what you do to test geo location features on your website, and any comments you have!!
37 minutes to test your next idea
Tags: showdev, tutorial, productivity, webdev
Published: 2020-04-29 15:53:08

👋 _If you like this article, you'll most likely find more useful content that [I share on Twitter](https://twitter.com/fenskexyz), so don't hesitate to give it a look._

A few days ago, I launched a coding interview prep tool I wrote about here on [Dev](https://dev.to/fenskexyz/solidifying-your-software-engineering-identity-2i34). 

One thing worth mentioning here is that I only spent about 37 minutes creating a setup that provided me with data I could use to decide if my idea was worth working on.

In this post, I'll describe exactly how I did it, and hopefully, you can re-use this setup to save your precious time.

### Step 1. Created a landing page on carrd.co - 5 minutes

Carrd has plenty of templates for different use cases, so you have the freedom to choose whatever you like the most. 

For CoreSkills Challenge I went for this template:

![My Template](https://dev-to-uploads.s3.amazonaws.com/i/p2ruigtdfqtzxjl8k94x.png)


### Step 2. Wrote down my value proposition - 15 minutes.
This one was probably the most crucial step as visitors would use it to understand whether the product resonates with them and if they want to subscribe.

Here's one for CoreSkills Challenge:
![Value Proposition](https://dev-to-uploads.s3.amazonaws.com/i/2q5pdxhkdv5ga5fxlfky.png)

### Step 3. Created an email list on [Email Octopus](https://emailoctopus.com) & configured Carrd to use it - 5 minutes.
As simple as that.

### Step 4. Created a welcome email campaign on [Email Octopus](https://emailoctopus.com) - 12 minutes.
The reason it took a few more minutes was that I needed to put down a few words in the welcome email. That's almost as important as the value proposition itself, with the only difference that I had more space to describe what the product was about.

### That's it! 🙌

Feel free to re-use this approach, and let's not waste time building products no-one will ever use. 🙏

And in case you know even a better way to achieve a similar result, I'd appreciate it if you mentioned it in the comments below.

Stay curious! ✌️
Setup Xdebug on WSL
Tags: wsl, xdebug, vscode
Published: 2020-04-29 14:18:42

How to setup xdebug in Windows Subsystem for Linux (WSL). Open your terminal and let's get cracking!

**1. Update pecl**
`sudo pecl channel-update pecl.php.net`

**2. Install xdebug**
`sudo pecl install xdebug`

**3. Find `xdebug.so`**
`cd /usr`
`find . -name xdebug.so`
In my case it was `/usr/lib/php/20180731/xdebug.so`

**4. Edit your `php.ini`**
Edit the `php.ini` file for the php version you are using. I had to edit `/etc/php/7.3/cli/php.ini` but you may be using a different version. If you are unsure, you can find out by running `php -i|grep 'php.ini'` in the terminal. That should show you where to find you active `php.ini` file. Now add the following lines to the end of that file:

```
[Xdebug]
zend_extension="/usr/lib/php/20180731/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=9000
```

But make sure you enter the correct path to `xdebug.so` specified in step 3. Choose another port if you feel like it.

**5. Setup VSCode**
If you are using VSCode like I do, this last step is for you. Inside your project folder, check if you have a folder `.vscode` that contains `launch.json`. If not, click the run button on the left panel. Then click on "create a launch.json file" and select "PHP". In case your project is located in your windows file system instead of your WSL file system - which is the case for me - make sure you add `pathMappings`.
```
"pathMappings": {
    "/mnt/<DRIVE>/<PATH_TO_PROJECT>": "<DRIVE>:\\<PATH_TO_PROJECT>"
},
```

In my case my `launch.json` looks like this:

```
{
  "version": "0.2.0",
    {
      "name": "Listen for XDebug on WSL",
      "type": "php",
      "request": "launch",
      "pathMappings": {
        "/mnt/c/infi": "C:\\Infi"
      },
      "port": 9000
    }
  ]
}
```
Make sure the port matches with the one you specified in step 4. Happy debugging!
Backing up Firebase project with Github Actions
Tags: devops, githubactions, firebase, backup
Published: 2020-04-29 15:38:05

Backups are really useless most of the time... until something goes wrong and you really need one. 

This article will help provide some easy to apply recipes to back up your Firebase project, in a single Github Action workflow.

To implement this workflow you will be needing 

 1. [Firebase token](https://firebase.google.com/docs/cli#cli-ci-systems) for CI/CD deployment.
 1. [Service account](https://support.google.com/a/answer/7378726?hl=en) that can access your Firebase project and storage buckets.

We will be making a snapshot backup that is being replaced for each run and another accumulative one that is adding every new
backup into an historical archive.

Make sure that your GCP project has a "backups bucket". It should be listed in your Google Cloud Platform Console, but not in the Firebase console. Replace `example` in the URL below to check and confirm.

https://console.cloud.google.com/storage/browser?project=example

If your project ID is `example`, then you should have a bucket called `example-backups`. 

The bucket is automatically created if you have already configured [Firebase Database automated backups](https://firebase.google.com/docs/database/backups) before. You can configure to switch them on right away to get two-for-one: both having the bucket generated and benefits of automated backups.

We will be using this bucket to store our own backups too.

### <project>/.github/workflows/backup-snapshot.yml
The schedule for your snapshot backups is up to you on how frequent you find it necessary. In this example we're making a nightly snapshot of the project.

{% gist https://gist.github.com/DennisAlund/b482824f7b199a4c1e9044b958ec88a8 %}

### <project>/.github/workflows/backup-archive.yml
The schedule for your archive backups is also up to your own needs, depending on how frequent you find it necessary. In this example we're making a monthly backup archive of the project.

{% gist https://gist.github.com/DennisAlund/da799bba6eacbf0ffeb968c8bdaa760d %}

### Finally
Sleep well knowing that your project is backed up on a regular basis.
Looking to work on a ReactJS Design-System
Tags: react, styledcomponents, css, javascript
Published: 2020-04-29 15:38:02

Hello Everyone, 
I am looking to work on a ReactJS Design System so that I can contribute to an open-source project and work the components directly to websites. So, if anyone of you is currently working on or are interested in working then please let me know so that we can make a great Open-source project out of it.
100daysofcode Flutter
Tags: 100daysofcode, flutter
Published: 2020-04-29 15:28:42

day 51/100 of #100daysofcode #Flutter
Learning Flutter , courses Udemy from
@maxedapps

Today learn http.get ,Future.delayed(Duration.zero), didChangeDependencies , for excecution initstate
https://github.com/triyono777/100-days-of-code/blob/master/log.md
April 29 — Daily CodeNewbie Check-in Thread
Tags: codenewbie, checkin, beginners, discuss
Published: 2020-04-29 15:23:57

---
title: April 29 — Daily CodeNewbie Check-in Thread
published: true
description: A daily thread to ask questions, share progress, and stay accountable!
tags: codenewbie, checkin, beginners, discuss
series: Daily Checkin
---

You are encouraged to use this daily thread to:
- Ask for help (all questions encouraged)
- Explore topics you’re curious about
- Share something you’ve written or read
- Celebrate your wins
- Stay accountable to your goals
- Support your fellow programmers

Happy Coding!

---

_Interested in joining the twice-weekly live [#CodeNewbie Twitter chats](https://twitter.com/search?q=codenewbie)?  You can find us [on Twitter](https://twitter.com/search?q=codenewbie) each Wednesday at 9pm ET (1am GMT on Thursday) and Sunday at 2pm ET (6pm GMT)!_
ERROR: Existing lock /var/run/yum.pid: another copy is running as pid <PID>
Tags: linux, processid, yum
Published: 2020-04-29 15:20:34

Existing lock /var/run/yum.pid: another copy is running as pid <PID>.
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: yum-cron
    Memory :  23 M *** (418 MB ***)
    Started: Wed Apr 29 <DATE> 2020 - 12:41 ago
    State  : Sleeping, pid: <PID>

Solution:
---------
$ yum list

[root@user bin]# yum list
Failed to set locale, defaulting to C
Existing lock /var/run/yum.pid: another copy is running as pid <PID>.
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: yum-cron
    Memory :  23 M *** (418 MB ***)
    Started: Wed Apr 29 <DATE> 2020 - 13:21 ago
    State  : Sleeping, pid: <PID>

Identify the PID from the above output.
State  : Sleeping, pid: <PID>

Now, Kill if it is a stale process to resolve this issue.
$ kill -9 <PID>
React, Axios and Redux: Asynchronously Fetch and Save Data to Local Storage (Excerpt)
Tags: react, javascript, redux
Published: 2020-04-29 15:19:31

---
title: React, Axios and Redux: Asynchronously Fetch and Save Data to Local Storage (Excerpt)
published: true
description: Learn to build an app with React, Axios, and Redux.
tags: react, javascript, redux
---


In this tutorial, we’ll learn about many of Redux concepts by creating a simple React application from scratch using React, Redux, and Axios to asynchronously fetch and save data to Local Storage.

The application we’ll be building is a simple JavaScript Jargon app that’s based on the Simplified JavaScript Jargon available from this repository. We’ll export the entries as JSON data and we’ll consume it from our React application using Axios. The state will be handled by Redux.

For our demo application, We created a statically generated JSON API from the Simplified JavaScript Jargon GitHub repository.

Note: If you are consuming any other resource, make sure you have CORS enabled so the browser doesn’t disallow reading the remote resource due to the Same Origin Policy.

The app will also include a favorites page where you can add and delete your favorite JS terms from the jargon.

These are the steps of our tutorial:

- Step 1 — Installing Create-React-App & Initializing a React Application
- Step 2 — Installing Axios, Redux, React-redux and Redux-thunk
- Step 3 — Creating Redux Actions
- Step 4 — Creating Redux Reducers
- Step 5 — Creating the Redux Store
- Step 6 — Creating the React Component
- Step 7 — Saving Data to Local Storage

## Introduction

Redux is an implementation of the Flux pattern - An application architecture for building user interfaces that are created and used by Facebook.

Redux is a library for managing the state of your application which is usually used with React, but it can also be used with other libraries and frameworks. It works by using a global state store common between all the components of the application.

## Why Using Redux?

Redux is a good solution for medium and large apps that can help you handle complex state management requirements. But it’s not needed in every use case.

For example, if you have components with many children and you want to pass state down the children tree, you can use the React Context API for accessing state in any component at any level without passing state to components that don’t actually need it just because it’s needed by a child component.

For more information, read You Might Not Need Redux by Dan Abramov, the creator of Redux.

## Prerequisites

We will need a few prerequisites for this tutorial, such as:

- A recent version of Node.js and NPM installed on your system,
- Knowledge of the essential concepts of modern JavaScript and React.

If you have the previous prerequisites, let’s get started with the first step where we’ll install the create-react-app utility and create a React app.

[Read the full article](https://www.ahmedbouchefra.com/react-axios-redux-asynchronously-fetch-save-data-local-storage/) 👈