teleren/devto huggingface dataset:
How to Generate bech32 Bitcoin Address
Tags: bech32, bitcoin, address, typescript
Published: 2023-01-27 14:40:23

Bitcoin addresses are used to receive and send transactions on the Bitcoin network, that’s not news.

To generate an address, you need to have a private key. This private key is converted using cryptographic magic to a public key, and the public key is hashed to produce the address. You can learn more about the relevance of these cryptographic processes from Abubakar.

**_But then, a little backstory;_**

Initially, Bitcoin addresses were based on a "Pay-to-Pubkey-Hash" (P2PKH) format, which used a public key hash as the address. These addresses began with the number "1."

Later, a new address format called "Pay-to-Script-Hash" (P2SH) was introduced, which allowed for more complex scripts to be used in transactions. P2SH addresses begin with the number "3." This format was created to enable the use of multi-signature and other advanced features.

Then, SegWit (short for Segregated Witness) was introduced, which modified the format of P2SH addresses. SegWit addresses, which begin with the number "3" as well, use a different hash and allow for more efficient use of block space, increased transaction capacity, and malleability fix.

Finally, the Bech32 format was introduced, it's a new format of segwit address which has the prefix "bc1" and is more efficient in terms of space and offers error-checking capabilities.

These address formats are all still in use today, but Bech32 is considered the most recommended format, as it offers the most benefits.

In this article, we will demonstrate how to generate a SegWit address in the "Bech32" format using the bitcoinjs-lib and some other libraries that would help us achieve our goal. We are mostly writing TypeScript.

The first step is to install the library by running the following command:

```
npm i bitcoinjs-lib bip32 bip39
```

Next...

### Generate a seed phrase
A seed phrase is just some a set of words that can be rearranged randomly. These words have a range of allowed lengths (i.e. you can only use a seed phrase of a combination of 3, 6, 9, 12, 15, 18, 21 or 24 words). If these words are truly randomly generated, it is statistically impossible to generate 2 identical sets of seed phrase.

This seed phrase should be kept save because whoever has the seed phrase would have access to any address generated from that seed phrase.

Generate a seed phrase with this piece of code:

```
// required imports
const bip39 = require("bip39");

// code
const mnemonic bip39.generateMnemonic().toString();
```
React for Beginners
Published: 2023-01-27 14:39:28

**React** is JavaScript Library used for building Rich UI and helps facilitate page interactions.

_some best practices in react_:
- you may want to close tags `/>` if they are empty.
ex. 

```
const output= <img src={user.someUrl} />;
```

_keywords used throughout this post:_
- attr - attribute
- output - displays the desired result
- UI - user interface

**Introducing JSX in React** -
React JSX: Allows us to put HTML into JavaScript. 
ex: 

```
const firstName = "Oteele"
```
in our html file, we can refer to the variable name firstName in an H1 tag like below: 

```
<h1>my name is {firstName}</h1> // Oteele 
```

**OR try the below in your IDE of choice: **


```
function personName(user) {
  return user.firstName + ' ' + user.lastName;
}
const user = {
  firstName: 'Oteele',
  lastName: 'Ankasa'
};
const output= (
  <h1>
    Hello, {personName(user)}!
  </h1>
);
```


**We can also specify attributes with JSX**:
_using quotes to specify string literals as attr._ 

```
const output= <a href="https://www.reactjs.org"> link </a>;
```

_using curly braces to embed a JSX in an atrr._

```
const output= <img src={user.someUrl}></img>;
```
**As a side note**: Passing double quotes around a curly braces when embedding JSX in an attribute would not wok as expected.`"{}" ❌.
`Better to ignore adding double quotes. `{} ✅`
Composable Apps security practices with Entando on Kubernetes, featuring Ippon expert
Tags: security, composable, architecture, cloud
Published: 2023-01-27 14:23:36

Building composable apps means, without a doubt, understanding how it manages security and reliability. Composable apps offer a lot of advantages to streamline applications, provided by the modularity and reusability of Packaged Business Capabilities. Individual modules and PBCs help isolate problems and security design, separate frontend and backend concerns and allow patching at the component level. At the company level, and with a good hub policy, it turns into “patch once, secure all” because you can easily leverage security fixes if they are applied to centralized modules in a store that all your applications rely on.

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


