teleren/devto huggingface dataset:
Find linux process with bash 
Tags: linux, bash, ubuntu, beginners
Published: 2021-04-07 17:27:40

If you ever found yourself googling how to find active processes in linux, or process with the highest CPU, save this post as a reference, and save code into the script.

```bash
COMMANDS:

ps aux
#=> list processes

grep 'firefox'
#=> show firefox processes

awk *opts
#=> choose what we want to print
```  

We will use this simple commands, so let's make a script for this:

```bash
#!/usr/bin/env bash

#  Define 'help' banner
function print_help() {
  echo -e "--------------------------------------------------------------"
  echo -e " - procfind will print the highest CPU% processes"
  echo -e " - procfind firefox - will print firefox processes"
  echo -e "--------------------------------------------------------------"
}

  #  max number of processes to show
  processes="10"

  if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
    print_help
    exit

  else

    # If first argument is passed as string, search processes for that arg
    echo "CPU |PID |MEM |START |COMMAND"
    ps aux | grep "$1"| awk '{print $3,$2,$4,$9,$11}' | sort -rn | head -n "$processes"
  fi
  exit
```  

Save script as you want (procfind) and give it executable permissions with `sudo chmod +x procfind`. No `.sh` at the end because we defined our environment `#!/usr/bin/env bash`.

Now if we run `./procfind -h`, we will get:
```
------------------------------------------------------------
 - ./procfind will print the highest CPU% processes
 - ./procfind firefox - will print firefox processes
------------------------------------------------------------
```  
If we run `./procfind firefox`:

```bash
CPU |PID |MEM |START |COMMAND
20.2 24281 10.1 16:04 /home/USERNAME/PATH/tor-browser_en-USA/Browser/firefox.real
11.8 24209 12.5 16:03 ./firefox.real
1.9 24325 9.8 16:04 /home/USERNAME/PATH/tor-browser_en-USA/Browser/firefox.real
1.4 24361 5.2 16:04 /home/USERNAME/PATH/tor-browser_en-USA/Browser/firefox.real
0.7 31245 6.0 18:25 /home/USERNAME/PATH/tor-browser_en-USA/Browser/firefox.real
0.0 376 0.0 19:21 grep
```
Do you have an open-source backend project/service?
Tags: opensource, devops, programming, react
Published: 2021-04-07 17:23:40

![TNi0qeqE_400x400](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oq1u2ai11gjhge8crm6c.jpg)
 
Want to make some $ from it? Money-mouth face

Announcing Zeet's Open Source Partner Program

Earn 50% of the profit every time your project is deployed through your link Star-struck

Register here:


https://j648931.typeform.com/to/eLkVy9QX
How We sped Up Our Webpack (TailwindCSS) 7 times!
Tags: performance, webpack, javascript
Published: 2021-04-07 17:20:31

In the last article about build speed optimization, we described how we went from 64 seconds to 17 seconds on our Webpack build (measured on GithubActions, a pretty slow environment CPU-wise). Just as we did it and managed to write an article about it to share the knowledge, something amazing happened: TailwindCSS/JIT.

JIT (short from Just In Time) for TailwindCSS is a much more performant way of generating the TailwindCSS output file. Instead of generating a big (sometimes 10MB+) CSS file and then using PurgeCSS to remove unnecessary classes, it only generates what is needed in the first place. This makes PurgeCSS and many other speed optimization techniques in TailwindCSS unnecessary. It is very fast no matter what config you use, and the output file size is still optimal.

We jumped into experimenting with JIT as soon as it got a beta release, so there were some bugs, but now we consider it good enough for production, hence this article.

> Result: Webpack build took **8.9** seconds (down from 17)

As a nice side-effect of using JIT, our TailwindCSS config became much smaller because we don't need to disable modules, override theme colors, spacing, etc. Now everything is taken care of by JIT during runtime. It is so fast that development became a breeze.

