teleren/devto huggingface dataset:
NextJS Project: How to create QR code from any URL
Tags: nextjs, webdev, javascript, beginners
Published: 2024-06-04 21:36:40

In this video, I’m excited to share my latest project – a QR code generator app with built-in analytics. After finding existing solutions costly, I decided to create my own. This app will help you generate QR codes easily, and track their usage effectively.

Let's build this app together! I'll be developing it right here on YouTube and then using it myself for some time to ensure it's working perfectly. After that, I'll deploy the app and make it available for public use.

📋 Agenda for this video:
- Taking a URL as input – Learn how the app accepts any URL you want to convert into a QR code.
- Creating the QR code – See the process behind generating a functional QR code.
- Downloading the QR code as an image – Discover how to save your QR code for easy sharing.
- Copying the QR code to the clipboard – Quickly copy your QR code for instant use.

In this video, I covered topics:
1. Using hooks (useState, useRef)
2. Client Component in NextJS
3. ShadCN UI Integration and Usage
4. Form handling with React Hook Form
5. Form schema validation with Zod
6. Event handling 
7. Copy to Clipboard functionality

📹 Stay tuned for more videos where I’ll share the development journey, new features, and future enhancements, such as a URL shortener, link in bio, and advanced analytics.

{%youtube R3phIupkMBM%}

👍 Like, share, and subscribe if you find this video helpful!
SHBJSKSBJBDAKDABJKABADA
Published: 2024-06-04 20:59:16

SHBJSKSBJBDAKDABJKABADASHBJSKSBJBDAKDABJKABADASHBJSKSBJBDAKDABJKABADASHBJSKSBJBDAKDABJKABADASHBJSKSBJBDAKDABJKABADA
SHBJSKSBJBDAKDABJKABADA

