teleren/devto huggingface dataset:
Entendendo Threading no Node.js com Rodrigo Branas
Tags: javascript, node, threads, performance
Published: 2020-12-03 20:02:41

---
title: Entendendo Threading no Node.js com Rodrigo Branas
published: true
date: 2020-11-20 16:31:32 UTC
tags: javascript,nodejs,threads,performance
canonical_url: https://blog.lsantos.dev/entendendo-threading-no-node-js-com-rodrigo-branas/
cover_image: https://raw.githubusercontent.com/khaosdoctor/blog-assets/master/images/2020/11/maxresdefault.jpg
---

No dia 9 de Novembro tive o prazer de ser convidado pelo excelente Rodrigo Branas para participar de uma live super animada no canal dele.

Nesta live, ficamos mais de 2 horas falando sobre como funcionam os processos em threading no Node.js e também como podemos tirar vantagem da API de clusters e Worker Threads!

Mostramos códigos, falamos da nossa experiência e também tiramos muitas duvidas sobre como threading funciona nos computadores em geral! Veja a live na íntegra logo abaixo!

<iframe width="612" height="344" src="https://www.youtube.com/embed/xX0dLhHX5m4?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Huawei Cloud ECS Server notes
Tags: huaweicloud, devops, ssh, saas
Published: 2020-11-20 16:25:25

Our start-up just bought a Huawei Cloud ECS server in order to deploy our SaaS products on it (currently we are highly depending on our AliCloud server for dev and for deploying demo/test/official releases). We chose Ubuntu 18.04 LTS as OS when initializing the server on Huawei Cloud website.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/96f9ql24gw2smjgj52kk.png)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/e57h7ukk4tsa41b4fgke.png)
Since yesterday, I am working on setting up all environmental and infrastructure software including ('c' means running inside container):
* Docker
* Anaconda
* TomCat (c)
* Nginx
* MySQL (c)
* Neo4j (c)
* MongoDB (c)
* ElasticSearch (c)
* Redis
* Jenkins
* git
* node


For Python, I am planning to install the following packages:
* django
* django-cors-headers
* json
* urllib
* demjson
* pymysql
* pymongo
* elasticsearch
* py2neo
* jwt
* uuid
* elasticsearch
* redis
* celery
* pandas
* tensorflow
* numpy
* scikit-learn

I will note down installation and setting steps and advises in my future posts.

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

