teleren/devto huggingface dataset:
📦 Stay Organized and Efficient with Auto-Label-Pulls Github Action
Tags: autolabelpulls, opensource, workflows, githubactions
Published: 2023-07-01 03:34:12

## ❓ What is `auto-label-pulls`?

[Auto Label Pulls](https://github.com/marketplace/actions/auto-label-pulls) is a robust [GitHub Action](https://github.com/features/actions) that can significantly streamline the process of labeling Pull Requests. Its `branch-based` mechanism offers the flexibility to cater to various project needs, making it an indispensable tool for any GitHub project maintainer.

Whether you have a small project or manage a large repository with tons of pull requests, `auto-label-pulls` can help you stay organized and save valuable time.

----

<img src="https://media.giphy.com/media/c4Nc0v0g15g9G/giphy.gif" />

----

## 💡 Key Features

- **Easy to Set Up:** Getting started with `auto-label-pulls` is a breeze. All you need to do is include the action in your GitHub workflow file and configure the necessary parameters.

- **Automatic Label Assignment**: Labels are automatically assigned to new pull requests based on the target branch, removing the need for manual labelling.

- **Customizable**: You can configure which labels correspond to which branches, allowing you to use in a way that suits your project's needs.

----

## 🚀 Getting Started

Using `auto-label-pulls` is simple and straightforward:

- **First**, add the action to your GitHub workflow file (`.github/workflows/main.yml`).

```yaml
name: Workflow Name

on:
  pull_request:
    types: [opened]

jobs:
  label:
    runs-on: ubuntu-latest
    steps:
      - name: Assign labels
        uses: shiftEscape/auto-label-pulls@v1.0.0
        with:
          token: "${{ secrets.GITHUB_TOKEN }}"
          config-path: ".github/config/auto-label-pulls.json"
```

> NOTE: Use this action only for `pull_request` event of type `opened`.

- **Second**, create a configuration file (`.github/config/auto-label-pulls.json`) for the mapping of `labels` to `branches`.

```json
{
  "master": "🚀 Production Deployment",
  "develop": "🧪 SIT Deployment"
}
```

> In the above example, when a `Pull Request` is made to `master` branch, "🚀 Production Deployment" label will be assigned to that PR and so on and so forth.

> 💡 Visit the Action's Dashboard for more info: [https://github.com/marketplace/actions/auto-label-pulls](https://github.com/marketplace/actions/auto-label-pulls)

----

## 👏 And there you have it, folks! 

By incorporating `auto-label-pulls` into your GitHub workflow, you're not just organizing your process – you're revolutionizing it.

Explore the tool, share your thoughts, and let's transform the `open-source` space together!

Thanks for reading! 😉

----

<img src="https://media.giphy.com/media/UQaRUOLveyjNC/giphy.gif" />
Scaling a Node.js Application with Distributed Caching: Part 3 - Hazelcast
Tags: node, caching, hazelcast, scalability
Published: 2023-07-01 02:30:00

---
title: Scaling a Node.js Application with Distributed Caching: Part 3 - Hazelcast
published: true
description: 
tags: node, caching, hazelcast, scalability
series: "Node.js Scaling Strategies: A Deep Dive into Distributed Caching"
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
published_at: 2023-07-01 08:00 +0530
---

In the second part of this series, we explored how to scale a Node.js application using distributed caching with Memcached. Now, let's take a look at another popular caching solution - Hazelcast.

## Introduction to Hazelcast

Hazelcast is an open-source, in-memory data grid based on Java. It provides distributed data structures and computation services for your applications, allowing you to share and partition your data across a cluster of machines.

## Why Choose Hazelcast?

Hazelcast offers a set of distributed data structures and services that are highly available and extremely scalable. It's a great choice for applications that require a high volume of reads and writes, as well as those that need to maintain state across multiple servers.

## Setting Up Hazelcast

To use Hazelcast in a Node.js application, you need to install the hazelcast-client package. You can do this using the following command:

```bash
npm install hazelcast-client
```

After installing the `hazelcast-client` package, you can use it in your application like this:

```javascript
const { Client } = require('hazelcast-client');

// Create a Hazelcast client
const client = await Client.newHazelcastClient();

// Get a distributed map
const map = await client.getMap('my-distributed-map');

// Put and get a value from the map
await map.put('key', 'value');
const value = await map.get('key');
console.log(value); // 'value'

```
In the above code, we first require the `hazelcast-client` package and then create a new Hazelcast client. We then get a distributed map and put a key-value pair in the map. After that, we retrieve the value of the key from the map.

## Scaling with Hazelcast

When scaling a Node.js application with Hazelcast, you can use multiple Hazelcast instances. The Hazelcast client will automatically distribute the data among the instances.

## Conclusion
In this part, we explored how Hazelcast can be a powerful tool for scaling a Node.js application. It allows you to distribute data across multiple machines, which can significantly speed up your application. In the next part of this series, we will compare the performance of Redis, Memcached, and Hazelcast to help you choose the best tool for your needs.
Use a custom data folder on Flatpak apps
Tags: linux, flatpak, tips
Published: 2023-07-01 02:27:31

---
title: Use a custom data folder on Flatpak apps
published: true
description: You can run Flatpak apps on a separate data folder to allow separate instances of the same app, better isolation of personal/work data, and more. Here's how...
tags: ["linux", "flatpak", "tips"]
canonical_url: https://ivanalejandro0.com/blog/flatpak-custom-data-folder/
---

## The problem
You want to use different data/configuration folders for a Flatpak application, or maybe run multiple instances independent from each other.

I read through Flatpak's man pages, cli help and [documentation](https://docs.flatpak.org/en/latest/) but I didn't find a solution to my problem.


## The solution
Run the flatpak app with a different `HOME` env variable.

```
env HOME=/path/to/your/custom/flatpak/home flatpak run your-app
```

And that's pretty much it, everything related to running this specific app will be contained on that path you just used. And subsequent runs will work just as it would if you'd use the default home.

## Example
For example, let's say we want a separate instance of [Zoom](https://zoom.us/) ([Zoom on Flathub](https://flathub.org/apps/details/us.zoom.Zoom)) to run along the default one.

And also, let's use [Flatseal](https://flathub.org/apps/details/com.github.tchx84.Flatseal) to manage the flatpak app permissions.

I also created a couple of scripts to simplify the task of starting them up:

```
$ cat zoom.sh
#!/bin/sh
env HOME=$(pwd)/custom-flatpak-home flatpak run us.zoom.Zoom

$ cat flatseal.sh
#!/bin/sh
env HOME=$(pwd)/custom-flatpak-home flatpak run com.github.tchx84.Flatseal
```

Here's how the data folder looks like:

```
~/apps/zoom.1$ tree -L 4 -a
.
├── custom-flatpak-home
│   ├── .cache
│   │   └── flatpak
│   │       └── system-cache
│   ├── Documents
│   │   └── Zoom
│   ├── .local
│   │   └── share
│   │       └── flatpak
│   ├── .var
│   │   └── app
│   │       ├── com.github.tchx84.Flatseal
│   │       └── us.zoom.Zoom
│   └── .zoom
│       ├── data
│       │   ├── com.zoom.ipc.assistantapp__req
│       │   ├── com.zoom.ipc.assistantapp__res
│       │   └── zoomus.enc.v2.db
│       ├── im
│       ├── logs
│       │   └── zoom_stdout_stderr.log
│       ├── reports
│       └── screenCapture
├── flatseal.sh
└── zoom.sh

19 directories, 6 files
```

## Use cases
How can you take advantage of this? or what could this be useful for?

* logging in into multiple accounts on some app at the same time, maybe Teams or Zoom.
  * this can be useful to isolate them from each other, or
  * to use multiple accounts when it's not supported natively by the app
* playing around with an app and its configurations without worrying about breaking your main working app
* use this isolation to contain the data for a "disposable" instance you want to run, for tests/experiments/etc
What's Next ➡️
Tags: programming, cybersecurity, beginners, career
Published: 2023-07-01 01:48:30

I finished freeCodeCamp’s Responsive Web Design certification, so what’s next for me? At some point, I believed I would start studying JavaScript after I finished, with the goal of focusing on web development. Combining web development with my marketing skills was the plan. 

However, during this time I’ve had several conversations, interviews, and considered what type of job I want.  After working in the e-commerce space, my perspective had me thinking of ways I could use web development for e-commerce businesses. Business strategy + marketing + web dev seemed like the natural next step. 

I’ve had a lot of time to consider what industry I want to work in and like many people early in their careers, I ended up with more questions than answers.  

Where did I find my career guidance? Twitter, of course. 

_Seriously_. I ended up interviewing with a cybersecurity training company I found via Twitter and that’s when things started to click. I didn’t get the job, but I realized the importance of cybersecurity. What I appreciate about cybersecurity is the proactive nature of it. How technology changes and those changes require us to continue to learn and solve problems in creative ways. When I went to cybersecurity events, I realized there were people who always studied cybersecurity and people who transitioned into the industry.  And in cybersecurity, diversity is a strength because it helps us see problems from multiple perspectives. 

With my new interest in cybersecurity and desire to continue increasing my technical skills, I chose Python as my next programming language. I’ve heard positive stories about Python from so many people and know it can be used in a variety of ways, including cybersecurity. I also hope to add some personal projects to my GitHub as a keep learning. Like before, I’m using freCodeCamp as my main learning resource. I’m also interested in the Security+ Certification as part of my cybersecurity learning. 

As for my career, I’m currently applying and interviewing for a full-time job. My goal is to find a company where I can use my marketing experience, in addition to my technical skills.  I think my next role will be involved with marketing; however, I hope to find a company that is involved in using innovative technology solutions. If you know about any job opportunities that fit that description, you can send me an email (I would greatly appreciate it). 

My other goal is to keep writing updates as I continue to learn. I think this will keep me accountable and also serve as a good example of what I'm learning. I know programming can be overwhelming for people like me with non-technical backgrounds, but I also know it’s possible to learn and use.
Configuring Git and Github on your Linux PC
Tags: learning, linux, git, github
Published: 2023-07-01 01:45:19

## Configuring Git and Github on your Linux PC
### What is Git?
Git is a collection of simple tools that are used for version control in software development. 

### What is GitHub?
Github is a service for software development and version control using git that allows developers to store and manage their code. To get started with, follow the following instructions:

### Create a Github account
To work with Github, you first have to create an account. To do this, 
	1. Open the GitHub [signup webpage](https://github.com/join)
	2. Fill out the form to create your account
	3. Verify the email address connected to your Github account



### Configure Git and GitHub
After creating a GitHub account, the next step is to configure Git on your PC. To do this:
1. Open a new terminal on your linux PC by pressing the keys `ctrl+alt+t`, or prefferrably search for Terminal on your search menu.

![terminal](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9fl1avxs27khsvkkt7pk.png)

2. To make the output of your git commands more readable and easier to understand, type in `git config --global color.ui true`. This tells Git to use colors in it’s output when it is run in a terminal.
 
3. To configure Git, you are required to specify your name. To do this, type `git config --global user.name + your name`.

4. To configure your email address, type `git config --global user.email`  + the email address you used to sign up to GitHub.

![email](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aczq8q9w6ibbjo25j89s.png)

5. Type `git config --global init.defaultBranch main` to update the default branch nameLinks to an external site. to main

6. Type `ssh-keygen`, for each prompt do not type anything, just continue to press <Enter>. It's particularly important that you do not enter a passphase and leave the passphrase empty when prompted; otherwise, you'll have to enter that passphrase any time you interact with GitHub (which will happen a lot during the program); and you may run into issues.

![ssh key](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jpp8rt9lp1w8rxlkqgtj.png)

7. Type `cat ~/.ssh/id_rsa.pub` and copy the key that will be generated

On your GitHub account, navigate to settings and select [SSH and GPG keys](https://github.com/settings/keys)

![ssh&gpg](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a9nb9mgzt2udu4fdqhse.jpeg)

8. Type "My personal PC" in the "Title" input field

9. Paste what’s on your clipboard from step seven in the "Key" input field. Click on "Add SSH Key"


![ssh & gpg key](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/361rolbxwt7rgwfwsdjz.png)

To push your code to GitHub, you should configure your GitHub account into code editor of choice. I found this article to be useful if you're working with VSCode: [Working with GitHub in VSCode](https://code.visualstudio.com/docs/sourcecontrol/github).
That's all for now, I hope this article helps.
1Password + Hashnode Hackathon 2023: Published on GitHub Deployed to Netlify
Tags: netlify, vite, react, hackathon
Published: 2023-07-01 01:07:25

## Finishing up

This has been a great week of learning for me @builditdeploy. 
 I started writing on [Dev](https://dev.to/builditdeploy), and worked through deploying a basic app for the [1Password + Passage + Hashnode Hackathon 2023](https://hashnode.com/hackathons/1password?source=hackathon-feed-widget).

I published my work on [Github at 100stacks](https://github.com/100stacks/1password-passage-hashnode-hackathon) and deployed the app to [Netlify](https://1password-passage-hashnode.netlify.app/).

## Next Steps

I'll take what I learned from this week and expand it into other projects. Thank you for watching! 💻👀

---
Photo courtesy of <a href="https://unsplash.com/@lg17?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Lance Grandahl</a> on <a href="https://unsplash.com/photos/OxXmASDLFjY?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
Fortify Your Cloud: Best Practices for Security and Compliance with AWS Infrastructure and Services
Published: 2023-07-01 00:25:53

Discover the best practices that can assist you in achieving your #security and #compliance objectives by leveraging AWS infrastructure and services.

Explore the Security Pillar to access the latest AWS recommendations for designing cloud architectures with security as a top priority. Gain insights into robust security measures and strategies that can help safeguard your applications and data in the cloud. Learn more:https://go.aws/3O33HEB

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wdq7lr5aeyw9hsr11wjr.jpg)
Higher-Order Components (HOC) in React, for beginners
Tags: webdev, javascript, react, tutorial
Published: 2023-06-30 23:32:58

If you are working with React, you might have heard of the term higher-order component or HOC. But what does it mean and why is it useful? In this article, I will try to explain the concept of HOCs in a simple and beginner-friendly way. I will also give a brief introduction to system design for frontend developers.

## What is a higher-order component?
Components are the building blocks of React applications. They allow us to break down complex UIs into smaller and simpler parts that can be reused and composed together.

A higher-order component (HOC) is a function that takes a component as an argument and returns a new component. It is a way of enhancing or modifying the behavior or appearance of an existing component without changing its source code. For example, here is a HOC that adds a border around any component:

```jsx
function withBorder(WrappedComponent) {
  return function (props) {
    return (
      <div style={{ border: "2px solid green" }}>
        <WrappedComponent {...props} />
      </div>
    );
  };
}
```

The withBorder function takes a component (WrappedComponent) and returns another component that renders the original component inside a div with a border style. The returned component also passes down any props it receives to the wrapped component using the spread operator {...props}.

Assume a basic react component which says adds `Hello,` before passes prop (name)

```jsx
function Greeting(props) {
  return <h1>Hello, {props.name}!</h1>;
}
```
The following picture shows rendering of before and after wrapping a component with a higher order component (HOC) 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ahcr12062apo4cu0nh6l.png)

## Advantages of using HOCs

- They promote code reuse and avoid duplication. Instead of writing the same logic or style in multiple components, we can extract it into a HOC and apply it to any component we want.
- They separate concerns and enhance readability. Instead of mixing different aspects of functionality or appearance in one component, we can separate them into different HOCs and compose them together.
- They follow the principle of composition over inheritance. Instead of creating complex class hierarchies to inherit behavior or appearance from parent components, we can use simple functions to compose components together.

**Some best practices and conventions to follow when writing HOCs:**

- Use descriptive names that start with `with`. This makes it clear that the function is a HOC and what it does. For example, `withBorder`, `withLoading`, `withData`, etc.
- Pass down all props to the wrapped component. This ensures that the HOC does not interfere with the props that the wrapped component expects or needs. Use the spread operator `{...props}` to pass down all props easily.
- Do not mutate or modify the wrapped component. This can cause unexpected side effects and break the component. Instead, create a new component that wraps the original component and adds the desired functionality or appearance.
Introducing Near Real Time Tracking - ELD Mandate
Tags: eldmandate, realtimeportaltrucks, timeportalproactiveeld
Published: 2023-06-30 23:08:53

We are here to offer top-notch ELD services that will help you stay compliant with the **ELD Mandate**, and it helps you in streamlining your work processes and making your life on the road easier.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/trhxtgitpnnwjfzf9gjm.png)

We are the [best ELD provider in Canada & US](https://www.eldmandate.biz/), we are committed to providing our customers with the best possible service. Our ELD devices are user-friendly, reliable, and efficient, helping you to keep track of your hours of service and maintain compliance with federal regulations.

Cargo Theft is estimated to be a $15B to $35B problem per year according to the National Insurance Crime Bureau. Also, less than 20% of stolen cargo is ever recovered. 

To solve this problem, **ELD Mandate** released our Asset Tracker into the market. So far, the response to our product has been tremendous. We are excited to continue to be trusted by fleet managers across the country with their trucking technology needs. 

Our software team has been hard at work to implement near live tracking capability for our customers. This feature helps our clients in case of any robbery and can also help give better insight into where the truck is at all times. After thorough testing and feedback, we are excited to introduce Near Live Tracking for all our current customers. No extra cost or additional hardware required. Anyone who has purchased our Asset Tracker will have this feature. 

To access near live tracking, please go to the back-end portal:

[Asset Tracker Portal](https://www.eldmandate.biz/telematics)

After logging in, and selecting the asset that is of interest, users can now click on Near Live Tracking:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u9s5z6m6mbek9y06n76j.png)

At first it will get the asset to the current location and then it will show in near real time the location of the asset. This can be very useful to ensure that any stolen cargo is found quickly and also to just check where the truck or trailer is at this very moment. From the comfort of a computer or a smartphone device, our customers can now track their assets on a near real time basis. 

We at **ELD Mandate**, want to continue to collaborate with our customers and add features that directly impact their business. We have a few more things brewing in the pipeline. Near Real Time tracking adds an extra layer of safety which helps give our customers peace of mind. That is what truly matters.
Snakes in the Grass
Tags: jobhunt, scam, security
Published: 2023-06-30 22:53:17

### Staying safe throughout your job hunt
 
Recently, I have embarked on a full time job hunt, in search of an **opportunity** as a web developer. Even though times are tough right now, there are still good jobs out there worth applying to. While I have been applying to a number of different jobs, I have recently come across what I believe to be a **scammer**. 

With technology where it is today, and especially after the pandemic with remote jobs rising, **phishing** for someone to scam through job boards has become prevalent (accord to [The Federal Trade Commission's Consumer Advice](https://consumer.ftc.gov/articles/job-scams)).

#### Real World Example

I received an email recently from someone, who's name I will reveal (fake or not). The email, while it did not sound 100% legit, piqued my interest as I am intently looking for a job. I emailed back, and received a questionnaire to fill out in return. 

This questionnaire ran for about 20 questions long, and asked questions from entry level software engineer questions to personal questions about my life and experiences. I believed that this was a **legit** pre screening document, and that I would fill it out and turn it in to them. 

After doing some digging, I saw that the address provided by the recruiter for the business was not even owned by that business. It was a random building owned by another business in the middle of Texas. Furthermore, the company had little to no digital footprint, and from there things started to look very shady. I looked up the recruiter on LinkedIn, and my search result revealed a fake persona. 

I am anxious to see what they say next, as I did respond with answering the questionnaire (most of the info could have been found on my LinkedIn) but I assume they will ask for more sensitive information down the road.

With the world of technology as it is today, don't fall victim to those that want to prey on you. Protect yourself, and don't ignore the signs. Stay vigilant, and on the hunt. Good luck on your search for a job!