teleren/devto huggingface dataset:
Level up your vulnerability management skills . . . painlessly
Tags: security, devops, learning, containers
Published: 2024-02-14 19:46:39

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

Turns out, vulnerabilities don't disappear if you ignore them, and regulation is catching up. If you're working in software in 2024, it's imperative to know how to manage vulnerabilities quickly and effectively. Unfortunately, according to [a shocking statistic from CISA](https://www.cisa.gov/news-events/news/we-must-consider-software-developers-key-part-cybersecurity-workforce), 23 of the top 24 computer science programs don't require courses in cybersecurity. 

To help the industry sharpen its vulnerability management skills, we're launching our action-packed, over-the-top course [Painless Vulnerability Management with Chainguard](https://courses.chainguard.dev/). Free for a limited time, this course will help developers understand the landscape, tools, and practices of vulnerability management, and learn how to use Chainguard Images to make the process a breeze.   

If you want to learn why vulnerability management is so critical, impress your boss or prospective employer, or simply avoid enabling the next software supply chain attack, this course is for you! We promise to equip you with all the skills you need to painlessly manage vulnerabilities, and just as many memes!
¡Haz de tu pasión una profesión exitosa!
Tags: music
Published: 2024-02-14 19:02:09


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

Invierte en tu pasión musical y transforma tu amor por la música en una profesión prometedora. Explora nuestros programas respaldados por la Secretaría de Educación Pública, que te brindan habilidades y conexiones para destacar en la industria. ¡Haz de tu pasión una carrera musical y haz tus sueños realidad!