Related Posts (list keeps growing in following months):
* [Install MongoDB with Docker (in Ubuntu 18.04)](https://dev.to/jemaloq/install-mongodb-with-docker-in-ubuntu-18-04-4pbi)
* [Installation of Mysql in Docker (Ubuntu 18.04)](https://dev.to/jemaloq/installation-of-mysql-in-docker-ubuntu-18-04-4ln)
* [Installing Tomcat + Nginx in Ubuntu Cloud server](https://dev.to/jemaloq/installing-tomcat-nginx-in-ubuntu-cloud-server-3d09)
* [Installation of ElasticSearch in Docker (Ubuntu 18.04)](https://dev.to/jemaloq/installation-of-elasticsearch-in-docker-ubuntu-18-04-34i8)
* [Install Jenkins in Ubuntu 18.04](https://dev.to/jemaloq/install-jenkins-in-ubuntu-18-04-5enn)
* [Docker compose](https://dev.to/jemaloq/docker-compose-3opj)
Second Project Deployed!
Published: 2020-11-20 16:10:55

Well, it should probably only be run on Chrome but I’m proud to say I just finished and presented my second project for my Software Engineering Immersive through General Assembly. V.O. GO is a full-stack web application utilizing Node/Express/Mongo DB/CSS/JS and Soundcloud embeds that I was inspired to make for Voice Over artists.

Got a few stretch goals to go and it certainly needs help running on other browsers and mobile after 4-5 12+ hour days I’m happy with the result:https://vo-go.herokuapp.com/
🚀10 Trending projects on GitHub for web developers - 20th November 2020
Tags: javascript, webdev, typescript, react
Published: 2020-11-20 16:05:28

Trending Projects is available as a weekly newsletter please sign up at [www.iainfreestone.com](https://www.iainfreestone.com) to ensure you never miss an issue.

### 1. Valtio

Valtio makes proxy-state simple for React and Vanilla

{% github pmndrs/valtio %}

---

### 2. Starship

The minimal, blazing-fast, and infinitely customizable prompt for any shell!

{% github starship/starship %}

---

### 3. Microsoft - Web Development for Beginners

24 Lessons, 12 Weeks, Get Started as a Web Developer 

{% github microsoft/Web-Dev-For-Beginners %}

---

### 4. Element3

A Vue.js 3.0 UI Toolkit for Web.

{% github hug-sun/element3 %}

---

### 5. Security Scorecards

OSS Security Scorecards

{% github ossf/scorecard %}

---

### 6. Beautiful React Diagrams

A collection of lightweight React components and hooks to build diagrams with ease

{% github beautifulinteractions/beautiful-react-diagrams %}

---

### 7. File Browser

Web File Browser which can be used as a middleware or standalone app.

{% github filebrowser/filebrowser %}

---

### 8. The Book of Secret Knowledge

A collection of inspiring lists, manuals, cheatsheets, blogs, hacks, one-liners, cli/web tools and more.

{% github trimstray/the-book-of-secret-knowledge %}

---

### 9. Eris

A NodeJS wrapper for interfacing with Discord.

{% github abalabahaha/eris %}

---

### 10. semantic-release

semantic-release automates the whole package release workflow including: determining the next version number, generating the release notes and publishing the package.

{% github semantic-release/semantic-release %}

---

Trending Projects is available as a weekly newsletter please sign up at [www.iainfreestone.com](https://www.iainfreestone.com) to ensure you never miss an issue.

If you enjoyed this article you can [follow me](https://twitter.com/iain_freestone) on Twitter where I regularly post bite size tips relating to HTML, CSS and JavaScript.
S1E8 Learn JMeter Series - HTTP Cache Manager
Tags: performance, testing, webperf, tutorial
Published: 2020-11-20 15:55:26

Welcome to Learn JMeter Series!

In this season one, episode eight, you will learn the following:

* HTTP Cache Manager

{% youtube _KBHytyqXlk %}

* [Buy me a tea 🍵](https://www.buymeacoffee.com/qainsights)
* [My Blog](https://qainsights.com)
* [My Udemy Course](https://www.udemy.com/course/performance-testing-using-truweb)
Interviews with entrepreneurs and digital nomads from Tim Ferriss' The 4-Hour Workweek
Tags: productivity, books, career
Published: 2020-11-20 15:36:55

---
title: Interviews with entrepreneurs and digital nomads from Tim Ferriss' The 4-Hour Workweek
published: true
description: The 4-Hour Workweek was published in 2007 and I was curious what the people mentioned in the book are doing now. This post includes their quotes and interviews.
tags: productivity, books, career
canonical_url: https://coda.io/@alchen/uncovering-the-stories-that-make-the-4-hour-workweek-possible
cover_image: https://p-ZmF7dQ.b0.n0.cdn.getcloudapp.com/items/xQuY4xze/andy-do-aVn7ZOhF9C0-unsplash.jpg?v=388ac61576d91102134cd64b684e53a9
---
A few months ago I re-read Tim Ferriss' *The 4-Hour Workweek* and was curious what the people mentioned in the book think of the book today, if they still practice the principles from the book, etc. Many of the tools in the book are a bit outdated, but the concepts are still sound.

Decided to reach out to some of them and ended up conducting a variety of interviews with the entrepreneurs, digital nomads, and lifehackers in the book. **tl:dr;** Most people are still doing what they did in the early 2000s when Tim first met with them. Full story here: [Uncovering the stories that make the 4-Hour Workweek possible: A 10-year review](https://coda.io/@alchen/uncovering-the-stories-that-make-the-4-hour-workweek-possible)
Use "touch" command in windows 10.
Tags: tutorial, webdev, linux, beginners
Published: 2020-11-20 15:26:24

Unix commands like <code>touch</code> will not work in windows system so people have gotten smart and have figured out a way to touch(create) a file in the terminal in windows.

There is a npm package called <strong> touch-cli </strong> which will allow us to use <code>touch</code> command.

Open up your terminal and paste the following code.

<code>npm install touch-cli -g</code>

We install the touch-cli globally so we can use it in any folder.

Now below we can see the touch-cli in action.

![Screen Recording 2020-11-20 at 08.44.53.16 PM](https://dev-to-uploads.s3.amazonaws.com/i/7t22wshe89okikiw2lk7.gif)
 

### Thank you for reading!

If you like this article, Unicorn this one! Heart/Like this one and save it for reading it later.



### <u>My Other Articles: </u>



- [Universal CSS properties everyone must know](https://dev.to/gautham495/universal-css-properties-everyone-must-use-4kie)

- [Create-react-app](https://dev.to/gautham495/creating-a-new-react-app-with-create-react-app-4e9m)

- [Git for beginners](https://dev.to/gautham495/basic-git-knowledge-for-beginners-m4p)

- [Change headers in react with react-helmet](https://dev.to/gautham495/changing-headers-in-react-with-react-helmet-d0d)

- [Know How to apply box-shadow on all four sides.](https://dev.to/gautham495/know-how-to-apply-box-shadow-on-all-four-sides-43pn)
 
- [Simple CSS Selectors](https://dev.to/gautham495/simple-css-selectors-for-beginners-2i44).

- [CSS Pseudo Elements](https://dev.to/gautham495/css-pseudo-elements-for-beginners-53ob).

- [CSS Pseudo Classes For Beginners](https://dev.to/gautham495/pseudo-classes-for-beginners-3lc0
).
4 Problems with Slack that can ruin remote work‍
Tags: watercooler, productivity, discuss, remote
Published: 2020-11-20 15:25:40

The numbers show that 750,000+ organisations are using Slack!

I've been using Slack for 3+ years myself and as our primary mode  of communication (internal team) over the past one year and have had my  fair share of qualms with it.

Our community had a [lively discussion on this](https://remoteclan.com/s/gke7bm/why_should_you_not_use_slack). Based on the things discussed, I penned down some of the problems and how to tackle them.

##Problem 1. Constant interruptions - Slack doesn't let you focus on work


Any notification will disrupt your workflow. At the same time, you will not even know when you are interrupting someone else.

**Solution**


1. Snooze your notifications when you're working. Clear pending messages periodically.
2. Have a set expected response time.
3. Message a teammate only if absolutely required.


##Problem 2. Loss of context and the need to catch up when you miss messages


Not checking your messages often may result in you having a huge number of messages to catch up on and being left out.


**Solution**


1. One person involved in any important conversation should summarize the key points and share them on Slack itself. Anyone who wasn't part of it should read through the summary and share comments.
2. A gist of the entire conversation should be transferred  to your team's permanent doc/ wiki.


##Problem 3. Slack = Instant messaging and it promotes short-form, not-so-thoughtful conversations


This isn't a great way to discuss someting that critically impacts your team.

**Solution**


1. Document important  conversations in a more permanent place like your company wiki. This also provides spaces for adding more nuance to it.
2. Everyone in the team should be aware of the right place to document information. We put together a [simple framework](https://www.remote.tools/half-life-of-knowledge-framework) to help you decide this. Additionally, your internal team guidelines should emphasise on long-form responses, even on chats.


##Problem 4. It keeps you awake at night and it is the first thing you check in the morning

The need to be constantly connected leads to burnout or fatigue.

**Solution**


Your only respite in this case is self-control. I wrote just last week on how you can unplug from work and the simple hacks mentioned there should work well.
This should also be conveyed & discussed in your team meetings.  Responding or having conversations at odd hours shouldn't be celebrated.  In fact, it's great to address & discuss the situation to avoid  that eventuality in future. The manager or the leader plays a crucial  role in setting the right example.

What do you think about the above? Do comment and let me know. Also, I write about all the juicy updates related to remote work. [Subscribe to my newsletter](https://www.remote.tools/subscribe) to stay in the know.
3 Components for Successful Blogging
Tags: writing, codenewbie
Published: 2020-11-20 15:00:24

I’ve been wanting to start a developer blog for a while now, and I finally started blogging in September. With a few posts completed already, I’ve reflected on what successful blogging means to me. Here’s what I came up with:

## Clarifying Ideas

When I brainstorm ideas to write about, I also have to consider what I already know about the topic. This makes me have to research the concepts a bit more to make sure I have it right. This means breaking things down, giving examples, and trying new ways to get a point across. I also have to consider my audience and what they may be seeking from the post. 

Once I outline what I want to write about, I start the first draft. This tends to be a lot of notes, fragment sentences, and even questions I still have. Good writing involves a lot of editing. I might write several drafts before I feel my writing is clear enough to where I'm ready to publish, and this is where a lot of learning takes place.


## Documenting My Journey and Growth


Writing posts helps me keep track of what I am learning and what sparks my interest. I can look back at my blog posts and consider exploring a topic again with a new angle or dive deeper into a particular concept. With more posts, I can analyze what I've been writing about to map out an area of specialization. Publishing posts also allows me to get feedback from readers. I might get comments that introduce me to new ideas and angles I didn't consider yet. I can easily keep these ideas written in a notebook or on my laptop, but there is something exciting about sharing ideas with others. 


## Publishing Consistently

From what I have learned about blogging, I understand that publishing consistently will help me become a better writer and communicator. To stay consistent, I joined a blogging accountability group. The goal is to write at least one post every two weeks. Having others who share this same goal is a great motivator because there is nothing like having a deadline to keep me on track. 

## Final Thoughts

Every day, I feel like I need to write something. It can be working on a post, jotting down ideas, or writing in a journal. Daily writing of any kind feels like a healthy habit. Do you feel this way? What does successful blogging mean to you? 

***
Photo courtesy of [Andrew Neel](https://unsplash.com/photos/cckf4TsHAuw) on Unsplash
ASP.NET Core 3 deploy to Windows IIS mode changed
Tags: aspnetcore, net, iis
Published: 2020-11-20 14:58:12

I recently upgraded the ASP.NET Core 2.1 project in windows server to version 3.1, and found that the windows install on IIS way has changed.

First. In addition to `Reverse proxy`, since ASP.NET Core 3.0 has default `in-process-hosting` support for IIS ( [reference](https://docs.microsoft.com/zh-tw/aspnet/core/host-and-deploy/iis/in-process-hosting?view=aspnetcore-5.0) ), you don't need to use IIS Pool `CLR no managed code` ( [reference](https://blog.johnwu.cc/article/iis-run-asp-net-core.html) ), you can only rely on kestrel server to run the web engine.

Kestrel can now be removed. that's mean it can avoids `data translation between IIS and Kestrel `, it can provides `better performance` and `less resource` , the relevant performance test can be referred to ( [Rick Strahl article](https://weblog.west-wind.com/posts/2019/Mar/16/ASPNET-Core-Hosting-on-IIS-with-ASPNET-Core-22) )

This is good news for who must continue to use the windows server and cannot replace by Linux!

Second. Note that `IIS In-process hosting` each app needs to set a unique pool, it not likes asp.net mvc, multiple applications can use the same pool to manage.

For this, you can refer to the answer I asked [Brando Zhang](https://stackoverflow.com/users/7609093/brando-zhang) on [S.O](https://stackoverflow.com/questions/64923649/asp-net-core-3-1-run-on-iis-net-clr-v4-0-and-integrated-managed-must-be-a-pool/64925675#64925675) 

> Sharing an app pool among apps isn't supported. Use one app pool per app.

Otherwise there will be an error `HTTP Error 500.35 - ANCM Multiple In-Process Applications in same Process`
![](https://i.imgur.com/NXNuLDu.png)

Third. Although ASP.NET Core 3.1 can be packaged into a self\-contained single file with the Runtime environment, it is unfortunately only work for the kestrel server. IIS Server without Runtime still needs to be installed `Hosting Bundle` .

There is no way to one file like .net core console and others can use it out of the box.

Image: The asp.net core app containing runtime dll runs as kestrel on a server without runtime installed
![](https://i.imgur.com/3QQQdtV.png)

Image: If the same file runs on IIS, it will report 500.19 error
![](https://i.imgur.com/exevQrM.png)
💡 What’s a New PHP 8?
Tags: php, php8, news
Published: 2020-11-20 14:53:07

🆕 Learn what's new and what has changed in the new PHP 8 release.
[Read more...](https://auth0.com/blog/whats-new-php-8/?utm_source=content_synd&utm_medium=sc&utm_campaign=php8)
Here is the link to my profile on just 1 click
Published: 2020-11-20 14:49:44

<a href="https://dev.to/ruthuparnampatil">
  <img src="https://d2fltix0v2e0sb.cloudfront.net/dev-badge.svg" alt="Ruthuparna M Patil's DEV Profile" height="30" width="30">
</a>
Improving the way DEV elevates the good stuff
Tags: discuss, meta
Published: 2020-11-20 14:40:31

We are making a few concerted efforts to ensure the quality of the content that _rises_ on the platform. As long as folks are not acting maliciously, we do not have an approach of gatekeeping even low quality content, but the problem is we do not do a great job system-wide of discerning the best stuff from the worst.

To speak to a few things we're doing imminently:

**Expanding the number of "trusted" users.** Trusted infers greater capacity to vote _against_ bad content through special reactions. It's a wisdom of the crowds approach. We have guidelines, but can also rely on the gentle nudges of folks who've shown to be thoughtful.

Currently less than 1% of users have that role and it will go a long way for us to increase that program. This will have a big impact.

**Better matching members with content they like.** Increasing relevancy in the feed will be a priority for DEV. If there is any component of work on DEV that has gotten less love with our focus on Forem, it's been some of the tweaking that ensures DEV— the biggest Forem— keeps getting algorithm improvements.

Our focus of late has largely been on _the smallest Forems_ as we're getting the program underway. But as much of 2020 has focused on the nuts and bolts of getting this Forem idea working, 2021 will give us much more time to focus on the refinement of key areas. Content discoverability is first and foremost here. We want to make it easier to match people with topics and people they care about.

We also have one or two specific projects in 2021 which will be really fun!

This year we were able to tackle some hair-on-fire problems as they came up... Notably an influx of bad spam which helped us come up with some nice scaleable solutions.

{% link https://dev.to/devteam/spam-sucks-dm8 %}

Of course, everything we do is open source. There is a lot we can do with our moderation practices, some of which I touched on with the note on trusted users— and others can be improvements to the core product.

Feel free to pitch us on specific ideas through issues.

{% github https://github.com/forem/forem %}

If you want to trigger broader discussions instead of specific issues, we welcome you to also post on https://forem.dev/

## [👉 forem.dev](https://forem.dev/)
A free tool to generate Open Graph images for GitHub repos
Tags: showdev, github, twitter, design
Published: 2020-11-20 14:38:19

I made a free tool that generates Open Graph images for GitHub repos.

👉 [mugshotbot.com/github](https://www.mugshotbot.com/github)

I work in open source and was tired of sharing ugly links on Twitter and Facebook. This is how they usually look.

![Boring Twitter preview of a GitHub repo](https://dev-to-uploads.s3.amazonaws.com/i/0ybwisg9pqdtaofu0gxu.jpeg)

One day I realized GitHub lets you upload a custom image, so I started making some templates. I figured I could work it into [Mugshot Bot](https://www.mugshotbot.com) and use the GitHub API.

That eventually turned into a full product! It’s free to use. And it can create some nice Open Graph images for your open source projects.

Here's what that same repo looks like now. 😻

![Improved Twitter preview of a GitHub repo](https://dev-to-uploads.s3.amazonaws.com/i/rtuykzro2jtnaxpbh4fp.png)

I use the GitHub API to pull in a few stats from the repo:

🌟 stars
🌍 language
🍴 forks
❗ open issues
👤 creator avatar

There's three different themes and you can customize the color and background pattern. [Earlier this week](https://dev.to/joemasilotti/i-ll-make-a-social-image-for-your-best-github-repo-4g4g) a few folks helped me beta test - here's what they created!

![Four examples of social previews for GitHub repos via Mugshot Bot](https://dev-to-uploads.s3.amazonaws.com/i/nzzo3hifpzd156xq3w18.png)

If you give it a try, reply with your repo and I'll check it out. Happy hacking folks! 👋
React Hooks, Routing with a Layout
Tags: react, reacthooks, routing, layout
Published: 2020-11-20 14:32:52

*If you are interested in developer trends you should check out my new newsletter at: [unzip.dev](https://unzip.dev)*

---

Let's create a consistent layout for our react hook routing project.

If you want the basic routing from the last tutorial head here: [React Hooks with Routing the Easy way](https://dev.to/agamm/react-hooks-with-routing-1bbh)

If there is a better way of achieving this with [`Paratron/hookrouter`](https://github.com/Paratron/hookrouter), please let me know in the comments.

### Create a layout
I'm using tailwind2, you can do it too [here](https://dev.to/agamm/react-tailwind-2-in-2-minutes-45l1).
```
import {useTitle} from 'hookrouter';
function Layout({ children, title }) {
	useTitle(title);
	return (
		<div className="flex flex-col items-strech">
			<header className="w-full bg-blue-100 text-center">
				This is my header - {title}
			</header>
			<main className="w-full bg-blue-300 text-center">
				{children}
			</main>
			<footer className="w-full bg-blue-600 text-center">
				This is my footer.
			</footer>
		</div>
	);
}
export default Layout;
```

## Bonus: Let's make it nicer to import pages
Move all of your pages to a new directory named `pages`. There create an `index.js` file:
```
import HomePage from './HomePage';
import AboutPage from './AboutPage';
import NotFoundPage from './NotFoundPage';


export {
	HomePage,
	AboutPage,
	NotFoundPage
}
```

## Let's import and use it in App.js
```
import './App.css';
import {useRoutes} from 'hookrouter';
import Layout from './Layout';

// Pages - This is the previous bonus
import {HomePage, AboutPage, NotFoundPage} from './pages/';

// This applies our layout
function withLayout(page, title){
  return <Layout title={title}>{page}</Layout>
}

const routes = {
  '/': () => withLayout(<HomePage />, "Home"),
  '/about': () => withLayout(<AboutPage />, "About"),
};

function App() {
  const routeResult = useRoutes(routes);
  return routeResult || withLayout(<NotFoundPage />, "Not found!");
}

export default App;

```

It should look something like:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/6cq4ll9uqmfz249kqhh2.png)