teleren/devto huggingface dataset:
Critical RCE Vulnerabilities Found in git - Fuzzing Weekly CW4
Tags: security, testing, opensource, fuzzing
Published: 2023-01-27 09:58:30

Critical RCE Vulnerabilities Found in git (CVE-2022-4190, CVE-2022-23251):
https://www.helpnetsecurity.com/2023/01/19/git-critical-vulnerabilities/

Fuzzing the Shield: CVE-2022-24548:
https://medium.com/s2wblog/fuzzing-the-shield-cve-2022-24548-96f568980c0

A Framework for Blackbox Fuzzing Using Context-Free Grammars:
https://www.diva-portal.org/smash/record.jsf?aq2=%5B%5B%5D%5D&c=23&af=%5B%5D&searchType=LIST_LATEST&sortOrder2=title_sort_asc&language=en&pid=diva2%3A1729911&aq=%5B%5B%5D%5D&sf=all&aqe=%5B%5D&sortOrder=author_sort_asc&onlyFullText=false&noOfRows=50&dswid=2577
Introducing Shifu Cloud, a K8s-native IoT development platform.
Tags: kubernetes, iot, go
Published: 2023-01-27 09:50:09

TL;DR: Please sign-up for Shifu Cloud's closed beta here: https://signup.shifu.dev/

Hi folks, I’m Yongli, the creator of github.com/edgenesis/shifu. Recently, we are increasingly hearing the voice of making it more user-friendly. 

Today, I’m inviting YOU, my fellow kubernauts, to sign-up for Shifu Cloud closed beta! Shifu Cloud is a major milestone for us, and we really need innovators like YOU to provide your valuable feedback to make it better. In addition, Shifu Cloud will be permanently FREE for open-source contributors!

If you need anything, please do not hesitate to contact me by replying to this thread, or at yc@edgenesis.com.

See you on the cloud, and DO NOT forget to sign-up at https://signup.shifu.dev/!
Yongli
Building a full-stack Typescript project with GraphQL and React Native - Part 1: Setup
Published: 2023-01-27 09:33:35

For this series, I will be building a `Fund raising app`. This application will allow users to request for funds towards a cause and for other users who want to assist to donate a certain amount towards the cause.

Some other use cases are
- Users are able to login and signup(Authentication)
- Users can create a cause for which they need donation towards and generate a link to share which others
- User who create a cause can read and delete the cause but not update unless you're a super admin(authorization)
- The link generated should take the invited users to the app if they have the app or direct them to the relevant store to download the mobile application(deep linking/dynamic linking)
- Users should be able to upvote and downvote a cause. Once a cause is downvoted up to 10 times, it will be reviewed by a moderator. If downvoted up to 100 times, it's marked as fraudulent and stops receiving funds.
- Still considering if I want to include a chat functionality that will include Socket implementation or not
- Other users should be able to make payment on the app. The payment will be handled using Paystack SDK.

Let's dive in


## Backend Set Up

**1.** Create your project folder. I will be calling mine `fund-raising-backend` and navigate into it

```js
mkdir fund-raising-backend
cd fund-raising-backend
```

**2.** Initialize the package.json and open in your favorite code editor. I will be using VS Code 
```js
npm init --y
```
![Project Initialization](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v5m6pky47jokrfb5zng6.png)

