teleren/devto huggingface dataset:
JSNation Now Offers a Speaker Mentorship Program for Underrepresented Folks 
Published: 2020-01-10 13:21:30

When it comes to web development careers, not everybody gets the same start. 

Our aim for [JSNation 2020](https://jsnation.com) is not only to create a great lineup that includes people from diverse backgrounds, but also to provide an environment where they would feel welcome. We would like to help these JS developers overcome obstacles and injustices they face along their way to breaking through and becoming well-known professionals in the industry.

That's why we decided to start a speaker **mentorship program catering specifically to people from groups that are underrepresented in tech**. That includes but is not limited to:
- women
- people of color
- LGBT+ folks
- people with disabilities

We would like to **increase the visibility** of the JavaScript developers belonging to these groups, and we would like to publicly appreciate their skills and experiences. 

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/50zww1oikcptaw8y7e33.jpg)

The mentorship program offers an opportunity to be a part of the conference and **consult one's submission with an established professional** from the field of JavaScript development, who will be assigned to the speaker by our committee based on a submitted talk proposal. 

**6 individuals will be selected** for the program, and each will get to have **3 sessions with the mentor**: in the first one, the mentee will present the talk in its originally proposed form, and in the second one, the mentee and the mentor will go though the talk step by step and discuss details, so that the two of them can improve the presentation together. In the final session, the mentee will present the talk to the mentor once again in its final form. These sessions will be held online.