[https://github.com/h4ikyu-du3p5t3r-b4ttl3-index](https://github.com/h4ikyu-du3p5t3r-b4ttl3-index)
[https://github.com/m4mel-kannnja-crawel-index](https://github.com/m4mel-kannnja-crawel-index)
[https://github.com/hAikYu-an1m3-f1Lm-index](https://github.com/hAikYu-an1m3-f1Lm-index)
[https://github.com/kingD0m-0f-m0ny3t-index](https://github.com/kingD0m-0f-m0ny3t-index)
[https://github.com/maxfariosa-s4Ga-jjkuikk-aleX4dria-index](https://github.com/maxfariosa-s4Ga-jjkuikk-aleX4dria-index)
[https://github.com/garf1eLd-uc1n6-orenn-index](https://github.com/garf1eLd-uc1n6-orenn-index)
[https://github.com/asyduiab-sabufmyboobduas-najsn-index](https://github.com/asyduiab-sabufmyboobduas-najsn-index)
How to use Notion as a backend in a project using Next.js
Published: 2024-06-04 20:56:24

# How to use Notion as backend

In the world of web development, the choice of backend is crucial for the functioning and scalability of an application. However, what if we could harness the capabilities of a versatile tool like Notion as the backend for our applications? In this article, we will explore how we can integrate Notion as the backend in Next.js, a combination that offers flexibility, ease of use, and creative potential for web projects.

## Why Notion and Next.js?

- Notion: Notion is an all-in-one platform that allows creating documents, databases, wikis, and more, all in one place. Its intuitive interface and powerful features make it an attractive option for managing content.
- Next.js: Next.js is a React framework that allows building fast and scalable web applications with ease. Its focus on server-side rendering and static page generation makes it a popular choice for modern web projects.

## Steps to incorporate Notion as Backend in Next.js:

### 1. Step 1: Notion Setup:

- Create an account on Notion if you haven't already.
- Create a database in Notion to store your application data.
- Define database properties according to your application needs, such as text, numbers, options, etc.

### 2. Step 2: Notion API Setup:

- Access the Notion developer area and create an integration for your application.
- Get your Notion integration token, which will be used to authenticate requests to the API.

### 3. Step 3: Next.js Project Setup:

- Create a new Next.js project using the Next.js CLI or your preferred method.
- Install necessary dependencies to make requests to the Notion API, such as axios or another similar library.

### 4. Step 4: Integration with Notion API:

- Use the Notion integration token to make requests to the API and fetch or modify data in your database.
- Implement functions in your Next.js project to perform CRUD (Create, Read, Update, Delete) operations on the Notion database as needed.

### 5. Step 5: Data Consumption in Next.js:

- Utilize data obtained from Notion to render dynamic content on your Next.js pages.
- Design and style your React components using data retrieved from Notion to create an engaging user experience.

## Conclusion:

The combination of Notion as the backend and Next.js as the frontend offers a powerful and flexible way to build modern web applications. By leveraging Notion's capabilities to manage data and content, along with the speed and scalability of Next.js, developers can efficiently and effectively create sophisticated digital experiences. By following the steps mentioned above, you can incorporate Notion as the backend into your Next.js projects and unlock a new level of creativity and functionality in your web applications. Start experimenting today!
comment on i need a hacker to recover money from binary trading
Published: 2024-06-04 20:25:55

It is worthy of the world to hear this testimony. I'm here to spread the word about Captain WebGenesis's wonderful deeds. My name is Martin Luther. I lost USD 232,000.00 in a binary investment trading scam and didn't realize it until a few weeks later. The site and services I utilized appeared authentic, and everything appeared legitimate until I emailed them to request a withdrawal of my weekly gains and they did not reply. I looked online for a specialized expert to help me get my money back. After reading countless testimonials about how Fastfund Recovery has assisted numerous con victims in getting their money back from fraudulent investment firms, I decided to give the expert a trial. I contacted Fastfund Recovery and submitted my case to the expert. He assured me that all my lost money would be retrieved and returned to my wallet address. Fastfund Recovery worked on my case, and to my amazement, my lost funds were returned to my wallet within 72 hours. Contact Fastfund Recovery right away to have your lost money returned to you.
Contact Info
Tele gram ; Fastfundsrecovery
G mail ; { Fastfundrecovery8 (AT) Gmail com }
Nginx Alias Path Traversal
Published: 2024-06-04 20:22:50

**Path Traversal**
Overview of the Vulnerability
Path traversal uses a server misconfiguration to access hidden files and directories that are stored on the served web application. This can include sensitive operating files, code and data that runs the application, or in some cases, user credentials.

An attacker can leverage the path traversal vulnerability in this application to gain access to system files in a folder of a directory that is not intended for public access.

**Business Impact**
Path traversal can lead to reputational damage for the business due to a loss in confidence and trust by users. It can also result in data theft and indirect financial losses to the business through the costs of notification and rectifying and breached PII data if an attacker can successfully exfiltrate user data.

**Steps to Reproduce**
Use burp to replicate this request:

```
GET /api../README.md HTTP/2
Host: site.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip,deflate,br
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4512.0 Safari/537.36
Connection: Keep-alive
```

Note that it was possible to read the contents of the file.

I performed other checks, but I was unable to read the name of other commonly identified files, but you can better validate by checking the name of other files that actually exist on the server and properly validate the vulnerability.
Also note that the information contained in the readme file is partly from the external environment, where it mentions internal files, shows the execution of a cron job, displays the name of the internal server, among other information.

PoC:

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

Reward/Status:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3n5eflj4ll4ktvdw4k0b.png)
FlowerShop
Published: 2024-06-04 20:21:56

The Flower Shop NYC offers an incredible selection of tops that combine style and comfort perfectly. Whether you're dressing up for a special occasion or looking for something casual, their collection has something for everyone. For the latest in fashionable tops, make sure to [visit](https://www.theflowershopnyc.com/tops/) their website and explore the variety they have to offer.
My New Full-Stack Developer Portfolio
Tags: webdev, javascript, beginners, programming
Published: 2024-06-04 20:14:32

I've always admired the stunning portfolios created by designers, so I decided to try my hand at creating my own fancy portfolio as a full-stack developer. I'd love to get your feedback and suggestions on how I can improve it!

You can check out my portfolio here: [My Portfolio](http://coolkira.vercel.app/)

If you're interested in the code behind it, you can find the repository on GitHub: [GitHub Repository](https://github.com/kiraaziz/new-me)
Frontend axios middleware
Tags: interceptor, webdev, beginners, programming
Published: 2024-06-04 20:10:00

import axios from 'axios'
import jwt_decode from "jwt-decode";
import dayjs from 'dayjs'
import { useContext } from 'react'
import AuthContext from '../context/AuthContext'


const baseURL = 'http://127.0.0.1:8000'


const useAxios = () => {
    const {authTokens, setUser, setAuthTokens} = useContext(AuthContext)

    const axiosInstance = axios.create({
        baseURL,
        headers:{Authorization: `Bearer ${authTokens?.access}`}
    });


    axiosInstance.interceptors.request.use(async req => {
    
        const user = jwt_decode(authTokens.access)
        const isExpired = dayjs.unix(user.exp).diff(dayjs()) < 1;
    
        if(!isExpired) return req
    
        const response = await axios.post(`${baseURL}/api/token/refresh/`, {
            refresh: authTokens.refresh
          });
    
        localStorage.setItem('authTokens', JSON.stringify(response.data))
        
        setAuthTokens(response.data)
        setUser(jwt_decode(response.data.access))
        
        req.headers.Authorization = `Bearer ${response.data.access}`
        return req
    })
    
    return axiosInstance
}

export default useAxios;
Linux Date Commands
Tags: linux, gnu, commands
Published: 2024-06-04 20:01:48

Explaining different date formats  according to your needs
1.Date 

- date -u :Displays the time in Coordinated Universal Time (UTC).

```
04 يون, 2024 UTC 07:32:39 م
```

- date -d "next Friday" 

```
07 يون, 2024 EEST 12:00:00 ص

```

- date -R Outputs the date and time in RFC 2822 format.

output
```
Tue, 04 Jun 2024 22:37:39 +0300

```

- date -I :Outputs the date in ISO 8601 format
 
output
```
2024-06-04
```

- date "+%Y-%m-%d %H:%M:%S" customizable formate

```
2024-06-04 22:49:23
```

%Y: Year (4 digits)
%m: Month (2 digits)
%d: Day (2 digits)
%H: Hour (00-23)
%M: Minute (00-59)
%S: Second (00-59)
%A: Full weekday name (e.g., Monday)
%a: Abbreviated weekday name (e.g., Mon)
%B: Full month name (e.g., January)
%b: Abbreviated month name (e.g., Jan)

- date -s or --set: date -s "2023-12-31 23:59:59"
Sets the system date and time.

- date --rfc-3339=seconds
```
2024-06-04 23:10:08+03:00
```

- date -d "2023-12-31 23:59:59" Display the date and time for a specific date:

```
31 ديس, 2023 EET 11:59:59 م
```
Top Video Processing APIs for 2024
Published: 2024-06-04 20:01:20

What are your top Video Processing APIs? 

Video processing APIs allow developers to automate tasks like video encoding, video decoding, video editing, video resizing,  video watermarking, and extracting video metadata from video files.

There are 5  types of video processing APIs: 
1. Video Preview APIs
2. Video Encoding APIs
3. Video Decoding APIs, and
4. Video Manipulation APIs

Video Preview API
-Generate Video Thumbnail API
Video Encoding API
-Compress Video File API
-Convert Video Formats API
-Video Storage API
-api.video's CDN API
Video Decoding API:
-Generate GIF from Video API
-Generate Watermark For Videos API
Video Manipulation API
-Extract Video Metadata API
-Extract Audio from Video API

Read here for more: https://apyhub.com/blog/top-video-processing-apis-2024
Top 7 Featured DEV Posts of the Week
Tags: top7
Published: 2024-06-04 19:47:12

_Welcome to this week's Top 7, where the DEV Team handpicks our favorite posts from the previous week._

Congrats to all the authors that made it onto the list 👏

{% embed https://dev.to/fsh02/the-long-path-of-javascript-from-es6-until-today-3gc3 %}

Farid walks us through how JavaScript has transformed since the launch of ES6, the second major and biggest release for the language back in 2015, until today. 

{% embed https://dev.to/jderochervlk/rescript-has-come-a-long-way-maybe-its-time-to-switch-from-typescript-29he %}

Josh presents a compelling argument for trying out ReScript for your next project. 

{% embed https://dev.to/opensauced/how-to-assess-your-skill-level-before-contributing-to-open-source-4pn3 %}

Bekah designed a self-assessment guide that helps developers prepare to make meaningful and impactful contributions to open source.

{% embed https://dev.to/rogiia/how-to-build-a-basic-rag-app-h9p %}

Roger shares tutorial to create a Resource Allocation Graph app, complete with a Google Colab notebook with step-by-step examples.

{% embed https://dev.to/abbeyperini/share-your-experience-loudly-and-often-36ah %}

Abbey encourages community members to share their knowledge and experiences. 

{% embed https://dev.to/kibumpng/strategies-for-effective-urgent-ticket-classification-3ian %}

Laura helps us define and understand the meaning of urgency, and provides a guideline for classification and communication with stakeholders.

{% embed https://dev.to/arjunrao87/the-art-of-complaining-effectively-3kal %}

Arjun challenges readers to voice your complaints more constructively.

_And that's a wrap for this week's Top 7 roundup! 🎬 We hope you enjoyed this eclectic mix of insights, stories, and tips from our talented authors. Keep coding, keep learning, and stay tuned to DEV for more captivating content and [make sure you’re opted in to our Weekly Newsletter] (https://dev.to/settings/notifications) 📩 for all the best articles, discussions, and updates._
FastAPI Beyond CRUD Part 6 - CRUD With Async SQLModel (An Introduction to Dependency Injection)
Tags: fastapi, api, python, programming
Published: 2024-06-04 19:32:34

In this video, we build our CRUD functionality replacing the in-memory database (Python-list) with persistence from a real database (PostgreSQL). We also look at organizing our CRUD code to separate database logic from the route code.
{%youtube AtHEX76Wysw%}
localforage vs localstorage
Tags: javascript, webdev
Published: 2024-06-04 19:31:13

# Localforage vs Localstorage
So, whats the difference between localforage and localstorage? And why do people recommend localforage rather then localstorage?

Its quite simple actually.

## Localforage
Localforage is an asynchronous based local database simular to localstorage but internally it uses IndexedDB.

IndexedDB is an arguably better alternative to localstorage, the problem is its kinda complex.
Localforage has a simple localstorage like syntax for IndexedDB.
Localforage also has a fallback to other storage methods for old browsers.

It's good for saving large data as IndexedDB has more storage then localstorage.

## Localstorage
Localstorage is a synchronous based local database.
You don't need to use promises/async syntax for it.

It has a lot less storage then IndexedDB.
It's great for saving user settings without using cookies.

## Conclusion
Its ultimately your choice.
I personally recommend localstorage for simply saving settings like dark mode, etc but i recommend localforage for saving data that is large in size, or if you can only use async in the current situation.
Registrations for Eastern India's largest Hackathon are officially OPEN! 🔥
Published: 2024-06-04 19:28:51

## Hack4Bengal 3.0: Registrations Now Open!
Hack4Bengal 3.0, Eastern India's largest hackathon, is now open for registrations! This premier event, set to take place in Kalyani, West Bengal on June 28, 2024, is a golden opportunity for coders of all levels to showcase their skills, collaborate on innovative solutions, and compete for glory. Whether you're a seasoned developer or a beginner, Hack4Bengal promises a supportive environment with mentors, workshops, and numerous resources.

## Why Join Hack4Bengal 3.0?

- Inclusive Participation:
 Open to all skill levels, with dedicated workshops for beginners.

- Team Building:
 Form teams of 2-4 members or join as a solo hacker and find your team on Discord.

- Comprehensive Support:
 Enjoy free participation, meals, beverages, and sleeping arrangements.
Real-world Challenges: Address pressing societal and environmental issues through technology.

## Event Highlights
**Free Participation:** No cost to join, with meals, snacks, and swags provided.
**Expert Mentorship:** Guidance and workshops to help beginners and experienced hackers alike.
**Exciting Prizes:** Compete for top prizes and recognition.
Networking Opportunities: Meet like-minded tech enthusiasts and industry leaders.

## Frequently Asked Questions
**Is participation free?** Yes, it's absolutely free.
**Can beginners join?** Definitely, with ample support and resources available.
**Team size?** Teams of 2-4 are encouraged, with options for solo hackers to join teams via Discord.
**Under 18?** Allowed with parental consent.

**Registrations link :** https://lu.ma/0nruupo3?tk=6X86Ta
Sell Backstage like a salesperson
Tags: platform, idp, devex
Published: 2024-06-04 19:28:40

I've chatted with many platform/infra teams who are struggling to get buy-in for internal tools (ex:[backstage](https://backstage.io/)) in the current market.

The problem is that they're using the wrong sales process! 

Typically, someone sets up backstage during a hackweek, wins 1-2 HC and then after a year of mixed adoption and 'good' impact, management pulls the plug.

The mistake is to treat an internal tool like a bottom-up experiment (roll it out and hope DORA metrics tick up) rather than a top-down sales process (where you are mapping the needs and criteria of your ‘buyer’ from day one). 

If you look at commercial alternatives to backstage ([Cortex](https://www.cortex.io/), [Port](https://www.getport.io/), etc), they tell a very different story (scorecards, service creation) to a different audience (Directors/VPs). Vendors know that there is no point engaging unless they've aligned on KPIs & Q/Q goals with a purchaser. 

My view? To get y2 for your internal tool you need exec buy-in from d1, (and you should borrow marketing/ROI language from a commercial solution 😛 )
Install Notion on Ubuntu
Tags: notion, linux, ubuntu
Published: 2024-06-04 19:25:09

**Install Notion on Ubuntu effortlessly**! This guide provides clear steps to set up Notion on your Ubuntu system and boost your productivity

[Notion](https://www.notion.so/) can be your hero! This powerful workspace goes beyond just a database, tackling your note-taking, tasks, projects, and keeping everything organized in one place. But wait, there's good news! Even if you're an Ubuntu user, getting started with Notion is a breeze! This guide will walk you through the process in a few simple steps.

#### 1. Open the Terminal

Press Ctrl + Alt + T simultaneously, and a terminal window will appear.

#### 2. Update and Upgrade

Before installing Notion, it's good practice to ensure your system has the latest updates.

```Bash
sudo apt update
sudo apt upgrade
```
#### 3. Install Notion

Now comes the fun part! Run the following command in the terminal to install the necessary Notion packages:

```Bash
sudo apt install notion-app-enhanced
sudo apt install notion-app
```

####4.  Launch Notion:

Once the installation is complete, you can launch Notion directly from the terminal by typing:

```Bash
notion-app
```
If you still facing any issue after installing the Notion on Desktop version.I noticed that some people had problems installing

```bash
sudo apt purge notion*
sudo snap install notion-snap-reborn
```

Want to learn more? Feel free to check out my website (link in bio) or connect with me on [LinkedIn](https://www.linkedin.com/in/a4sa/) for more Ubuntu tips and tricks!
T-Shirt Tuesday
Published: 2024-06-04 19:04:58

Welcome back to T-Shirt Tuesday, our weekly post inspired by the creative ideas in [our Discord Community](https://discord.gg/4PWXpPd8HQ). 
Each week, we bring fun and unique phrases that you'd love to see on a t-shirt.

This week's cover image features piece of code that many developers live by!


``` js
if (brain!empty){
 keepCoding();
}
else {
 orderCoffee();
}
```

Now, it's your turn: 
**What witty or inspirational phrase would you proudly wear on a t-shirt?**

Drop your suggestions in the comments below!
[And give us a ⭐ on GitHub if you haven't yet! ](https://github.com/webcrumbs-community/webcrumbs)
How to Capitalize String Python Dataframe Pandas
Tags: python, datascience, webdev
Published: 2024-06-04 19:02:38

There are two main ways to capitalize strings in a pandas DataFrame:

### 1. str.capitalize():

This method capitalizes the first letter of each word in a string element.
```python
import pandas as pd

# Create a DataFrame
df = pd.DataFrame({'text': ['hello world', 'python programming', 'pandas']})

# Capitalize the first letter of each word
df['text'] = df['text'].str.capitalize()

print(df)
```
![Capitalize Dataframe Pandas](https://pleypot.com/wp-content/uploads/2024/05/Python-Replit-4-1.png)
### 2. Vectorized string methods:

You can achieve capitalization using vectorized string methods like .str.upper() for uppercase and string slicing for selecting the first character.
```python
import pandas as pd

# Create a DataFrame
df = pd.DataFrame({'text': ['hello world', 'python programming', 'pandas']})

# Capitalize the first letter and lowercase the rest
df['text'] = df['text'].str[0].str.upper() + df['text'].str[1:].str.lower()

print(df)
```
This will the **output**.
```
       text
0  Hello World
1  Python Programming
2     Pandas
```