**3.** Now, let's install the necessary dependencies
```
yarn add graphql @apollo/server @prisma/client 
yarn add -D typescript @types/node prisma
```
Some quick notes
- We will be using Prisma as our ORM to interface with our Postgres database. For creating a Postgres DB on Render, follow the [official documentation](https://render.com/docs/databases#creating-a-database). At the end, you should have an external connection URL that looks like `postgres://USERNAME:PASSWORD@EXTERNAL_HOST_URL/DATABASE`. Render offers a free database plan that lasts for 3 months

**4.** Set up Typescript configuration by creating the `tsconfig.json` file and specifying the options while configuring the script command

```bash
touch tsconfig.json
```

```json
{
  "compilerOptions": {
    "rootDirs": ["src"],
    "outDir": "dist",
    "lib": ["es2020"],
    "target": "es2020",
    "module": "esnext",
    "moduleResolution": "node",
    "esModuleInterop": true,
    "types": ["node"]
  }
}
```
 In our package.json, update the `scripts` compile typescript while running the compiled file and ensure the `type` is specified as `module`
```json
...
  "type": "module",
  "scripts": {
    "compile": "tsc",
    "start": "npm run compile && node ./dist/index.js"
  }
...
```

At this point, we've not created any file except for our package.json and the node_modules folder from our dependencies. 




The next step will be to 
- Define a schema
- Define a resolver
20 Killer JavaScript One-Liners That’ll Save You Hours of Coding 🤯🔥
Tags: javascript, webdev, html, react
Published: 2023-01-27 09:32:15

Take your JavaScript skills to the next level with these essential one-liners that will also save you hours of coding 🚀

---
###1) Find the max value in an array: 
```js
Math.max(...array)
```

###2) Remove duplicates from an array: 
```js
[...new Set(array)]
```

###3) Generate a random number between 1 and 100:
```js
Math.floor(Math.random() * 100) + 1
```

###4) Check if a string is a valid number: 
```js
!isNaN(parseFloat(string))
```

###5) Get the current date and time: 
```js
new Date().toString()
```

###6) Check if a variable is an array: 
```js
Array.isArray(variable)
```

###7) Check if a variable is an object:
```js
typeof variable === "object"
```

###8) Convert an array to a string:
```js 
array.join(",")
```

###9) Check if a variable is a function: 
```js
typeof variable === "function"
```

###10) Convert an object to an array:
```js
Object.values(object)
```

###11) Count the occurrences of an element in an array:
```js
array.filter(x => x === element).length
```

###12) Create a new object with a dynamic key and value: 
```js
{ [key]: value }
```

###13) Check if a string is a palindrome: 
```js
string === string.split("").reverse().join("")
```

###14) Get the the sum of all the numbers in an array
```js
array.reduce((a, b) => a + b, 0));
```

###15) Get the current timestamp: 
```js
Date.now()
```

###16) Check if a variable is null: 
```js
variable === null
```

###17) Check if a variable is undefined: 
```js
typeof variable === "undefined"
```

###18) Find the minimum value in an array
```js
Math.min(...array)
```

###19) Check if an array is empty: 
```js
array.length === 0
```

###20) Create a new array with a specified range of numbers: 
```js
Array.from({ length: n }, (_, i) => i)
```

---

Hope this is helpful ✨

Do Like ❤️ & Save 🔖

---

Do 𝗙𝗼𝗹𝗹𝗼𝘄 me on **[Linkedin](https://Linkedin.com/in/rammcodes)** for more:
Tips💡+ Guides📜 + Resources ⚡ related to Programming and Web Development 👨‍💻

[![Ram Maheshwari (@rammcodes) Linkedin](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wlsfmflqibz3yam59jkk.png)](https://linkedin.com/in/rammcodes)

---

Do **Follow** me here on dev.to ✅
FormData from Form in mutation!
Tags: formdata, react, reactquery, javascript
Published: 2023-01-27 09:29:11

I have a form in React App and use React Query for mutation data in this array of posts:

```javascript
const POSTS = [
  { id: 1, title: "Green Olly", author: "Garry Molland" },
  { id: 2, title: "Fargus the Greatest", author: "Mazzy Fazzy" },
];
```

I want to send new post information from the HTML form with the new title and author.

```javascript
<form >
        <div className="block">
          <label htmlFor="title">Title</label>
          <input name="title" id="title" type="text"></input>
        </div>
        <div className="block">
          <label htmlFor="author">Author</label>
          <input name="author" id="author" type="text"></input>
        </div>
        <button type="submit" >AddNew</button>
      </form>
```
1.Add onSubmit handler for Form
```js 
 <form onSubmit={(e)=> {
        e.preventDefault();
        newPostMutation.mutate(new FormData(e.target));
        }}>
```
We create new FormData object with From data and prevent Form's standard "action".

2.In our newPostMutation we use useMutation hook because of mutation of the original array of Posts. 
```js
const newPostMutation = useMutation({
    mutationKey: ["addNewPost"],
// key - a unique name for this particular mutation
    mutationFn: async (postFromForm) => {
      const newPost = Object.fromEntries(postFromForm);
      return await wait(1000).then(()=> POSTS.push({id: crypto.randomUUID(), title: newPost.title, author: newPost.author}))},
      onSuccess: () => {
        qClient.invalidateQueries(["posts"]);
      }
  })
```
postFromForm parameter in async  gets new FormData(e.target), then we use Object.fromEntries()transforms a list of key-value pairs into an object. Then we use newPost object to add its properties to pushing object to the Posts array. 

_wait(1000) function for simulation API work_
How to send File from Angular To Web Api C# .Net
Tags: csharp, dotnet, programming, tutorial
Published: 2023-01-27 09:24:44

Passing a file from Angular to a C# Web API with .NET 5.0 can be useful when you need to upload a file to your server for processing or storage. Here's how:

1: You need to configure your C# Web API to accept uploaded files. To do this, you need to add a controller action that takes as input an object of type IFormFile. Here's what it might look like:

```
[HttpPost]
public async Task<IActionResult> UploadFile([FromForm] IFormFile file)
{
	byte[] fileBytes;
	using (var ms = new MemoryStream())
	{
		file.CopyTo(ms);
		fileBytes = ms.ToArray();
        // File processing

	}
}

```
2: In your Angular application, you need to use the FormData object to construct an HTTP POST request containing the file to upload. You can use the append() method of FormData to add the file to the request:

```
uploadFile(file: File) {
    const formData = new FormData();

    formData.append('file', file, file.name);

    this.http.post('/api/upload', formData).subscribe(...);
}

```

Note that in .NET 5.0 you can also use the IFormFileCollection interface to accept multiple files in a single controller action:

```
[HttpPost]
public async Task<IActionResult> ([FromForm] IFormFileCollection files)
{
     // File processing
}

```

```
uploadFiles(files: FileList) {
    const formData = new FormData();

    for (let i = 0; i < files.length; i++) {
        formData.append('files', files[i], files[i].name);
    }

    this.http.post('/api/upload', formData).subscribe(...);
}

```
Streamline Your Job Search: Product Website Launches, product to be Released in the Future.
Tags: api, release, development
Published: 2023-01-27 09:23:38

We are thrilled to announce the launch of our website for our Job Search API product!
This is a big step for us as we work towards revolutionizing the job search process for job seekers and companies alike.

Our website has been designed with user experience in mind, making it easy for you to navigate and find the information you need. It features all the necessary information about our product, including its features.

We know many of you are eagerly waiting for the product to become available, and we want to assure you that it is in the works. We are working tirelessly and we expect to release the API soon. 

In the meantime, we invite you to explore our website and sign up for our newsletter to stay informed about the latest updates. We are confident that our Job Search API will be a game-changer and we can’t wait for you to experience it.
Solving kubectl authentication error on GKE
Tags: devops, googlecloud, kubernetes
Published: 2023-01-27 09:11:32

When you executing `kubectl` command to your cluster on GKE. It will thrown some error like

```
$ kubectl get namespaces
error: The gcp auth plugin has been removed.
Please use the "gke-gcloud-auth-plugin" kubectl/client-go credential plugin instead.
See https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke for further details
```

As GKE change the way to authentication more safely. then we need to upgrade our GKE authentication

But Even installing `gcloud components install gke-gcloud-auth-plugin` and set `export USE_GKE_GCLOUD_AUTH_PLUGIN=True`  might be still not working. Since an existing "Kube context" (credentials) still exist. You need to remove and fetch kube context again.

Here is overall trick to solve the problem

```
$ gcloud components install gke-gcloud-auth-plugin
$ echo 'export USE_GKE_GCLOUD_AUTH_PLUGIN=True' >> ~/.bashrc
$ source ~/.bashrc
$ gcloud components update
$ cp ~/.kube/config ~/.kube/config.backup && rm ~/.kube/config
$ gcloud container clusters get-credentials {{GKE_CLUSTER_NAME}} --region {{GKE-REGION}} --project {{GCP_PROJECT_NAME}}
```
Session Stickiness in Application Load Balancer
Tags: aws, cloud, awscommunity, 100daysofcloud
Published: 2023-01-27 09:00:04

[27/100] #100DaysOfCloud Today, I learned about Session Stickiness in Application Load Balancer.

I used a CloudFormation template to create the resources needed like VPC, Subnets, Auto Scaling Group, Launch Template, EC2 instances, Application Load Balancing etc automatically.  
Stickiness is not enabled in this. 
I tested the load balancer distribution and then enabled session stickiness and noticed that it was locked on to one instance. 

- The sticky session feature (also known as session affinity) enables the load balancer to bind a user's session to a specific target. This ensures that all requests from the user during the session are sent to the same target. This feature is useful for servers that maintain state information in order to provide a continuous experience to clients. To use sticky sessions, the client must support cookies.

- Application Load Balancers support both duration-based cookies and application-based cookies. Sticky sessions are enabled at the target group level. You can use a combination of duration-based stickiness, application-based stickiness, and no stickiness across your target groups.

- The key to managing sticky sessions is determining how long your load balancer should consistently route the user's request to the same target. If your application has its own session cookie, then you can use application-based stickiness and the load balancer session cookie follows the duration specified by the application's session cookie. If your application does not have its own session cookie, then you can use duration-based stickiness to generate a load balancer session cookie with a duration that you specify.

You can try do it by yourself by following the steps from the link below: [GitHub](https://github.com/aaditunni/100DaysOfCloud/blob/main/Journey/027/Readme.md)
waec timetable 2023 for science
Published: 2023-01-27 08:44:23

[https://multischolar.com/waec-timetable/](https://multischolar.com/waec-timetable/#utm_source=backlinks&utm_medium=search&utm_campaign=darry+ring+us&utm_content=Michelle)
https://plaza.rakuten.co.jp/chenlee/diary/202301270000/
https://www.provenexpert.com/waec-z/
https://www.producthunt.com/@waecz1
https://www.divephotoguide.com/user/waecz/
https://wakelet.com/@waecz
https://vocal.media/authors/waecz
https://www.lifeofpix.com/photographers/waecz/
https://seedandspark.com/user/waecz
https://rosalind.info/users/waecz/
http://phillipsservices.net/UserProfile/tabid/43/userId/195951/Default.aspx
https://app.roll20.net/users/11556511/waecz
https://speakerdeck.com/waecz
https://social.msdn.microsoft.com/Profile/waecz
https://camp-fire.jp/profile/waecz
https://plazapublica.cdmx.gob.mx/profiles/waecz/activity
https://www.metal-archives.com/users/waecz
https://storium.com/user/waecz
https://trabajo.merca20.com/author/waecz/
https://www.intensedebate.com/people/waecz
https://www.mifare.net/support/forum/users/waecz/
https://pinshape.com/users/2562173-waecz
http://foxsheets.com/UserProfile/tabid/57/userId/119042/Default.aspx
https://www.kompasiana.com/waecz
https://www.credly.com/users/waecz-2023/badges
https://www.myminifactory.com/users/waecz
https://www.sqlservercentral.com/forums/user/waecz
https://www.longisland.com/profile/waecz
https://leanin.org/circles/waecz
https://guides.co/a/waec-timetable-202/
https://myanimelist.net/profile/waecz
https://www.iheart.com/podcast/269-waec-timetable-2023-for-sc-107911531/
What’s the App Development Cost in 2023?
Tags: appdevelopmentcost, appdevelopment, mobiledevelopment, projectestimation
Published: 2023-01-27 08:33:46

If you're planning to build a mobile app in 2023, it's important to know how to get a realistic estimate for your project before taking the plunge. The cost of app development can get shaky as so many things affect the final price. Let’s go over the main points 👇 

Ultimately, ensuring your mobile app is tailored specifically to meet user demand requires diligent forethought, not just in terms of how big your budget should be but also how long the process will take before launch.

💰 Although app development costs usually fall within a certain **price range (30k-300k USD)**, estimates can vary depending on the individual project. So, analyze each factor carefully. Hence, when thinking about what developing an app can cost you, you must consider various points, such as:

🔹 the app type;
🔹 the design intricacy;
🔹 the required engineering hours;
🔹 the timeline and scope;
🔹 and more.

**What else can make a difference in pricing?** For instance, how you hire developers, the region your developers are from, and their level of expertise. It is vital to understand this cost landscape, both locally and worldwide, as it will strongly influence the price tag for creating an app. As such, based on the rates of Eastern European developers, outsourcing may be much more cost-effective than using the services of US-based developers. 

🤔 As you see, calculating the cost of app development requires careful examination of factors like:

🔵 the people you hire;
🔵 app size and complexity;
🔵 the chosen platform;
🔵 how complicated the app design and implementation are;
🔵 how much time you’ll need for testing;
🔵 the money that’ll be needed after release for ongoing app maintenance and updates.

Taking all this into consideration when estimating the cost of developing a mobile application can help ensure you create a successful product without going over budget.

If you don’t know where to start with estimates on your own, it would be wise to get professional advice to come up with accurate numbers. You may also take advantage of free consultations or use the **cost estimator calculators** available across many platforms to get an idea of what outsourcing a mobile application may cost in 2023. 

If you’d like to dive a little deeper into the peculiarities influencing the overall app pricing when calculating app development costs and **find out how to get realistic numbers**, keep reading here 👉 

> [App Development Cost in 2023: Estimation Guide](https://www.upsilonit.com/blog/app-development-cost-estimation-guide)
Solved: go mod tidy: warning: "all" matched no packages / GO debugger does not work in VSCode
Tags: go, devtools, fail
Published: 2023-01-27 08:11:09

In just some projects `go mod tidy` did not work.

Now I figured out, why:

If you are inside a working directory, which is a symbolic link, it fails with `warning: "all" matched no packages.`.

When you cd to the linked directory, it works.

![go mod tidy](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g7tbeh79btk0c2p8wtn8.png)

"The expert is amazed and the layman is confused!" - Ancient german proverb! 

Update: This also happens with the VSCode debugger.
Could be only a MAC M1 problem...
Custom Format Date Time in MS SQL
Tags: sql, programming, database, webdev
Published: 2023-01-27 08:10:55

The article is originally published to my blog StackBlogger as [MS SQL Server: Select Custom Formatted Date Time](https://stackblogger.com/ms-sql-select-custom-formatted-date/)

MS SQL Server provides several built-in functions to format and display dates in different ways. One of the most commonly used functions is the FORMAT function, which allows you to change the format of a date value with the help of a custom format string.

The syntax of the `FORMAT` function is as follows:

```sql
FORMAT(date, format)
```

The `date` is the date value that you want to format, and the `format` is the custom format string that specifies how the date should be displayed.

For example, let’s say you want to display the current date in the format of ‘yyyy-MM-dd’, you can use the following query:

```sql
SELECT FORMAT(GETDATE(), 'yyyy-MM-dd') AS 'Current Date'
// 2023-01-12
```
 
In this query, the `FORMAT` function is used to format the current date (`GETDATE()`) using the format string ‘yyyy-MM-dd’. The resulting column is given the name ‘Current Date’.

Here are some other examples of how to use the `FORMAT` function:

## MS SQL Custom format a date in the format of ‘dd/MM/yyyy’

```sql
SELECT FORMAT(GETDATE(), 'dd/MM/yyyy') AS 'Current Date'
// 12/01/2023
```

## MS SQL Custom format a date in the format of ‘MM/dd/yyyy’

```sql
SELECT FORMAT(GETDATE(), 'MM/dd/yyyy') AS 'Current Date'
// 01/12/2023
```
 
## MS SQL Custom format a date in the format of ‘dddd, mmmm dd, yyyy’

```sql
SELECT FORMAT(GETDATE(), 'dddd, mmmm dd, yyyy') AS 'Current Date'
// Thursday, 11 12, 2023
```

You can also use the `FORMAT` function in combination with other functions and clauses to format date values from a specific table. For example, to display the date of a specific order in the format ‘yyyy-MM-dd’ from the Orders table, you can use the following query:

```sql
SELECT FORMAT(OrderDate, 'yyyy-MM-dd') AS 'Order Date'
FROM Orders
WHERE OrderID = 123
```
 
In this query, the `FORMAT` function is used to format the `OrderDate` column from the Orders table using the format string ‘yyyy-MM-dd’. The query also uses a `WHERE` clause to filter the results to show only the order with an `OrderID` of 123.

The `FORMAT` function can be also combined with other SQL Server functions like `DATEADD`, `DATEDIFF`, etc to manipulate and filter the date.

```sql
SELECT FORMAT(DATEADD(day, -30, GETDATE()), 'yyyy-MM-dd') AS 'Date 30 days ago'
// 2022-12-13
```
 
In this example, `DATEADD` function is used to calculate the date 30 days ago and `FORMAT` function is used to format the date.

Run the SQLFiddle [link](http://sqlfiddle.com/#!18/dc883) here to get the output and try some more formatting on your own.

In conclusion, the `FORMAT` function is a powerful tool that allows you to format and display dates in a specific format in MS SQL Server. With the ability to use a custom format string, you can easily format your date values to meet your specific needs.
Blogs about by Vlad Mihalcea about YugabyteDB
Tags: yugabytedb, postgres, hibernate, sql
Published: 2023-01-27 08:04:21

I'll maintain here a list of post from Vlad Mihalcea (Java Champion, Hibernate Expert, ) about YugabyteDB (Open Source PostgreSQL-compatible Distributed SQL database).

- [A beginner’s guide to YugabyteDB](https://vladmihalcea.com/yugabytedb/)
- [Strong Consistency with YugabyteDB](https://vladmihalcea.com/strong-consistency-yugabytedb/)
- [YugabyteDB column-level locking](https://vladmihalcea.com/yugabytedb-column-level-locking/)
- [Building a Distributed Audit Log with YugabyteDB](https://vladmihalcea.com/audit-log-yugabytedb/)
- [YugabyteDB Connection Pooling](https://vladmihalcea.com/yugabytedb-connection-pooling/)
- [Scaling a Spring application with a YugabyteDB cluster](https://vladmihalcea.com/scaling-spring-yugabytedb-cluster/)
What is Credential Stuffing? 10 Ways of Prevention
Published: 2024-06-22 08:43:43

---
title: What is Credential Stuffing? 10 Ways of Prevention
published: true
date: 2023-01-27 08:03:58 UTC
tags: 
canonical_url: https://mojoauth.com/blog/what-is-credential-stuffing
---

Cyber attacks have become a problem for everyone, and businesses are particularly at risk. Every day, we hear about new and sophisticated cyber attacks that can compromise sensitive information, disrupt operations, and damage a company’s reputation. Credential stuffing is one such threat that is rapidly rising and causing damage to businesses of all sizes. This is because credential stuffing attacks are relatively easy to execute and can be highly effective, especially if users have reused the same password across multiple accounts.