[Read more on JIT in the official TailwindCSS documentation](https://tailwindcss.com/docs/just-in-time-mode#enabling-jit-mode)


## Read more

If you are interested in more performance oriented content, follow me and I promise to deliver original, or at least effective methods of improving your website. 

{% link https://dev.to/platformos/platformos-documentation-site-webpack-setup-93l %}

{% link https://dev.to/platformos/3-performance-tips-for-your-next-project-2bdm %}

{% link https://dev.to/platformos/should-you-always-care-about-your-website-size-2jcc %}
Attoparsec i EAS
Published: 2021-04-07 17:10:25

W poprzednim artykule attoparsec zdefiniowałem cele napisania prostego asemblera z języka EAS do ezoterycznego języka programowania ETA. W tym artykule przyszła pora na implementację. #haskell #attoparsec #parser #asembler #assembler #eta #eas #helvm #helpa #helma

https://writeonly.pl/attoparsec-eas
Testing 
Tags: beginners, womenintech, devjournal, testing
Published: 2021-04-07 16:55:36

Testing is very challenging for me. My Week 3 was about understanding the importance of testing and exploring various testing frameworks and approaches to test the software. I welcomed the challenge and would like to summarize my learning in today’s post. 

Let's define tests. Automated tests are scripts that output whether or not your code works as intended. They
verify that the program works now and will continue to work in the future without manually testing it. Once you write a test, you should be able to reuse it for the lifetime of the code it tests. Your tests can change as expectations of your application change. Tests catch bugs sooner, preventing them from ever being deployed.

TDD vs. BDD

Test-driven development involves writing a test for a specific piece of functionality, running the test to see if it fails, and then writing the code to make the test pass.
Behavior-driven development involves a developer, QA engineer, and product manager. The group meets to come up with examples of acceptance criteria in a user story. These examples are described using a domain-specific language and put into a feature file. The feature file is converted into a specification where developers can then write an actual executable test.

Happy path vs. unhappy path

The happy paths are what users are supposed to do when using an application.  The unhappy paths are many ways that users can break your software. 

Testing in Rails

As we continue developing our application, Shiftwork, we will be adding tests to the Models and Controllers with  MiniTest. MiniTest is a library for TDD, BDD, mocking, and benchmarking. MiniTest is a powerful yet underappreciated testing framework in the Rails community. It comes with the Rails application, so it's available right away, no need to install anything else.
MiniTest has been designed to be a small and fast testing framework. As I learn how to write tests, I will write about it from my practical perspective in my other posts.

One of the standards for developing a solid software application is writing tests early and making sure all parts of the app are tested well. Testing is an essential skill, and it's worth spending time to learn how to write well-structured tests. I accept the challenge!

Photo by <a href="https://unsplash.com/@hansreniers?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Hans Reniers</a> on <a href="https://unsplash.com/s/photos/chemistry?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
Node.js 101 - Streams
Tags: javascript, node, beginners, tutorial
Published: 2021-04-07 16:52:39


---
title: Node.js 101 - Streams
published: true
description: 
tags: javascript, node, beginner, tutorial
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4anecy5mdl4pho8w7519.jpg
series: Node.js 101
--- 

<h2>Whats are Streams?</h2>
Streams are used to process (read and write) data piece by piece (chunks) without completing the whole read and write operation and at the therefore without keeping all the data in memory.

Youtube or Netflix are good example of streams. You don't have to wait for video to fully load. The process is done piece by piece (chucks). So you can then start watching even if the entire file is not yet download

In Node.js there are Readable Streams and Writable Streams. Readable Streams can for example be a file read or a http request data.

Writable Streams is the opposite of Readable Streams so for example a http responses or file to send

Here an example of a large data file read
```js
const fs = require('fs')
const server = require('http').createServer()

server.on('request', () => {
    // No need to load the entire file to memory
    // fs.readFile('data.txt', (err, data) => {
    //    if (err) console.log(err)
    //    res.end(data);
    // })
    
    // Create a Readable Streams
    const readable = fs.createReadStream('data.txt')
    
    // Pipe the Stream chunk to a writable Stream
    readable.pipe(res);
})
```
The readable.pipe() method attaches a Writable stream to the readable, causing it to switch automatically into flowing mode and push all of its data to the attached Writable. The flow of data will be automatically managed so that the destination Writable stream is not overwhelmed by a faster Readable stream.

<h2>Conclusion</h2>
That's it for today. Tomorrow the journey continue. Stay tune!

Follow me on Twitter: <a href="https://twitter.com/justericchapman?ref_src=twsrc%5Etfw" class="twitter-follow-button" data-show-count="false">Follow @justericchapman</a><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
Learn programming using shorts ( 30 seconds read ) 
Tags: programming, tutorial, beginners, showdev
Published: 2021-04-07 16:45:50

Learning a programming concept or a language is always an effort where you need to find dedicated time and space. Shorts-based learning splits a particular subject in the form of simple topics explained in less than 30 seconds read content using rich text and media. 

#Microideation - Free shorts based programming content

Microideation is a free app that allows the creation and discovery of the shorts ( ideations) on various Computer science and programming concepts.

{% youtube ej9bMYpX8i8 %}

Start learning programming concepts as microideations. These are short reads of 30 seconds that explain a topic completely using rich text and images. 

The app is currently in BETA. Please provide your valuable feedbacks. It is absolutely free of cost for the early access users ( No ads, no mandatory registration). 

## Download from playstore:
https://play.google.com/store/apps/de...​

You can do the following using the app
- Follow preferred languages or concepts
- Bookmark and favorite ideations for future reference
- View linked ideations that are related concepts
- View ideations series ( Ordered list of ideations that forms a concept ) 

The ideations are presented one at a time and can be moved to the next using simple swipe gestures. 

The content is created by experts in the field and has provided the concise information required on the specific topic. 

Currently, there are content on 
- Java
- ReactJS
- React native
- Algorithms
- Data structures
- Application security etc. 

If you are an expert in a field and would like to create ideations, you can register as an ideator and start ideating for free. 

##Some screens

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/an2jzjvigfiacepv2jcu.png)![Selection_999(1014)](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/loe7azzz7d69itivwqcc.png)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o9oxwoqmn3xsdtofdlyt.png) 

More Details: 
https://portal.microideation.com/about
How to respond when someone on your team quits
Tags: management, leadership, hiring, career
Published: 2021-04-07 16:26:55

Really excited to share this week's episode with y'all. It's a topic that not many people talk about. We see and celebrate people's "quitting stories", but we rarely, if ever, hear the manager's side of the story. It's a hard reality of the job, and we need more thinking and resources around the topic. 

Eric Gong, former VP of Engineering and technical recruiter, and I go deep into the emotional, mental, cultural, and career impacts of someone leaving your team.
Here are the 3 top takeaways:
‍
🏆  Give a Grand Exit: Send off the team member with positivity and high remarks. Specifically list out ways that team member has contributed to the team and the organization, and speak highly of them. This is likely not most people's first instinct, but this will have extremely positive and long-lasting effects down the line. It'll signal the kind of leader you are and more importantly how your team should respond in these situations.
‍
😨 Accept the Unfair Feedback: Unfortunately, there is really no such thing as unfair feedback for managers. Even though things may be completely out of your control, it's up to you to listen, triage, solve, and advocate for your team. There's something to learn in even the most unfair feedback.
‍
☝🏻 Manage Up: Your bosses and your bosses' bosses will be looking out for your reaction. It's most important to have a clear, simple plan for when someone leaves the organization. Depending on the frequency of resignations, this may also be a good time to bring up more foundational issues such as pay, benefits, or culture that haven't been addressed.

Full Episode Link: https://hubs.li/H0KJ9y00
Join us June 7-12 for Maintainer Week
Tags: opensource, maintainerweek, github
Published: 2021-04-07 16:25:01

---
title: Join us June 7-12 for Maintainer Week
published: true
description: Over the past few years, Tidelift has been leading the movement to ensure open source maintainers get paid for their work. Now, along with our friends at GitHub, we have decided to declare this June 7-12 Maintainer Week.
tags: opensource, maintainerweek, github

---
<p>Open source, once radical, is now mainstream and it is <em>everywhere</em>–which is amazing. Even more amazing? The people, the open source maintainers, who write and manage the software that makes the modern world go ‘round. Yet their work is often poorly compensated and taken for granted.</p>
<a href="https://xkcd.com/2347/"><img src="https://f.hubspotusercontent30.net/hubfs/4008838/dependency_2x-credit.jpg" alt="dependency_2x-credit" width="300" loading="lazy" style="width: 300px; float: left; margin: 0px 10px 10px 0px;"></a>
<p>Thankfully, this is changing.</p>
<p>Over the past few years, Tidelift has been leading the movement to ensure open source maintainers get paid for their work.&nbsp;</p>
<p>Now, along with our friends at GitHub, we have decided to declare this June 7-12 Maintainer Week.</p>
<p>During this week, and in the weeks leading up to it, we’ll be hosting a series of activities celebrating the important work of open source maintainers, and highlighting some of the everyday heroes in our midst.</p>
<p>On Monday, June 7, Tidelift will kick off Maintainer Week with a new one-day virtual event called Upstream.&nbsp;</p>
<p>Upstream will bring together developers, open source maintainers, and the extended network of people who care most about their work.&nbsp;</p>
<p align="center"><a href="https://upstream.live">REGISTER FOR FREE</a></p>
<p>Then, on Tuesday and Wednesday, June 8-9, GitHub will be hosting its first <a href="https://globalmaintainersummit.github.com/" rel="noopener" target="_blank">Global Maintainer Summit</a>. The Global Maintainer Summit is a virtual gathering connecting the maintainers who make open source possible with each other.</p>
<p>In the coming months as we get closer to <a href="https://github.com/github/maintainerweek" rel="noopener">Maintainer Week</a>, Tidelift will also be featuring highlights of its first open source maintainer survey, which collected the thoughts, ideas, and experiences of almost 500 maintainers. You can sign up to be alerted when the results are ready <a href="https://tidelift.com/subscription/the-upstream-maintainer-survey" rel="noopener">here</a>.</p>
<p>All are welcome to participate in Maintainer Week, and <a href="https://github.com/github/maintainerweek" rel="noopener" target="_blank"><span>add their own events and celebrations to the schedule here</span></a>.</p>
<p>We look forward to spending this week in June uplifting open source maintainers with you!</p>
Monorepo Support Is Now Generally Available on Semaphore
Tags: news, devops, monorepo, cicd
Published: 2021-04-07 16:18:47

---
title: Monorepo Support Is Now Generally Available on Semaphore
published: true
description: Out-of-the-box support for monorepo CI/CD 
tags: news, devops, monorepo, cicd
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zt9fk2vxahyzfwcygsb7.png
---

Our mission at [Semaphore](https://semaphoreci.com) is to empower engineers to ship great products by providing them with a state-of-the-art [CI/CD experience](https://semaphoreci.com/cicd). We’re excited to announce that Semaphore now provides out-of-the-box support for monorepo projects.

## What is monorepo? 🚝

A [monorepo](https://semaphoreci.com/blog/what-is-monorepo) is a version-controlled code repository that holds many projects. While these may be related, they are often logically independent and run by different teams.

![A monorepo CI/CD pipeline](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zt9fk2vxahyzfwcygsb7.png)

{% link https://dev.to/semaphore/what-is-monorepo-and-should-you-use-it-5454 %}

## How it works? 🤔

The key building block of monorepo CI/CD pipelines on Semaphore is the [`change_in` function](https://docs.semaphoreci.com/reference/conditions-reference/#change_in) which detects if a file or set of files have changed in a particular Git commit range.

You can use the change_in function to:

- **Run custom workflows for changes on specific files**. Use `change_in` in combination with glob patterns to define jobs that will run only when certain files change.
- **Skip unnecessary checks**. No need to run that whole test suite when you change `README.md`. Save some CI time by using exclude option to define files and folders you want to ignore.
- **Continuously deploy the right things**. Combine `change_in` with [automatic promotions](https://docs.semaphoreci.com/reference/pipeline-yaml-reference/#auto_promote) to deploy what has changed.

![Monorepo CI/CD workflow in action](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/08x3gbob4r71twd273p0.png)

## So what? 😜

Skipping parts of your code which were not affected by a change can lead to a dramatically faster feedback loop.

For example, the front-end engineering team at BlueLabs was able to [reduce their build time from 17mins to 4mins](https://semaphoreci.com/customers/bluelabs).

![BlueLabs monorepo ci/cd workflow](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/el8mdsl61q40muke5mjs.png)

## How can I use this? 😄

[Semaphore](https://semaphoreci.com) is free for personal, hobby and open source projects, so giving this a spin is pretty easy.

You can fork a [pre-made monorepo demo project](https://github.com/semaphoreci-demos/semaphore-demo-monorepo) and run it yourself.

Or you can just add your own project and play with it.

Happy building!

----

_A more PR-ish version of this announcement was originally published on the [Semaphore blog](https://semaphoreci.com/blog/monorepo-support-available)_.
16 Companies that Use Node.js in their Web Applications
Tags: node, framework, application, webapplication
Published: 2021-04-07 16:15:55

---
title: 16 Companies that Use Node.js in their Web Applications
published: true
description: 16 companies use Node.js- Find out their web apps built with NodeJS web development framework, challenges they faced earlier, benefits after using Node.js.
tags: nodejs, framework, application, webapplication
cover_image: https://www.techtic.com/wp-content/uploads/2021/03/top-companies-using-nodejs-in-2021.png
---

Node.js is one of the top Javascript frameworks to build powerful web apps. It is a robust platform many proficient web developers are utilizing currently to enable their back-end development with JavaScript.

Despite being one of the best programming languages, JavaScript empowers Node.js to build dynamic web applications and that’s the reason why major enterprises are using it extensively for their multi-faceted technology projects.

Companies that utilize Node.js have precisely picked this framework as it supports the ideal runtime environment for JavaScript development.

Are you looking to build Node.js web applications and looking for inspiration? Don’t worry, we assure you that after reading the success stories of all the 16 companies using Node.js for their applications, you’ll be sure to make a decision.

Let us help you with the questions you might have before selecting Node.js as your backend development framework.

<div class="blog_index_cover">
<p class="blog_index_toggle_btn">Contents</p>

<div class="blog_index">
<ul>
 	<li>Is Node.js Really Transforming the Industry?</li>
 	<li>What are the Benefits of Node.js?
<ul>
 	<li>1. Straightforward to Learn and Use</li>
 	<li>2. Swifter to Deploy</li>
 	<li>3. Highly Scalable</li>
 	<li>4. Effective User Experience</li>
 	<li>5. Extensive Community</li>
</ul>
</li>
 	<li>Top 16 Companies Using Node.js in 2021
<ul>
 	<li>1. PayPal</li>
 	<li>2. Uber</li>
 	<li>3. LinkedIn</li>
 	<li>4. Netflix</li>
 	<li>5. NASA</li>
 	<li>6. Walmart</li>
 	<li>7. Mozilla Firefox</li>
 	<li>8. Yahoo</li>
 	<li>9. GoDaddy</li>
 	<li>10. Trello</li>
 	<li>11. Groupon</li>
 	<li>12. eBay</li>
 	<li>13. Medium</li>
 	<li>14. Citibank</li>
 	<li>15. Capital One</li>
 	<li>16. Yandex</li>
</ul>
</li>
 	<li>How much does it cost to build a Node.js application?</li>
 	<li>Build your app with Node.js now</li>
</ul>
</div>
</div>

You can Read more about above topics at <strong><a  href="https://www.techtic.com/blog/companies-use-nodejs-in-web-app/" target="_blank" rel="noopener noreferrer">https://www.techtic.com/blog/companies-use-nodejs-in-web-app/</a></strong>
How to customize the keycloak email
Tags: keycloak, email, custom
Published: 2021-04-07 16:12:33

> Svg Ilustration from [pixeltrue](https://www.pixeltrue.com/free-packs/lined-illustrations) 
> [figma link for the header image](https://www.figma.com/community/file/961659451534719705/Dev.to-Blog-header-images)


We are currently working with Keycloak as auth provider, one of the questions that is not that trivial to get the information about how to customize the emails that Keycloak.


1. How can I show the company logo in the email?
> The best solution to add images is to host it somewhere and just use the link for the image.

 * What other solutions that I try:
   - Add a base 64 images in to the email, but this is not a perfect solution.
   - Create a resources folder and access the image from the email by `${url.resourcePath}/img/myImage.jpg` but this is not working.


2-. In the reset password email get the user first name or username in the email.
 > In the email you have access to the user ` ${msg("greetingMessage", user.firstName, user.lastName)?no_esc}`


- Remember all this is in the custom theme that you create you can have a look at this [Theme-sample](https://github.com/holisticon/keycloak-theme-sample/tree/master/src/templates/email)


{% gist https://gist.github.com/leamsigc/68d3f891d9298c35de273caa2b21e453 %} 

<script src="https://gist.github.com/leamsigc/68d3f891d9298c35de273caa2b21e453.js"></script>