However, security strategies should not be applied at the code or module level only. The infrastructure has to be fully resilient and secure. No one can imagine using a car with seat belts within an insecure chassis. It doesn't make sense. Security is everyone’s business.

Fortunately, solutions exist to help us design at all levels with security as one of the top priorities.

"Shift security left". It is more than a buzzword, It is good advice according to Lucas Ward in a recent article called [Hardening Kubernetes and What That Entails With Entando](https://blog.ippon.tech/hardening-kubernetes-and-what-that-entails-with-entando/)<span style="text-decoration:underline;">.</span> There, Ward describes how building applications with Kubernetes is challenging.

I agree, building a fully secured application with Kubernetes is a real adventure. If there is something we can't live without, it is security. Whatever business domain we work in, security should be at the center of the design and production processes.

Delaying its implementation is risky; executing it is time consuming.

As Ward spells out, we can rely on frameworks to bring a smooth and dependable way to secure applications, especially with Kubernetes. He says that using a platform such as Entando provides simplicity and a solid base with best practices you can count on to promote security from the ground up.



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




From solid structures and base setup with code generation to a well documented CI/CD process, and opinionated build pipelines, Ward asserts that "using Entando as your platform of choice covers a lot of ground in the Development, Build, and Infrastructure scape."

Saying more without spoiling it is just impossible, just read it! This is my only advice.
Is this a scam or legit?
Published: 2023-01-27 14:17:25

## Story

The other day, I got an email from someone named 'samuel essel'.

The only time I revealed my email was through GitHub, so when he said he wanted to talk to me to work with something, I thought this guy was asking about programming or coding.

## Email

After replying what he wanted to do, he replied back several days later.

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

## My thoughts

Well, I don't have many experience with these emails.

My first thought was that it was a scam. I mean who contacts a random person from the internet because they have the same surname?

My second thought was that it may even be legit. Though it was my first time receiving emails like this, I was pretty sure there were better ways to spam people than simply making up stories.
Open Source of Beginners
Tags: opensource, beginners, webdev
Published: 2023-01-27 14:07:20

Find an open-source project that interests you: There are many open-source projects available on platforms like GitHub, GitLab, and SourceForge. Look for a project that aligns with your skills and interests.

Review the project's contributing guidelines: Most open-source projects have a set of guidelines for contributing. Make sure to read and understand these guidelines before you start working on the project.

Fork the project: A "fork" is a copy of the original project that you can work on. To create a fork, navigate to the project's main page on the platform and click the "Fork" button.

Clone the fork to your local machine: Use Git to clone the fork to your local machine. This will create a local copy of the project on your computer.

Create a new branch: Before making any changes to the code, it's a good practice to create a new branch. This allows you to work on your changes without affecting the main project.

Make your changes: Now you can start making your changes to the code. Make sure to follow the project's contributing guidelines and best practices.

Commit your changes: Use Git to commit your changes to the local copy of the project.

Push your changes to the fork: Use Git to push your changes to the fork on the platform.

Create a pull request: A pull request is a request to merge your changes into the main project. To create a pull request, navigate to the fork on the platform and click the "New pull request" button.

Review and merge: The maintainers of the project will review your pull request and merge it if it meets their standards.

Please note that, these steps may vary depending on the project and platform, it's always good to read the documentation of the project before contributing.
Free course "Cloud Fundamentals: AWS Services for C# Developers" by Nick Chapsas
Tags: csharp, dotnet, aws, tutorial
Published: 2023-01-27 14:07:02

The amazing content creator Nick Chapsas launched just another course: "Cloud Fundamentals: AWS Services for C# Developers".
It is sponsored by AWS so that everybody can enroll for free!

https://nickchapsas.com/p/cloud-fundamentals-aws-services-for-c-developers
Redis as custom storage for NestJS rate limiter
Tags: nestjs, redis
Published: 2023-01-27 13:55:38

---
title: Redis as custom storage for NestJS rate limiter
published: true
tags: ['nestjs', 'redis']
canonical_url: https://sevic.dev/notes/redis-nestjs-throttler/
---

A rate limiter is a standard protection technique against brute force and DDoS attacks. NestJS provides a module for it, and the default storage is in-memory. Custom storage, Redis in this case, should be injected inside `ThrottlerModule` configuration.

### Configuration

The configuration should contain
- TTL (time to live) in seconds
- maximum number of requests within TTL
- Redis URL

```ts
// app.module.ts
import { APP_GUARD } from '@nestjs/core';
import { ThrottlerGuard, ThrottlerModule } from '@nestjs/throttler';
import { ThrottlerStorageRedisService } from 'nestjs-throttler-storage-redis';
// ...
@Module({
  imports: [
    ThrottlerModule.forRootAsync({
      inject: [CustomConfigService],
      useFactory: (configService: CustomConfigService) => ({
        ttl: configService.THROTTLER_TTL_SECONDS,
        limit: configService.THROTTLER_LIMIT,
        storage: new ThrottlerStorageRedisService(configService.REDIS_URL),
      }),
    }),
    // ...
  ],
})
export class AppModule {}
```

### API endpoints setup

Binding the throttler guard can be done in multiple ways.

- guard is bound globally for every API endpoint.

```ts
// app.module
import { ThrottlerGuard } from '@nestjs/throttler';
// ...
@Module({
  // ...
  providers: [{
    provide: APP_GUARD,
    useClass: ThrottlerGuard,
  }],
})
export class AppModule {}
```

- global guard is overridden for the specific API endpoint with the `Throttle` decorator.

```ts
import { Throttle } from '@nestjs/throttler';
// ...
@Controller('users')
export class UsersController {
  @Throttle(USERS_THROTTLER_LIMIT, USERS_THROTTLER_TTL_SECONDS)
  @Get()
  async getUsers() {}
}
```

- global guard is skipped for the specific API endpoint with the `SkipThrottle` decorator.

```ts
import { SkipThrottle } from '@nestjs/throttler';
// ...
@Controller('posts')
export class PostsController {
  @SkipThrottle()
  @Get()
  async getPosts() {}
}
```

### Boilerplate

Here is the [link](https://sevic.dev/nestjs-starter?ref=devto-redis-throttler) to the boilerplate I use for the development.
CodePen Designs - 27 : Colorful Vitamins
Tags: codepen, css, webdev, design
Published: 2023-01-27 13:41:24

### We are excited to introduce our new series that will explore the best design ideas from the Codepen community. 

We will be publishing these each day and hope you find them insightful and inspiring as we showcase some of the most talented designers in this space.

---


#### Codepen Design - 27
---
{% codepen https://codepen.io/wakana-k/pen/mdjMJZK %}



---
## For more information

1. Check my GitHub profile
[https://github.com/amitSharma7741](https://github.com/amitSharma7741)

2. Check out my Fiver profile if you need any freelancing work
[https://www.fiverr.com/amit_sharma77](https://www.fiverr.com/amit_sharma77)

3. Check out my Instagram
[https://www.instagram.com/fromgoodthings/](https://www.instagram.com/fromgoodthings/)

4. Linktree
[https://linktr.ee/jonSnow77](https://linktr.ee/jonSnow77)

5. Check my project

- EVSTART: Electric Vehicle is the Future
[https://evstart.netlify.app/](https://evstart.netlify.app/)
-  News Website in react
 [https://newsmon.netlify.app/](https://newsmon.netlify.app/)
-  Hindi jokes API
 [https://hindi-jokes-api.onrender.com/](https://hindi-jokes-api.onrender.com/)


---
---
Using C++ and OpenCV to Detect Faces
Tags: cpp, openc, ai, computerscience
Published: 2023-01-27 13:15:28

In this article, we will discuss how to use C++ with the OpenCV library to detect faces and integrate the resulting data with IoT devices. OpenCV is a popular open-source computer vision library that allows developers to easily process and analyze visual data. By using C++ and OpenCV together, we can create powerful applications that can detect and track faces in real-time, making it an ideal choice for integration with IoT devices.

## Using C++ and OpenCV to Detect Faces
The first step in integrating C++ and OpenCV for face detection is to install the library on your system. OpenCV can be easily installed on Windows, Linux, and MacOS using pre-built binary packages or by building the library from source. Once the library is installed, you can start creating a C++ program that uses OpenCV to detect faces.

One of the easiest ways to detect faces in an image using OpenCV is to use the CascadeClassifier class. This class takes a trained cascade file as an input, which can be downloaded from the OpenCV website. The cascade file contains the data necessary to detect faces in an image. Once the classifier is loaded, you can use the detectMultiScale() method to detect faces in an image.

Here is an example of how to use the CascadeClassifier class in C++ to detect faces in an image:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/80qabiag6c8oxskhrqgd.png)
## Integration with IoT Devices
Once the face detection is implemented, the next step is to integrate the data with IoT devices. There are several ways to do this, depending on the device and the platform you are using. One popular method is to use the MQTT protocol to send the data from the C++ program to an IoT device.

MQTT is a lightweight messaging protocol that is well-suited for IoT devices because it is low-bandwidth and has a low overhead. It is based on the publish-subscribe model, where the C++ program publishes data to a topic, and the IoT device subscribes to that topic to receive the data.

Here is an example of how to use the Paho MQTT library to publish data to an IoT device:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cmxgvuqp4z50dscb97o8.png)
**Thank you for reading.**
Objects in JavaScript
Tags: beginners, javascript, codenewbie, programming
Published: 2023-01-27 13:11:05


###OBJECTS IN JAVASCRIPT
In JavaScript, an object is an unordered collection of key-value pairs. Each key value pair is called a property.
Key of a property can be a string and the value of a property can be any value, e.g. number, function or array. 
JavaScript provides (many) exact number ways to create an object. Most commonly used is to  use the object  literal notation. 
###Literal notation
The following is an example of creating an object student using literal notation;

###How to Create Objects in JavaScript
```javascript
let student = {};
```javascript
To create an object with properties, you use key-value in curly braces.
For example;
```javascript
let studentDetails= {firstname} ’Gladwin’
let student=new object
Console.log (studentDetails);
```javascript
The Student object has one property: firstName.
Object Constructor
###How to access properties in Objects
###The dot (.) notation

You can access a property in javascript objects by using a dot sign
syntax
```javascript
objectName.Propety
```javasript
The following illustrates how to use dot notation to access a property of an object.
objectName . propertyName
c
The following illustrates how to access the value of an object’s property using bracket/array-like notation.

```javascript
objectName[ ‘propertyName’]
```javascript
For example;
```javascript
let student = {
firstName: ‘Gladwin’
console.log (student [firstName]);
```javascript

Modifying the value of a property
To change the value of a property, you use the assignment operator (=).
For example:

```javascript
let student ={
firstName: ‘Gladwin’
student.firstName= ‘Gladwin’;
console.log (student);
```javasript

###Adding a new property to an object
The following statement   adds the adm no. property  to the student  object and assign 32919 to it;
```javascript
student.adm no =32919;
console.log (student);
```javascript

###Deleting a property of an object
To delete a property in an object, you use the delete operator.
```javascript
delete objectName. propertyName;
```javascript
The following example removes the adm no. property from the student object.
```javascript
delete  student.adm no.;
```javascript

###Checking if a property exists
To check if a property exists in an object, you use the in operator;
```javasript
propertyName in objectName
```javascipt
The in operator returns true if the propertyName exists in objectName.

The following example creates a student object and uses the in operator to check if studentId property exists in the object.
```javascript
let student= {
firstName: ‘Gladwin’
studentId: 6
};
console.log (studentId in student);
```javascript
Open Source Development Course for Perl developers.
Tags: osdc, perl
Published: 2023-01-27 12:55:46

I've just started the course on open source development given by @szabgab. I'm really hoping to get a much better understanding a lot of the tools covered. A know a little about most of the material but as I'm self taught, I just tend to learn the bits I need to get my job done and no more.
How to use ChatGPT by OpenAI for absolute begineers
Published: 2023-01-27 12:50:14

#ChatGpt #OpenAI #AI #Tech #Aremstech #howto #how #tech #tips 

This is the Top most search word right now? “CHATGPT” but what is it , what is it use for and How can you use it? Watch this amazing review to know everything about the Popular ChatGPT

{% embed https://youtu.be/hOUw4gii2co %}

If you find this useful, please LIKE, SHARE, COMMENT & SUBSCRIBE For more videos. Also, hit on the notification bell icon to get notification whenever I upload a new video. 1Love.

Subscribe to my channel by licking this link: http://www.youtube.com/channel/UCxy5QIX22DE86tiqyekeoew?sub_confirmation=1

Connect with me via :
Facebook: @ahmed.idowu90
Instagram: @arems.dev
How to edit a video with Shotcut Video Editor – Free Video Editing Software
Published: 2023-01-27 12:48:13

In this video I will teach you how to edit video with Shotcut Video Editor, Shotcut is a free to use video editing software for both Mac and PC. 
If you are looking for a free video editing software that can run successfully on any computer then I will recommend SHOTCUT.

{% embed https://youtu.be/DrxRAZUcvBs %} 

Use this video as a guide and know how to use SHOTCUT video editor professionally.

If you find this useful, please LIKE, SHARE, COMMENT & SUBSCRIBE For more videos. Also, hit on the notification bell icon to get notification whenever I upload a new video. 1Love.

Subscribe to my channel by licking this link: http://www.youtube.com/channel/UCxy5QIX22DE86tiqyekeoew?sub_confirmation=1

Connect with me via:
Instagram: @arems.dev
Facebook: @ahmed.idowu90
10 Amazing A I Website that will blow your Mind!!!
Published: 2023-01-27 12:46:32

In this video, we're going to share 10 Amazing AI websites that will blow your mind!

These AI websites are some of the most impressive and mind-blowing websites out there. From self-learning algorithms to artificial general intelligence, these websites will challenge your beliefs about what is possible with technology. So be sure to watch this video to see some of the most amazing websites in the world!

{% embed https://youtu.be/4lQ-7MDvqNQ %}
HOW TO DESIGN ANIMATED LIGHT AND DARK MODE SWITCHER IN FIGMA FIGMA TUTORIALS
Tags: webdev, javascript, beginners, productivity
Published: 2023-01-27 12:42:55

In this video I will teach you how to create a Dark mode and Light mode switcher in Figma.  If you find this useful, please LIKE, SHARE, COMMENT & SUBSCRIBE For more videos. Also, hit on the notification bell icon to get notification whenever I upload a new video. 1Love.


{% embed https://youtu.be/gsYXM-xK6Xw %}

Subscribe to my channel by licking this link: http://www.youtube.com/channel/UCxy5QIX22DE86tiqyekeoew?sub_confirmation=1

Connect with me via:
Instagram: @arems.dev
Facebook: @ahmed.idowu90
Top In-Demand Freelance skills for the job
Tags: webdev, programming, career, beginners
Published: 2023-01-27 12:33:56

The biggest freelance marketplace in the world, Upwork, has published its annual list of the most in-demand freelance skills in various categories, including technology, creativity, marketing, and advertising.

## 10 Tech skills for the job:

1. Full Stack Development
2. Front-End Development
3. Back-End Development
4. Mobile App Development
5. Web Design
6. Ecommerce Website Development
7. UX/UI Design
8. CMS Development
9. Manual Testing
10. Scripting & Automation

## 10 Marketing skills for the job:

1. SEO
2. Social Media Marketing
3. Digital Marketing
4. Lead Generation
5. Sales & Business Development
6. Telemarketing
7. Search Engine Marketing
8. Email Marketing
9. Marketing Strategy
10. Marketing Automation

## 10 Customer Service & Admin Support skills for the job:

1. Email, Phone & Chat Support
2. General Virtual Assistance
3. Data Entry
4. Digital Project Management
5. General Research Services
6. Tech Support
7. Dropshipping & Order Processing
8. Community Management
9. Market Research
10. Transcription

## 10 Accounting & Consulting skills for the job:

1. Accounting
2. Recruiting & Talent Sourcing
3. Bookkeeping
4. Financial Analysis & Modeling
5. Management Consulting
6. Instructional Design
7. HR Administration
8. Business Analysis & Strategy
9. Tax Preparation
10. Financial Management/CFO

## 10 Design & Creative skills for the job:

1. Graphic Design
2. Video Editing
3. Illustration
4. 3D Animation
5. Presentation Design
6. Image Editing
7. Cartoons & Comics
8. Product & Industrial Design
9. 2D Animation
10. Video Production

**Conclusion
**In terms of year-over-year growth, the most in-demand skills on the Upwork platform are sales and business development (54%), data entry (47%), accounting (45%), and 3D animation (44%).

We hope you find these in-demand freelance skills as valuable and informative as we did. Please do not hesitate to [ask](https://techbinate.com) any questions about this article.