Todo eso y más en [Fermatta!](https://fermatta.edu.mx/)
Difference between var, let and const, in Javascript.
Tags: javascript, var, let, const
Published: 2024-02-14 18:27:36

var is global scope,
let is block scope,
const is also block scope.

But we can change the value of let variable within its block scope as many times as we want.

And we can never be able to change the value of const variable again after it is initilized in its scope.

In other words:

We can mutate the let variabe value any number of times,
But const is constant forever.


I Hope you understand this well, Thanks.
The End.
Easy media query breakpoint variables in Next.js
Tags: nextjs, sass, css
Published: 2024-02-14 18:01:39

## Problem

In web projects of any size, you want to keep your magic numbers to a minimum – for example your CSS Breakpoints.

> A magic number is a unique value with unexplained meaning or multiple occurrences which could (preferably) be replaced with a named constant.

_\- [Wikipedia](https://en.wikipedia.org/wiki/Magic_number_(programming))_

Instead of writing `@media (min-width: 768px)` 100 times, we want to use a variable for 768px. By design, CSS variables cannot be used in media queries though.

## Solution

Enter @include_media ([Website](https://eduardoboucas.github.io/include-media/)) ([GitHub](https://github.com/eduardoboucas/include-media)). 

A Sass Mixin that allows you to write media queries like this: 

```scss
.header {
  @include media(">phone", "<=tablet") {
    background: red;
  }
}
```

But how to make it play nicely with Next.js?

First, install it, and if you haven't yet, install `sass`, too.

```bash
npm i -D include-media sass
```

To use the mixin in your entire codebase, we can import it in  `next.config.js`:

```js
const nextConfig = {
  sassOptions: {
    additionalData: `@import "./node_modules/include-media/dist/_include-media.scss";`
  },
};
```

For my React components, I use CSS modules. Since Next.js has built-in Sass support, we only have to rename the files to `*.sass`, for example `Header.module.scss`. Inside this file, you can now easily use the mixin: 

```scss
.header {
  padding: 1rem;
  @include media(">phone", "<=tablet") {
    background: red;
  }
}
```

JSX:

```jsx
import styles from 'Header.module.scss';

export function Header() {
  return (
    <div className={styles.header}>
      <h1>Resize browser window to see it in action</h1>
    </div>
  )
}
```

Customization options and the default breakpoints can be found on the [Website](https://eduardoboucas.github.io/include-media/) and in the [Docs](https://eduardoboucas.github.io/include-media/documentation/).
Grand Finserv Loan C U S T O M E R .Care Helpline Number 7783–878–426  !!0786–482//7440 7783–878426
Tags: webdev, javascript, programming, react
Published: 2024-02-14 17:59:30

Grand Finserv Loan C U S T O M E R .Care Helpline Number ∆7783–878–426∆∆ !!0786–482//7440∆∆7783–878426∆∆All RELATED ENQUIRY TOLL?
Learn GitHub Actions
Published: 2024-02-14 17:56:42

GitHub Actions makes it easy to automate all your software workflows with world-class CI/CD. Build, test, and deploy your code right from GitHub. The following modules will enable you with the necessary skills and knowledge to understand how your customers can use GitHub Actions to automate their software development workflows.

[learn.microsoft.com](https://learn.microsoft.com/es-es/collections/n5p4a5z7keznp5?&sharingId=6CEE4813CD91BFC6)
Synchronous and Asynchronous in JavaScript
Published: 2024-02-14 17:48:31

In JavaScript, synchronous operations block instructions until the task is completed, while asynchronous operations can execute without blocking other operations.

Synchronous JavaScript: In a synchronous operation, each step is performed one after the previous one is finished. This means that it blocks or waits for each operation to complete before moving on to the next.

Asynchronous JavaScript: In an asynchronous operation, operations don’t wait for each other to finish. This means multiple operations can be going on at the same time. When you start an operation, you can move on to another operation before the previous one finishes. This is particularly useful for tasks that take a lot of time, such as requests to servers.

For example, if you have a function that fetches data from a server and it takes two seconds to get the response, you wouldn’t want your entire application to stop and wait for these two seconds. Instead, you would want to perform other tasks and deal with the response when it’s ready. This is where asynchronous JavaScript comes into play.
Feels like I am starting from scratch after a computer science degree.....
Tags: newbie, cybersecurity, webdev
Published: 2024-02-14 17:16:15

How does one actually navigate the job market without any jobe experience?
Am at this stage,Without any tech job experience.Feeling like there is alot to learn since a university curriculum is filled with past technologies 👴👴.
Will come back later and revisit this as i currently learn about CyberSecurity and Cloud computing.
Getting Started with Version Control Using Git...
Tags: github, git, versioncontrol, webdev
Published: 2024-02-14 17:12:54


## 📝Getting Started with Version control using Git:


**🔍 What is Version Control?**
Version control allows you to track changes to files over time. It's like having a time machine for your code, enabling you to roll back to previous versions, collaborate with teammates seamlessly, and maintain a clear history of your project's evolution.

**🚀 Introducing Git:**
Git is a powerful distributed version control system designed to make collaboration and project management a breeze. With Git, you can work on your code locally, create branches to experiment with new features, and merge changes effortlessly.

**🔧 Setting Up Git:**
Getting started with Git is easy! Simply download and install Git on your machine, and configure your username and email address. Voila! You're ready to rock and roll with version control!

**🛠️ Common Commands:**

```
git init
```
Initialize a new Git repository.

```
git clone [repository_url]
```
Clone an existing repository.
```
git add [file_name]
```
Add changes to the staging area.
```
git commit -m "[commit_message]"
```
Commit changes to the repository.
```
git status
```
Check the status of your repository.
```
git log
```
View commit history.
```
git branch [branch_name]
```
Create a new branch.
```
git checkout [branch_name]
```
Switch to a different branch.
```
git merge [branch_name]
```
Merge changes from a different branch.
```
git push [remote_name] [branch_name]
```
Push changes to a remote repository.
```
git pull [remote_name] [branch_name]
```
Pull changes from a remote repository.

**🌟 Example Workflow:**
Let's say you're working on a new feature for your project. Start by creating a new branch, making your changes, committing them, and then merging them back into the main branch. With Git, managing your project's workflow has never been easier!

**💡 Best Practices:**
Remember to write clear commit messages, keep your commits focused and atomic, and regularly pull changes from the remote repository to stay up to date with your team's progress.

🎉 Ready to level up your development game with Git? Dive in, experiment, and don't hesitate to reach out if you have any questions along the way. Happy coding! 🚀🌟 #Git #VersionControl #HappyCoding
Valentine Colored Hearts
Tags: css
Published: 2024-02-14 17:08:21

##Color Change


I wanted to change the color of a Valentines heart. The structure is same as in JavaScript heart from an earlier post. This post is focused on the CSS Animation.

{% embed https://dev.to/jarvisscript/javascript-dev-heart-messages-5hl4 %}

This is a screenshot. I'm having issues trying to share the live version of this. 

![orange heart on red background. Should be a heart change from red to yellow to orange and back to red then repeating ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lmjhbpkv42nx7nb3vpdh.jpg)

```css
/* Animate the colors */
.bigheart, .bigheart:before, .bigheart:after {
	animation: ColorChange 10s infinite;
}

@keyframes ColorChange {
	0% {
		background-color: var(--heart-red);
	}

	100% {
		background-color: var(--orange);
	}
}
```
This looks good but it loops back to red abruptly. 

Make it smoother by changing the orange and adding a 100% stop to the original color. Now it will change from red to orange and slowly back to red.

```css
/* Animate the colors */
.bigheart, .bigheart:before, .bigheart:after {
	animation: ColorChange 10s infinite;
}

@keyframes ColorChange {
	0%, 100% {
		background-color: var(--heart-red);
	}

	50% {
		background-color: var(--orange);
	}
}
```

##Three stops

Adding a third color. So it will go red to yellow to orange and back to red.

```CSS
@keyframes ColorChange {
	0%, 100% {
		background-color: var(--heart-red);
	}

	50% {
		background-color: var(--yellow);
	}

	66% {
		background-color: var(--orange);
	}
}



```

##Wrap-up
This was fun to play win animations and make the heart change colors. Getting the timing right too some work. at first it was too quick more distracting than enjoyable so I make the time longer.

##Previous Posts

{% embed https://dev.to/jarvisscript/javascript-dev-heart-messages-5hl4 %}

{% embed https://dev.to/jarvisscript/javascript-hearts-input-a-user-message-5cm7 %}
Fast track your FastAPI implementation and eliminate boilerplate
Tags: fastapi, python, webdev, react
Published: 2024-02-14 17:03:56

ICYMI: MongoDB has released a new Full Stack FastAPI, React, MongoDB (FARM) base application generator for Python webdev.

It has always been easy and quick to start building modern web applications with MongoDB and FastAPI. But we still had to make many decisions about other parts of the stack, such as authentication, testing, integration etc., and manually integrate these components.

The [MongoDB FastAPI app generator](https://github.com/mongodb-labs/full-stack-fastapi-mongodb) simplifies this process further via:

- Docker Compose Integration
- Built-in Authentication System: Includes user management schemas, models, CRUD, and APIs, with OAuth2 JWT token support and magic link authentication.
- MongoDB ODMantic for ODM creation
- Next.js/React Frontend with middleware authorization for page access control, Form validation using React Hook Form, State management with Redux, and CSS and templates with TailwindCSS, HeroIcons, and HeadlessUI
- Operational and Monitoring Tools: Includes Celery for task management, Flower for job monitoring, Traefik for seamless load balancing and HTTPS certificate automation, and Github Actions for comprehensive front-end and back-end testing.

Go from zero to fullstack FastAPI application in less than ten minutes.

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

[Here is a link](https://github.com/mongodb-labs/full-stack-fastapi-mongodb) to the github repo so you can check it out!
Unleashing the Power of VSCode for Swift and iOS Development
Tags: swift, ios, vscode, appdevelopment
Published: 2024-02-14 16:52:28

Are you a fan of Visual Studio Code (VSCode) and wish you could use it for Swift and iOS development? Well, you're in luck! While Xcode is the official IDE for Swift and iOS, with a few tweaks and tools, you can transform VSCode into a powerful environment for your development needs. Let's dive in!
## Setting the Stage
First things first, you'll need to have Xcode and VSCode installed on your machine. Xcode is essential for its command line tools and simulators, while VSCode is our star player.
## Powering Up VSCode
Once you've got the basics, it's time to supercharge VSCode with some Swift-specific extensions:
1. **Swift for Visual Studio Code**: This extension, by Kasik96, brings Swift language support to VSCode. Just search for `Swift` in the Extensions view and hit install.
2. **CodeLLDB**: This is your go-to for debugging Swift code. Search for `CodeLLDB` in the Extensions view and install it.
3. **SwiftLint**: A tool for enforcing Swift style and conventions. Install it via Homebrew with `brew install swiftlint`.

## Running Swift Code
With your VSCode now Swift-ready, you can create a new Swift file and run your code directly from the built-in terminal. Just navigate to your file's directory and run `swift <filename>.swift`.

## Tackling iOS Apps
Here's where things get a bit tricky. VSCode doesn't have built-in support for iOS simulators, so you'll need to use Xcode for running and testing your iOS apps. But don't worry, you can still write and debug your code in VSCode.
Start by creating a new iOS project in Xcode, then open the project in VSCode. You can now write your Swift code and use the Swift and CodeLLDB extensions for linting and debugging. When you're ready to run your app, switch back to Xcode and hit the `Run` button.

## Wrapping Up
While VSCode might not be the official IDE for Swift and iOS development, with a little bit of setup, it can become a powerful tool in your development arsenal. So why not give it a try?
PayloadCMS: V2 Migration guide
Tags: webdev, payloadcms, typescript, mongodb
Published: 2024-02-14 16:48:11

I couldn't find a guide like this, so I want to share my own experience.

> It's not an ultimate guide to migration from Payload 1.x to 2.x, but rather a step-by-step account of my personal experience undertaking this migration.

## Upgrade packages

Firstly, you need to upgrade your packages. 

For the Payload itself, you need to upgrade to version 2.

```sh
yarn add payload@2.0.0 
```

We're going to continue using MongoDB, so we need to install the MongoDB dependencies as well.

```sh
yarn add @payloadcms/bundler-webpack @payloadcms/db-mongodb @payloadcms/plugin-cloud @payloadcms/richtext-slate
```
## Server

For the server setup, the only change is to remove the database initialization.

```ts
// server.ts: remove this line
mongoURL: process.env.MONGODB_URI,
```

## Payload Configuration

For the `payload.config.ts` file, you need to import the new dependencies.

```ts
// payload.config.ts: Add these lines at the beginning of the file.
import { payloadCloud } from '@payloadcms/plugin-cloud'
import { mongooseAdapter } from '@payloadcms/db-mongodb'
import { webpackBundler } from '@payloadcms/bundler-webpack'
import { slateEditor } from '@payloadcms/richtext-slate'
import { buildConfig } from 'payload/config'
```

In the build configuration, you need to add some settings.

```ts
export default buildConfig({
  ...
  admin: {
    ...
    bundler: webpackBundler(),
  },
  ...
  plugins: [payloadCloud()],
  editor: slateEditor({}),
  db: mongooseAdapter({
    url: process.env.MONGODB_URI,
  }),
});
```

## Routes

I have some custom views. In version 1.1, the custom views are declared as an array, but now they are declared as an object. The name changes from "routes" to "views."

```ts
// before
export default buildConfig({
  admin: {
    ...
    components: {
       routes: [
         {
            path: '/path/to/view',
            Component: CustomReactComponent,
         }
       ]
    }
  }
});

// after
export default buildConfig({
  admin: {
    ...
    components: {
      views: {
        CustomViewComponent: {
          path: '/path/to/view',
          Component: CustomReactComponent,
        },
        AnotherViewComponent: {
          path: '/path/to/view',
          Component: CustomReactComponent,
        },
      }
    }
  }
});
```

It will have other breaking changes that I couldn't write here. Please feel free to write about any other breaking changes you encountered in your project in the comments. Additionally, don't hesitate to ask for help if needed
Creating "Past" Commits in Git ⏳
Tags: git, github, past, webdev
Published: 2024-02-14 16:29:24

> "Always pass on what you have learned." - Yoda


Have you ever wished you could turn back time in your version control system? With Git, you can! This nifty feature allows you to create commits and set their dates to the "past." Let's explore how this can be done and when it might come in handy.

## How to Create "Past" Commits

The process to perform this magical time manipulation is surprisingly simple. Just use the following command:

```bash
git commit --date "X days ago" -m "Your commit message"
```

Replace "X" with the number of days you want to go back and "Your commit message" with a descriptive summary of your changes. For instance, if you want to create a commit with the date of 10 days ago, execute:

```bash
git commit --date "10 days ago" -m "Fix critical bug introduced last week"
```

## When to Use This Feature 🤔

### Retroactive Fixes
Discover a critical error in your code that slipped through a few days ago? Fear not! You can fix it without disrupting your current commit history. This feature helps maintain the integrity of your project's timeline while swiftly addressing issues.

### History Adjustments for Clarity
In smaller projects or solo endeavors, you may find yourself wanting to refine the project's history for better comprehension. Creating "past" commits can retroactively reflect changes that should have been made earlier, providing a clearer narrative of your project's evolution.

### Integration with Specific Workflows
Certain workflows, especially in personal or experimental projects, benefit from the flexibility of creating commits with retroactive dates. This can streamline specific tasks or align with unconventional development methodologies.

## Proceed with Caution ⚠️

While the ability to manipulate commit dates offers flexibility, it should be approached with caution, particularly in collaborative settings. Altering the commit history can introduce confusion and complications for fellow collaborators. Consider the potential impact on team dynamics and operations before utilizing this feature.

## Final Thoughts 💭

In my experience, the need for "past" commits has been rare, if ever-present. However, knowing that Git offers such capabilities adds a fascinating dimension to version control. Have you ever found yourself in a situation where creating a "past" commit was the solution?

Embrace the power of time travel responsibly, and may your commit history remain clear and concise!
Развитие нейросетевых технологий и роль Чата Рунета в этом процессе
Tags: webdev, chatgpt
Published: 2024-02-14 16:27:32

Была запущена инновационная платформа Чат Рунета, которая использует передовые технологии искусственного интеллекта, основанные на архитектуре модели GPT, и позволяет генерировать мультимедийный контент в режиме "одного" окна.

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

Она предоставляет доступ к передовым продуктам OpenAI, включая Всезнайка на базе ChatGPT-4, DALLE-3 и другим генеративным AI в режиме "одного окна".

Преимущества при использовании Чат Рунета:
   - Всё в одном месте: получить доступ к широкому спектру инструментов OpenAI, включая генерацию текста, изображений и кода можно в режиме "одного окна", что существенно экономит время и упрощает рабочий процесс.
   - Отсутствие абонентской платы: разработчики сервиса стремятся к честности и прозрачности в предоставлении своих услуг. Оплата взимается только за то, что используется. После пополнения счёта деньги расходуются соразмерно запросам к любой платной модели ИИ, доступной в сервисе, а оставшиеся неиспользованные финансы  можно вернуть даже через год.
   - Сервис доплачивает в виде бонусного кэшбэка за использование его возможностей. Это делается для того, чтобы обеспечить более высокое качество генераций.
   - Бесплатный Всезнайка: платформа предоставляет бесплатный доступ к генерациям Всезнайка на базе ChatGPT3.5, что позволяет экспериментировать и создавать контент без каких-либо ограничений.
   - Пробный бесплатный платеж: после регистрации в сервисе начисляется пробный бесплатный платеж, который можно использовать для ознакомления с платными функциями, такими как, например, GPT-4 Turbo.

Скоро будут доступны и другие мультимедийные ИИ-модели - в ближайшее время мы планируем добавить поддержку дополнительных бесплатных и платных моделей ИИ, таких как работа с аудио, видео, картинками и текстом.

Наша команда стремится сделать платформу ChatRU.net максимально удобной и функциональной для пользователей. Мы постоянно работаем над расширением списка предлагаемых моделей ИИ, чтобы вы могли создавать и генерировать контент любого типа. Если у вас есть какие-либо вопросы, вы всегда можете обратиться в нашу службу поддержки, и мы с радостью вам поможем." - заявил основатель сервиса "Чат Рунета" .

Сервис доступен по адресу https://ChatRU.net