So, ready to [submit your application](https://forms.gle/9DT38Ae6daNk49ar8)? Before doing so, please consider what kind of talk format you would prefer based on the following available slots:
- *2 regular talks* - 30 min, no Q&A
- *2 lightning talks* - 5-7 min, no Q&A
- *2 pre-conference meetup talks* - 20-30 min, Q&A possible and the Meetup is usually held 1 day before the conference

### [Apply for the mentorship program](https://forms.gle/9DT38Ae6daNk49ar8)

The JS pros that have confirmed their mentoring so far include [Dora Kalneus](https://doramilitaru.com), [Andrey Okonetchnikov](https://twitter.com/okonetchnikov), [Narendra Shetty](https://twitter.com/narendra_shetty), [Robert Haritonov](https://twitter.com/operatino), and [Denis Radin](https://twitter.com/PixelsCommander). We're still looking for extra people to join the team of mentors, so should you be interested in helping us, ping us at [hi@jsnation.com](mailto:hi@jsnation.com).
บันทึก script สำหรับ stop ECS task 
Tags: ecs, cli
Published: 2020-01-10 08:21:02

---
title: บันทึก script สำหรับ stop ECS task 
published: true
description: 
tags: ecs, cli
---

## ทำไม

ตอนนี้กำลังเขียน node.js app บน ECS ซึ่งจะต้องรัน build ผ่าน Gitlab CI 
ตอนแรกเราใช้วิธีการ push latest image แล้วเข้าไปใน ECS console เพื่อ stop task เอง เพราะว่าเร่งทำ code เลยไม่ได้ใส่ใจอะไรนัก (ช่วงแรกๆก็โค้ดบน local บ่อย ไม่ได้ deploy เลยไงล่ะ :D)

ก็ง่ายดี แต่ตอนนี้เริ่มขี้เกียจ  
เลยเพิ่มคำสั่งไปใน GitlabCI หลังจากที่ทำ build และ push docker image เสร็จ ดังนี้

```
aws ecs list-tasks --cluster $CLUSTER_NAME | \
jq -r '.taskArns[]' | \
while IFS= read arnId; do aws ecs stop-task --cluster $CLUSTER_NAME --task $arnId; done
```

## มันทำอะไร 

### 1. มันลิสรายการของ task ที่รันอยู่บน cluster ที่ต้องการ 

```
aws ecs list-tasks --cluster $CLUSTER_NAME
```

คำสั่งนี้คือการลิสรายการ task ใน cluster ที่ต้องการออกมา
จะได้ output ออกมาเป็ร JSON หน้าตาแบบนี้

```
{
    "taskArns": [
        "arnId",
        ...
    ]
}
```

ซึ่งจะเอาไปเป็น input ในคำสั่งถัดไปด้วย pipe (|)

### 2. ใช้ jq แปลงข้อมูลจาก JSON มาเป็น text ที่พร้อมเอาไปใช้งานต่อ 

jq เป็นเครื่องมือที่ใช้อ่านและแปลง JSON เป็นอะไรก็ตามที่เราต้องการ

```
jq -r '.taskArns[]'
```

คำสั่งนี้จะดึงข้อมูลภายใต้ JSON ที่มี key ชื่อ taskArns (และ value เป็น Array) 
จริงๆคำสั่งเต็มๆที่ผ่าน | จะเป็นแบบนี้

```
jq -r '.taskArns[]' "{
    "taskArns": [
        "arnId",
        ...
    ]
}"
```

และได้ output แบบนี้

```
arnId1
arnId2
...
```

### 3. สั่ง stop task พวกนั้น จาก output ของ jq 

```
while IFS= read arnId; do aws ecs stop-task --cluster $CLUSTER_NAME --task $arnId; done
```

หลังจากได้ output ของ jq
จะเอามา loop read ลงตัวแปรชื่อ `arnId` 
แล้วรัน `aws ecs stop-task --cluster $CLUSTER_NAME --task $arnId` ซึ่งเป็นคำสั่งที่ใช้ stop task ที่ได้มาจาก loop นั่นเอง

จบ
Ignoring ajax request
Tags: javascript
Published: 2020-01-10 13:19:30

Hi, first of all, I want to apologize if my question isn't right for this forum.
I am currently working on a project which consists of a chatting website similar to google hangouts. I created a form in javascript destinated to write someone's name in and add him as a friend. I did that yesterday with an ajax request for the server-side and it worked just fine, but now it is ignoring my function and I don't know why.

My js code:

let body = document.getElementsByTagName("body")[0];

let mainList = document.createElement("div");
mainList.classList.add("mainList");

let addFriendForm = document.createElement("form");
addFriendForm.id = "FriendForm";

// The main problem is here

$('#FriendForm').submit(function(){
  $.ajax({
    url: '../letschat/Functions/createUserRelation.php',
    type: 'POST'
  });
});

// ^^

let addFriendField = document.createElement("input");
addFriendField.classList.add("addFriend");
addFriendField.placeholder = "Add a friend";
addFriendField.type = "text";
addFriendField.name = "addFriend";
addFriendField.autocomplete = "off";
addFriendForm.appendChild(addFriendField);

mainList.appendChild(addFriendForm);

body.appendChild(mainList);
Is there a future beyond writing great code?
Tags: todayilearned, programming, beginners
Published: 2020-01-10 13:00:17

*TL;DR notes from articles I read today.*

### [Is there a future beyond writing great code?](http://bit.ly/2sqndE1)

There are many things we developers can do that will make us more fulfilled in our professional lives. There are immediate options to explore beyond just writing code. You can work towards going into engineering management and be a great engineering leader. To move forward in life, one has to give back. And some ways of giving back could be as simple as code reviews, workshops, and individual assessments with some colleagues. Go do it and be a mentor to fellow developers. You will learn a lot of new things on the way too. If meaning is what you are looking for, why not consider doing pro-bono tech work for a social cause that’s close to your heart. There are always ways to get more fulfillment from our skillsets and our careers than we think. We just need to explore. 

*[Full post here](http://bit.ly/2sqndE1), 9 mins read*

---

### [Ways to stay motivated while learning to code](http://bit.ly/2tmflDh)

- You are going to spend a lot of time finding & fixing bugs. When you solve a problem completely, treat yourself.
- Don’t learn to code - code to learn. Aim for small incremental improvements.
- Amplify the positive, not negative. Don’t give in to the impostor syndrome. Learn to keep moving in spite of it. 
- Always look at the bigger picture of what you're enabling. Find and frame the reasons why you love your job. 
- Develop a hobby that gets your blood flowing, literally. Physical exercise helps a lot in staying motivated and focused! 

*[Full post here](http://bit.ly/2tmflDh), 14 mins read*

---

### [Developers mentoring other developers: practices I've seen work well](http://bit.ly/2MK7RAX)

- When mentoring someone, you should delay sharing solutions to problems your mentee is facing as long as possible. Prompt them to introspect and figure out solutions on their own. 
- As they say, the devil is in the details. Ask specific questions to dive deeper and seek context. Listen intently and understand the underlying subtext. 
- Draw upon your own experiences, contexts and perspectives rather than giving textbook-ish suggestions. 
- Always be supportive and let the mentee know that you are on their side. 

*[Full post here](http://bit.ly/2MK7RAX), 18 mins read*

--- 

*[Get these notes directly in your inbox every weekday by signing up for my newsletter, in.snippets().](https://mailchi.mp/appsmith/insnippets?utm_source=devto&utm_medium=post08&utm_campaign=is)*
How to Install BBM Application on Android and iPhone
Tags: iphone, android, ios
Published: 2020-01-10 12:55:55


<b>BBM APPLICATION CAN BE OBTAINED WITHOUT PAYMENT OR FREE<b>

BBM application finally BlackBerry Messenger officially comes to the Google Play Store and returns to the Apple App Store. Then how do you install this BBM application on your handset? We will explain to you how to install this BBM application on your handset but you can watch videos about it on youtube or <a href="https://www.geniustechie.com/gears-tv/">gears TV</a>.

Cross-platform BBM is sure to be downloaded without having to spend a penny or free. But unfortunately, only users of certain devices can enjoy it.

For iDevice users, BBM can only be enjoyed by iPhone users with the iOS 7 and iOS 6 operating systems. While Android users, the handset must be an Ice Cream Sandwich version with a maximum 7-inch screen size.

After the specifications are qualified, users can directly download the intended application through their respective online stores or Android and iPhone users can visit the site bbm.com.

On the bbm.com site, it will detect whether your device can or is suitable for this application. After the specifications are in accordance, it will still be directed to the Google Play Store or the Apple App Store.

After successfully downloading, users are required to register or sign up first to create a BlackBerry ID account by entering an email account. Remember! One BlackBerry ID account is only for one handset.

Because, if this BlackBerry ID account is still used in other handsets, for example on BlackBerry phones, automatic contact data in the BlackBerry handset will move to the newly registered handset to Android or iPhone.

After signing up for BlackBerry ID, iPhone and Android users will get a unique PIN like a BlackBerry PIN. Because BBM users will use a PIN, not a cell phone number or email address. So it's more private and we can always control the people on the contact list.

After active BBM, the users of this application can do all activities like BlackBerry OS users in general. To invite other BBM user contacts, the method is the same as the one on BBM before.

BBM users on iPhone and Android can also enjoy existing features, such as BBM chat, BBM group, BBM broadcast message. In the future it is not impossible, the BBM Channel feature will also penetrate to monetize this service.
Albuquerque Tree Service Pros
Published: 2020-01-10 12:50:31

we are experienced, licensed and insured and we will always provide the best tree service Albuquerque. However, this does not mean that our prices are expensive; all our services are available at reasonable rates. By choosing us, you will get an efficient, safe and reliable tree service. Give us a call today for a consultation and to schedule a free estimate for professional tree service in Albuquerque. 

Phone: (505) 218-7085
Country: United States

Visit for More: http://albuquerquetreeservicepros.com/
Weird questions for a job interview as a developer
Tags: discuss, career, beginners
Published: 2020-01-10 12:20:34

**What are some of the weirdest questions (and by this I mean both witty and purely awkward) you have received during a job interview?**
![comic-image-inteviewer-asks-what-is-in-your-refrigerator](http://blog.acadzone.com/wp-content/uploads/2012/12/Untitled.jpg)
Personally, I don't have a vast experience with interviews. However, sharing what you have encountered could be of a great help for others. Plus, it is always fun to hear what crazy questions pop up in people's head :)
Implementing Javascript Objects with Multi-part Keys
Tags: javascript
Published: 2020-01-10 12:13:01

---
title: Implementing Javascript Objects with Multi-part Keys
published: true
description: 
tags: javascript
---

If you've done Javascript development for any period of time, you've likely encountered a situation where you've wanted the key for an object to be composed of multiple values.  I've googled for relevant Javascript examples but they all seem to come up with associating multiple values with one key, that's not what I mean.

Rather, perhaps you want to compose an Object key from the values "foo" and "bar".  A naive approach might be to concatenate the values with a delimiter unlikely to appear in the string, for instance the tilde, in which case you might create the key: "foo~bar".

Depending on the data though there could be the possibility that one of the values needed for the key could contain the delimiter you have chosen, and this will make it difficult to use the object's keys for some subsequent purpose, e.g if you thought you'd have a two-part key, and split it on the delimiter, you could end up with more than two values.  Luckily there is another solution...

Put the values for the multi-part key into an array, then call `JSON.stringify` on it, and use the result for the array key:

```
const key = JSON.stringify(['foo','bar']); // '["foo","bar"]'

```

If you don't care about the order and want to treat `['bar', 'foo']` the same way as `['foo', 'bar']`, sort the array you pass to `JSON.stringify`: `['foo','bar'].sort()`

See the following answer I posted on StackOverflow this morning using this technique: https://stackoverflow.com/a/59680851/34806
SLOW CSS RAIN
Tags: codepen
Published: 2020-01-10 12:07:52

<p>Some rain drops generated in JS through some random values (left and top position). Those drops are then animated in CSS from top to bottom (simple infinite animation).</p>

{% codepen https://codepen.io/osde8info/pen/LYEmPzZ %}

forked from

{% codepen https://codepen.io/alemesre/pen/hAxGg %}
How easy is it to have a conversation with a chatbot and not realize it?
Tags: bots, humour, machinelearning
Published: 2020-01-10 11:59:39

---
title: How easy is it to have a conversation with a chatbot and not realize it?
published: true
description: The Turing test
tags: #bots, #Humour, #Machine Learning
---

*Asked on [Quora](https://www.quora.com) and answered by George Huestis [here.](https://www.quora.com/How-easy-is-it-to-have-a-conversation-with-a-chatbot-and-not-realize-it/answer/George-Huestis)*


During a stint of internet dating I once had a conversation with a pretty girl who I assumed was a bot because she was, as near as I could tell, unable to comprehend sentences.

I tested this hypothesis by making my sentences more and more nonsensical (using imaginary words and the like) to see if she would a) say “wtf are you on?” or b) ask for my phone number (jump the shark - bot!).

She asked for my phone number.

I said: “No thanks, for [these reasons] I think you’re probably a bot trying to harvest my personal information.”

… later, for various and sundry reasons, I figured out that she was real.

An actual, honest-to-God human.

… she just failed the Turing test.

So probably it’s pretty easy, but not because the bots are so good at pretending to be human.


![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/s36hlvf6gujt74o5cl5m.gif)
Web scrapping part 4 (professionally)
Tags: webscrapping, java, python
Published: 2020-01-10 11:15:21

Hello, dev masters how are you let welcome here with another section of web scrapping here I have e already complete 3 sections here and let's enjoy this 4th one.

2.Scrapy framework

Scrapy at a glance!

Scrapy is a web scraping framework of python. Scrapy is best if you need to build
a web crawler for large web scraping needs. Scrapy uses spiders which are self
contained crawlers that are given a complete set of instructions. In scrapy it is
much easier to build and scale large crawling projects by allowing developers to
reuse their codes. Scrapy also provides a web crawling shell known as “Scrapy
shell” that developer can use to test all assumptions on a website behavior.

First of all you need to install following packages
that i have Summarized.

I would suggest you to use linux platform instead of others, And i will
also explain you about selenium webdriver.

Run these commands to your terminal.

To install scrapy sudo apt install python-scrapy.

To install pip sudo apt-get update && sudo apt-get install python-pip.

To install selenium sudo pip install selenium.

To install chrome webdriver.

$ sudo apt-get install chromium-chromedriver

$ sudo ln -s /usr/lib/chromium-browser/chromedriver/usr/bin/chromedriver

$ sudo apt-get install libxi6 libgconf-2-4

Now you need to do is:-

1. Creating a new Scrapy project.
2. Write a spider to crawl a site and extract data.
3. Exporting the scraped data using the command line.

To create your first project open the terminal and change the directory where you
have installed scrapy then run the following command >>> scrapy
startproject project_name

This will create a directory which looks like this:

project_name/

scrapy.cfg # deploy configuration file
project_name/ # project's Python module,
you'll import your code from here
__init__.py
items.py # project items definition file
middlewares.py # project middlewares file
pipelines.py # project pipelines file
settings.py # project settings file
spiders/ # a directory where you'll later put
your spiders
__init__.py


Writing our first Spider

All spiders in scrapy is nothing but python classes that scrapy uses to get all the information from a website. All classes (spiders) must inherit with scrapy.
Spider and define the initial request to make. That means how to follow the links in the pages, how to get data from parsed pages, how to parse the data etc.
Hope it is clear to you if not then simply assume that this is class in which we
make different functions and every function is used for parsing the urls.

Now we will code our first Spider. Save it in a file named test.py or you can name it anything with.py extension under the project_name/spiders directory in your project:


Thanks for reading this hope you enjoy I'll continue this series here good luck everyone.
Reading Snippets [31 => Git]
Tags: beginners, git, github
Published: 2020-01-10 11:12:28

Git-rebase is preferred by those who would like a clean, linear history free of unnecessary merge commits. 

If one has such a preference, they may opt to use git-rebase instead of git merge when integrating changes from another branch. 


<kbd>Source:<a href="https://dzone.com/articles/8-useful-but-not-well-known-git-concepts">DZone</a></kbd>
ReactJS Learning
Tags: help, beginners, react, advise
Published: 2020-01-10 11:11:05

---
title: ReactJS Learning
published: true
description: 
tags: #help, #Beginner, #React, #advise
---

Hello Dev,

I am trying to learn ReactJS from the very beginning. I am totally confused that from where should I start?. I don't have any knowledge of frontend technologies. From browsing the internet I got a lot of materials(youtube, freecodecamp, medium etc) but still confused to choose the right one.

Can anybody suggest some good materials for ReactJS developer?(Names or Links will be more helpful)
Benchmarking preloading in PHP 7.4
Tags: php
Published: 2020-01-10 11:10:50

---
title: Benchmarking preloading in PHP 7.4
published: true
tags: php
canonical_url: https://stitcher.io/blog/php-preload-benchmarks
---

I've decided to benchmark PHP's new preloading feature on one of my real-life projects. These are the results:

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/lgies67fzp93larklnvl.png)

You can read about the benchmarking process on my blog: [https://stitcher.io/blog/php-preload-benchmarks](https://stitcher.io/blog/php-preload-benchmarks).
ReadingSnippets [30=>Cloud ☁️ Computing]
Tags: aws, azure, beginners
Published: 2020-01-10 10:55:06

Types of cloud computing models include:

💁 Software as a Service (Saas): Service provider manages completed product(ie: Gmail)

🏢 Infrastructure as a Service (laas): Providing building blocks for cloud IT(ie: Physical Server)

🧗 Platform as a service (Paas): Management and deployment of applications without direct responsibility/control for hardware(ie: Godaddy)

<kbd>Source:<a href="http://awsnewbies.com/cloud-computing">AWS Newbies<a/></kbd>
# Migrate to google captcha to v3. No more "No, I am not a robot"
Tags: recaptcha, spambot, analytics, javascript
Published: 2020-01-10 10:50:38

# google captcha migration to v3. No more "No, I am not a robot"

If you did not have one, you will need to create an app here:
![Google create](https://thepracticaldev.s3.amazonaws.com/i/eov1myobwez63y6sfva6.png)

- no more captcha. Verification happen under the hood 
    * before: 
    ![form before](https://thepracticaldev.s3.amazonaws.com/i/w96ce916rxbdksi7oskt.png)
    * after: 
    ![form after](https://thepracticaldev.s3.amazonaws.com/i/mhu8bid1zj2z23kynaua.png)

- You can check google answer 
![google response](https://thepracticaldev.s3.amazonaws.com/i/w7u61p2sks6ndakefbi2.png)
I consider action: "contactPage", score > .8 to be a valid request. You can use your own

You can give the user ip as optional param. (I don't. Google has already enough data on us)

The front end code ![front](https://thepracticaldev.s3.amazonaws.com/i/krhbftdk6a0q06nyruww.png)
The back end code ![back](https://thepracticaldev.s3.amazonaws.com/i/5db8l5a8h319m9th0w93.png)
Yes I am using @laravelphp.

I also added a new page /contacted to have a better reporting from google analytics conversion for specific goals. Don't worry I protected it, you can't access it except you are coming from the contact form ![twitter](https://thepracticaldev.s3.amazonaws.com/i/wuwarpdyrpc8nz8c8iqh.png)
Let me elaborate: Having a specific page where the user is being redirected is a good practice for analytics since you can then record the hits you are getting from that specific page (for me /contacted). You can have the same for user registration /registred

# Wrap up
It was amazingly fast. The migration v2 -> v3 is straightforward. So if you did not, go ahead it is less than 5min.
Next step for me is to add it on my login form as well.
Happy coding!

Resources:
- display: https://developers.google.com/recaptcha/docs/v3
- verify: https://developers.google.com/recaptcha/docs/verify/