teleren/devto huggingface dataset:
Check top RAM consuming processes on server with HotHost
Tags: monitoring, leak, docker, linux
Published: 2022-10-21 11:20:43


![HotHost get top RAM processes](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wbnyeyyi6g94fdw0rf8i.gif)

- HotHost is a FOSS Hosts & HTTP monitoring tool 
- [HotHost on GitHub](https://github.com/devforth/hothost)
- [HotHost setup guide](https://devforth.io/blog/critical-server-alerts-with-hothost-open-source-quick-to-setup-disk-ram-notifier/)
How to Pick the Right Web Stack and Level Up Quickly
Published: 2022-10-21 11:13:58

---
title: How to Pick the Right Web Stack and Level Up Quickly
published: true
description: You don't want to waste your time learning a language or framework that is already dying, so it makes sense to find the best one before you get started.
tags: 
cover_image: https://mixandgo.com/_next/image?url=%2Fstatic%2Fimages%2Fblog%2Fhow-to-pick-the-right-web-stack-and-level-up-quickly%2Fhero.jpg&w=1920&q=75
# Use a ratio of 100:42 for best results.
# published_at: 2022-10-21 11:12 +0000
---

As a self-taught web developer, I started my career by looking for advice on what to learn on internet forums.

My first programming language was Perl.

Back then, Perl and PHP were all the rage. And I picked Perl because others had recommended it.

You can imagine that wasn't the best choice, but it made perfect sense at the time.

The problem was I used the news to plan my career. Because I could've made better use of that time.

Here's how I would do that now if I were looking to start a career in web development.

First, I'd do some **market research** by looking at the various job boards. I'd then make a list of all the languages and frameworks that hire junior developers.

That would be the first step.

Then, I'd **pick one language or framework with the highest potential** and  set a goal to learn it.

But I wouldn't learn everything.

Instead, I'd **learn the 20%** that would get me a job at a company where I could continue learning.

I picked 20% because of the Pareto principle (or the 80/20 rule).

Finally, I'd **try to spend the least amount of time possible in this learning phase**. Because the more time you spend learning, the more time you're not getting paid.

The quickest (and cheapest) way to learn is to either enroll in a Bootcamp or find a 1-on-1 coach. And if those options sound expensive, you're not factoring in your time.

If you want to know how much your time costs, look up a junior salary and see how much they make per hour.

I hope this helps. And if you want to read the full guide, check out the link below.

[How to Pick the Right Web Stack and Level Up Quickly](https://mixandgo.com/blog/how-to-pick-the-right-web-stack-and-level-up-quickly?utm_source=dev_to&utm_medium=organic&utm_campaign=the_right_stack&utm_content=post)
Hacktoberfest 2022 done
Tags: hacktoberfest, github, java, opensource
Published: 2022-10-21 11:12:47

[![@nyorja1's Holopin board](https://holopin.me/nyorja1)](https://holopin.io/@nyorja1)

Its been a while I am participating this yearly event in the month of October..not the drinking spree but its Hacktoberfest :). Its time for my Github Profile to be active. Its my 5th time participating in this event and its great but this time its different I'm focusing on 1 project only not just a contributor but focusing on code quality, and ideas [trebol-backend](https://github.com/trebol-ecommerce/spring-boot-backend).

Here is my PR's most of them are pending on "hacktoberfest-accepted" label:
1. https://github.com/trebol-ecommerce/spring-boot-backend/pull/111
2. https://github.com/SwarnadeepGhosh/Spring-Boot-Jwt/pull/2
3. https://github.com/SwarnadeepGhosh/Spring-Boot-Jwt/pull/3
4. https://github.com/Kishara/SpringBootwithJPAHibernate/pull/2
5. https://github.com/michaellambgelo/demo/pull/10
6. https://github.com/psg18/ymsli_lab_assessment_spring_boot/pull/2
7. https://github.com/trebol-ecommerce/spring-boot-backend/pull/130
8. https://github.com/hendisantika/user-management/pull/2
9. https://github.com/trebol-ecommerce/spring-boot-backend/pull/149
10. https://github.com/trebol-ecommerce/spring-boot-backend/pull/158
11. https://github.com/trebol-ecommerce/spring-boot-backend/pull/159
12. https://github.com/adyen-examples/adyen-java-spring-online-payments/pull/34
What's an Underrated Tool That More Developers Should Know About?
Tags: discuss, programming, productivity, opensource
Published: 2022-10-21 11:00:00

Back with another [Medusa](https://github.com/medusajs/medusa) Discussion!

As developers we sometimes stumble on a tool that becomes a life changer for us. It's often an underrated tool that not many people know about.

What's an underrated tool that you found and you wish more developers knew about? And how has it helped you?
Freecodecamp Product Landing Page Project
Tags: codepen
Published: 2022-10-21 10:51:53

Hello guys, i am currently learning front-end web development and i have build some project i would love you guys to help me review it so that i can know how to improve my skills. Please tap on the project below

{% codepen https://codepen.io/avwerosuotrust/pen/GRdwWWo %}
Know brief on benefits of celery juice on empty stomach
Tags: benefits
Published: 2022-10-21 10:38:19

The excitement surrounding celery juice is justified! When you consume celery juice on an empty stomach every day, there are several health advantages. Simply put, celery juice is the liquid that comes from a celery stalk. Put the celery stalks in the juicer, and it will squeeze out any liquid, which you can then drink. There are a few other ways to "juice" celery stalks right now, but I've stayed with the simple method of using a juicer.

**[Benefits of celery juice on empty stomach](https://newsnit.com/celery-juice-on-empty-stomach/)**
Let's begin, then. Is celery juice really so healthy? What unique health advantages can drinking celery juice offer? Here are some of the benefits of celery juice on empty stomach

Antioxidant
A rich source of antioxidants is celery. Polyphenols and flavonoids in particular function as anti-inflammatory substances in the body.
Celery juice has anti-inflammatory characteristics that can help with a variety of inflammation-related conditions, including acne, bloating, constipation, IBS, and more.

Supports Digestion
The sensations of bloating, indigestion, acid reflux, and even constipation are all too common for many of us. Low stomach acid is the cause of these unpleasant symptoms.
The juice from celery can help here. When eaten first thing in the morning, the natural sodium in celery—yes, there is sodium in celery!—stimulates the creation of stomach acid, which helps with digestion throughout the rest of the day.
It is crucial to prepare our stomachs for digestion so that unpleasant sensations don't develop throughout the day.

Minimises bloating
Due to its high water content and natural diuretic properties, celery aids in the removal of toxins and extra water from the body.
Most of the fibre is removed when celery stalks are made into juice. As a result, the body can consume the nutrients and enjoy the flavours of the food more easily.

Hydrating Body
It is another benefits of celery juice on empty stomach. Since water makes up the majority of celery (almost 95%), celery juice is obviously excellent for hydration.
And if you have trouble drinking the necessary amount of water each day, celery juice is a delicious approach to help you reach your goal.

By consuming celery juice first thing in the morning, you'll be well on your way to providing your body with the hydration it needs to perform at its peak and enjoy the many advantages of consuming enough water.

Removes acne
One of the health advantages we've just described is actually made possible by a precise mix of others.
Celery juice can help lessen outbreaks and cystic acne, which is brought on by inflammation, by eliminating toxins, reducing inflammation, and hydrating the body.
How To Use Live Stream SDK iOS Build App
Tags: sdk, ios, api
Published: 2022-10-21 10:34:19

Given the rapid growth of the live streaming market, many companies have launched their own iOS live stream SDK.

The development of the live streaming SDK is evolving in a simple and convenient direction, from providing the underlying audio and video transmission capability for a complete live streaming solution to the current compact solution. ZEGOCLOUD’s latest iOS Live Streaming SDK Kit constitutes a compact, independent component solution that provides rich UI custom interfaces. Users select components according to their own needs and customize the UI.

**How to build an app with live streaming SDK**

1) Add ZegoUIKitPrebuiltLiveStreaming as dependencies

Integrate ZegoUIKitPrebuiltLiveStreaming SDK through the pod; add pod ZegoUIKitPrebuiltLiveStreaming in the Podfile file. Then execute the command pod and install it in Terminal. For detailed operation, please refer to [Quick Access Documentation](https://docs.zegocloud.com/article/14868)

**
2) Import ZegoUIKitSDK & ZegoUIKitPrebuiltCall to your project**

In the file that needs to be called the SDK interface, import the SDK through import.

**3) Using the ZegoUIKitPrebuiltLiveStreamingVC in your project**

Go to [ZEGOCLOUD Admin Console](https://console.zegocloud.com/account/login), get the appID and appSign of your project.
Specify the userID and username for connecting to the Live Streaming Kit service.
liveID represents the live streaming you want to start or watch (it only supports single-host live streaming for now).

Then, you can start live streaming by presenting the liveVC.
**
4) Configure your project**

Open the Info. plist add the following code inside the dict part:
Run the demo ----> [https://www.youtube.com/watch?v=TXoIJXTGjEA](https://youtu.be/TXoIJXTGjEA)

Check the tutorial on our blog: https://www.zegocloud.com/blog/live-stream-sdk-ios.

Android SDK iOS Application Development Livestream
Nginx cheatcheat. List of mostly commonly used nginx commands
Tags: nginx
Published: 2022-10-21 10:20:53

**Nginx** is known for its use as a web server and a reverse proxy.
It has several commands that can be useful when deploying new sites.

I have written the most commonly used nginx commands list sucthat i or any other person can easily look them up whenever needed.

#### 1. Install nginx command: 
`sudo apt update
sudo apt install nginx`
#### 2. Check if nginx is running:
 `systemctl status nginx`
#### 3. Check for syntax errors in nginx files:
 `nginx -t`
#### 4. Restart nginx:
 `sudo systemctl restart nginx`
#### 5. Create a symlink from sites-available to sites-enabled
`sudo ln -s /etc/nginx/sites-available/**your_domain** /etc/nginx/sites-enabled/`
#### 6. Start Nginx :
 `sudo systemctl stop nginx`
#### 7. Stop nginx :
 `sudo systemctl start nginx`
Finding out environment variables of the process on Linux
Tags: linux, tutorial, programming, beginners
Published: 2022-10-21 10:04:00

As you probably know, each process on Linux can define its own environment variables (which are by default inherited by child processes).

Let's create an example process and pass it two environment variables:
```
a=1 b=2 sleep 120 &
PID=$!
```
First, we're creating a process that will sleep for 120 seconds, then we're saving its process id (PID) in a variable named `$PID`.

We can read the initial variables from the `/proc/$PID/environ` file:

```
cat /proc/$PID/environ
```

Example output:
```
b=2a=1SHELL=/bin/bashWINDOWID=16831489QT_ACCESSIBILITY=1COLORTERM=rxvt-xpm ...
```

Since entries are separated by the null byte character ('\0'), the output is not very readable, so let's try to fix that:

```
sed -z 's/$/\n/' /proc/$PID/environ
```

`-z` option tells `sed` that new lines are separated by the null byte character, instead of the usual newline character - exactly what we need here.

That output is now more readable:
```text
b=2
a=1
SHELL=/bin/bash
WINDOWID=16831489
QT_ACCESSIBILITY=1
COLORTERM=rxvt-xpm
...
```

Note: use this only for display purposes, entries are separated by the null byte character for a good reason - it's the only character that can't be part of the value.

## Alternatives

Alternatively, we could also use `ps` for this purpose:
```
ps e -p $PID -ww
```
We're using `e` option to tell `ps` to show the environment variables after the command, `-p` to specify the process id, and `-ww` for wide output (unlimited width).

Example output (entries are separated by spaces):
```
 657114 pts/47   S      0:00 sleep 120 b=2 a=1 SHELL=/bin/bash WINDOWID=16831489 QT_ACCESSIBILITY=1 COLORTERM=rxvt-xpm ...
```

## Updated values

As I mentioned earlier, `/proc/$PID/environ` contains only initial variables. If the process changes its environment, and you want to read updated variables, you'll need to do something like this:

```
echo 'p (char *) getenv("a")' | gdb -q -p $PID
```

The value should be included in the output:
```
(gdb) $1 = 0x7ffeddf781d4 "1"
```
        
<hr><small>
Note: This is a snapshot of the wiki page from the <a href="https://betterways.dev">BetterWays.dev wiki</a>, you can find the latest, fully formatted version here: <a href="https://betterways.dev/finding-out-environment-variables-of-the-process-on-linux">betterways.dev/finding-out-environment-variables-of-the-process-on-linux</a>.
</small>
Refactoring Tools: What to Avoid During Refactoring
Tags: javascript, tutorial, books, refactorit
Published: 2022-10-21 09:38:45

Let's continue our series of short posts about code refactoring! In it, we discuss technics and tools that can help you improve your code and projects.

Today we will discuss things to avoid during a refactoring session and why to avoid them.

## Unlimited Scope

The first thing to avoid is to start refactoring without determining the scope of the change beforehand.

Without scope boundaries, it is harder to find a suitable strategy to asses the changes and distinguish the code that _should not_ change.

Limited scope helps with making refactoring sessions smaller but more frequent and cheaper.

## Lack of Tests

Refactoring without tests is dangerous. A good test suite is a safety net that shows what we broke during refactoring _right after_ it's been broken.

The type of tests depends on the situation and is not as important as their existence and good coverage.

## Large Change Sets

Large change sets are more challenging to review and find issues in them. If we want to _improve_ the code, we need the pull request to be reviewed. So our job is to make the reviewer's job easier.

Splitting big chunks into smaller ones helps with evolving code gradually and not spending too much time on a refactoring session.

## Adding Features

Refactoring _must not change_ the functionality of the code. So it is better to avoid adding new features or fixing bugs along with refactoring.

If we found a bug, we should postpone the refactoring, fix the bug, and then get back to improving the code.

## More Details in My Book

In this post, I did not mention other things to avoid, like “mixing various technics in a single commit” or “refactoring test code together with the production code.” I also omitted the details about _why_ we should follow these rules and _how_ to follow them more easily.

If you want to know more about the reasons behind this advice, how to make refactoring easier, and improving code in general, I encourage you to check out my online book:

- [“Refactor Like a Superhero”](https://github.com/bespoyasov/refactor-like-a-superhero-online-book)

The book is free and available on GitHub. In it, I explain the topic in more detail and with more examples.

Hope you find it helpful! Enjoy the book 🙌
Conditionally load scripts in NextJS using environment variables
Tags: javascript, nextjs
Published: 2022-10-21 09:10:20

## Introduction

Recently I added Google Analytics to my NextJS project, but it caused some errors when running the Cypress tests during the CI/CD workflow.

Therefore, I wanted to only include the scripts during the production build, but not include them during the Cypress tests.

Here is my `_app.tsx`:

```js
/** _app.tsx **/

import Head from 'next/head';
import Script from 'next/script';

function MyApp() {
  return (
    <>
      <Head>
        <meta name="viewport" content="width=device-width, initial-scale=1" />
      </Head>
      <header>
        {process.env.NEXT_PUBLIC_LOAD_SCRIPTS &&
          process.env.NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID && (
            <Script id="google-analytics" strategy="afterInteractive">
              {`
                window.dataLayer = window.dataLayer || [];
                function gtag(){dataLayer.push(arguments);}
                gtag('js', new Date());

                gtag('config', '${process.env.NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID}');
              `}
            </Script>
          )}
        {process.env.NEXT_PUBLIC_LOAD_SCRIPTS &&
          process.env.NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID && (
            <Script
              src={`https://www.googletagmanager.com/gtag/js?id=${process.env.NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID}`}
              strategy="afterInteractive"
            />
          )}
      </header>
      <main>{/* content */}</main>
    </>
  );
}

export default MyApp;

```

## Explained

`process.env.NEXT_PUBLIC_LOAD_SCRIPTS` refers to the environment variable `NEXT_PUBLIC_LOAD_SCRIPTS`.

Notice the prefix "`NEXT_PUBLIC_`", this is the NextJS convention to expose the environment variable to the browser.

Without "`NEXT_PUBLIC_`", the environment variable will be undefined in the browser and not load the script.

`process.env.NEXT_PUBLIC_LOAD_SCRIPTS` will be controlled during the CI/CD workflow.

```js
{process.env.NEXT_PUBLIC_LOAD_SCRIPTS &&
  process.env.NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID && (
    <Script id="google-analytics" strategy="afterInteractive">
      {`
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());

        gtag('config', '${process.env.NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID}');
      `}
    </Script>
)}
```


## Conclusion

As you can see, it is quite simple to conditionally load scripts in NextJS using environment variables. 

Feel free to comment if you have any questions or suggestions.
Dolt - SQL database for Git
Tags: webdev, database, sql
Published: 2022-10-21 09:06:28

Have you thought of writing git commands on SQL databases?

Create branches, merge, push, pull and version controls functionalities on SQL tables or databases. 

We can do it using a new SQL database for git called Dolt.

Here is the youtube shorts of one minute introduction to dolt.
[Introduction to Dolt](https://youtube.com/shorts/-xv8a_DHg0o)

Let me know what you think of it?

Keep developing
Shrey
[iHateReading](ihatereading.in)
Requestly Better alternative to Charles Proxy
Tags: debugging, charlesproxy, webdev, webdebuggingproxy
Published: 2023-05-30 05:47:59

---
title: Requestly ➜ Better alternative to Charles Proxy
published: true
date: 2022-10-21 09:04:50 UTC
tags: debugging,charlesproxy,webdevelopment,webdebuggingproxy
canonical_url: https://requestly.io/alternatives/a-better-alternate-to-charles-proxy/
---

[Charles](https://www.charlesproxy.com/) is widely used when it comes to debugging HTTP traffic. Having used Charles myself, I realized Charles works but it is a lot clunky and it has been in **maintenance mode** for quite some time. Charles has a greater **learning curve, collaboration capabilities are not there, doesn’t work with VPN, requires switching between applications,** etc. I used Charles for the lack of a better product and hence decided to build Requestly i.e. a modern client-side web debugging proxy that solves all these problems really well.

Requestly is a lightweight client-side debugging proxy to debug web & mobile apps. For the web, Requestly provides a browser extension on all major browsers and for mobile, Requestly provides a [native Android SDK](https://requestly.com/products/debug-android-apps/) that provides a **Chrome-like developer tool** for Android debug builds. Requestly also has an [In-built mock server](https://requestly.com/products/mock-server/) and allows developers/QAs to record the sessions that facilitate data-rich bug reporting with network logs, console logs, video of the session, env details, etc.

[**_Download Requestly for free!_**](https://requestly.com/)

#### Here’s a detailed comparison of how Requestly fares with Charles

![](https://cdn-images-1.medium.com/max/728/1*lZr6_zH07cxYVV29ixfzDA.png)

#### HTTPs Requests Modifications supported by Requestly

Requestly provides support to modify individual pieces of HTTP request/response be it Setting up [**URL Redirects**](https://requestly.com/products/web-debugger/redirect-urls/), [**Modifying Query Parameters**](https://requestly.com/products/web-debugger/modify-query-params/), [**Modifying Headers**](https://requestly.com/products/web-debugger/modify-http-headers/),[**Modifying API Responses**](https://requestly.com/products/web-debugger/override-api-response/) etc.

![](https://cdn-images-1.medium.com/max/1024/1*ZFbyqUy8I9BvHzd-c8By4A.png)

_Here’s a demo of Modifying API responses:_

{% youtube KIPbxUGUYq8 %}

#### Requestly users tell a better story

![](https://cdn-images-1.medium.com/max/1024/1*OdVJQ2OivJtJTcSy9SP0rg.png)

Give us a try and see for yourself how Requestly is the better alternative to Charles Proxy!

_Originally published at_ [_https://requestly.com._](https://requestly.com/alternatives/a-better-alternate-to-charles-proxy/)

* * *
Requestly Better alternative to Charles Proxy
Tags: debugging, charlesproxy, webdev, webdebuggingproxy
Published: 2022-10-21 09:08:20

---
title: Requestly ➜ Better alternative to Charles Proxy
published: true
date: 2022-10-21 09:04:50 UTC
tags: debugging,charlesproxy,webdevelopment,webdebuggingproxy
canonical_url: https://requestly.com/alternatives/a-better-alternate-to-charles-proxy/
---

[Charles](https://www.charlesproxy.com/) is widely used when it comes to debugging HTTP traffic. Having used Charles myself, I realized Charles works but it is a lot clunky and it has been in **maintenance mode** for quite some time. Charles has a greater **learning curve, collaboration capabilities are not there, doesn’t work with VPN, requires switching between applications,** etc. I used Charles for the lack of a better product and hence decided to build Requestly i.e. a modern client-side web debugging proxy that solves all these problems really well.

Requestly is a lightweight client-side debugging proxy to debug web & mobile apps. For the web, Requestly provides a browser extension on all major browsers and for mobile, Requestly provides a [native Android SDK](https://requestly.com/products/debug-android-apps/) that provides a **Chrome-like developer tool** for Android debug builds. Requestly also has an [In-built mock server](https://requestly.com/products/mock-server/) and allows developers/QAs to record the sessions that facilitate data-rich bug reporting with network logs, console logs, video of the session, env details, etc.

[**_Download Requestly for free!_**](https://requestly.com/)

#### Here’s a detailed comparison of how Requestly fares with Charles

![](https://cdn-images-1.medium.com/max/728/1*lZr6_zH07cxYVV29ixfzDA.png)

#### HTTPs Requests Modifications supported by Requestly

Requestly provides support to modify individual pieces of HTTP request/response be it Setting up [**URL Redirects**](https://requestly.com/products/web-debugger/redirect-urls/), [**Modifying Query Parameters**](https://requestly.com/products/web-debugger/modify-query-params/, [**Modifying Headers**](https://requestly.com/products/web-debugger/modify-http-headers/),[**Modifying API Responses**](https://requestly.com/products/web-debugger/override-api-response/) etc.

![](https://cdn-images-1.medium.com/max/1024/1*ZFbyqUy8I9BvHzd-c8By4A.png)

_Here’s a demo of Modifying API responses:_

{% youtube KIPbxUGUYq8 %}

#### Requestly users tell a better story

![](https://cdn-images-1.medium.com/max/1024/1*OdVJQ2OivJtJTcSy9SP0rg.png)

Give us a try and see for yourself how Requestly is the better alternative to Charles Proxy!

_Originally published at_ [_https://requestly.com._](https://requestly.com/alternatives/a-better-alternate-to-charles-proxy/)