teleren/devto huggingface dataset:
Automating file organization via PowerShell
Tags: fileorganization, powershell
Published: 2023-10-26 03:24:16

My process in sharing and archiving event media (aka the numerous pictures and videos that I take in various formal and informal events) is to, first, download the file from the memory card and sort them out according to the date and type of event. This is a tedious task especially if a batch consists of several days of events, or worse, several weeks. You can imagine that I would copy the folder from the memory card to my personal computer and that folder would contain all the raw files of the pictures that I took — they are not organized in folders initially.

The next step would be to categorize them in folders according to the date of the event they were taken. For the folder names, I’m using the ISO representation of date format, for example the date 2 October 2023 would be 2023-10-02. In this way, it’s easy to sort the folders chronologically; and even without the day or month, sorting still makes sense. Of course, I have done this manually for a very long time, until I’ve thought of using a [batch file in creating all the dates of the year](https://www.briandys.com/create-windows-documentation-folders/?ref=devto). The batch file approach helped a lot because it setup the folders with dates for all of 2023. With this approach, I simply check the files’ dates and drag them to their respective folders that were created by the batch file.

I still felt that it could be better — my current process was tedious than it’s supposed to be. So I searched for a batch file program that will automatically distribute the files into folders that have their respective dates. Where I arrived in my shallow search is at [PowerShell](https://en.wikipedia.org/wiki/PowerShell).

[Check out the script and complete steps in my blog](https://www.briandys.com/automating-file-organization-via-powershell/?ref=devto).
Hacktoberfest'23: Acting like a dev
Tags: hacktoberfest, hacktoberfest23, opensource, beginners
Published: 2023-10-26 03:19:19

![Hall of fame](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xufzz9hbr78zsjpff5pw.png)

## Introduction
Greetings, everyone! I'm Pranav Rustagi, currently pursuing my master's degree at NIT Kurukshetra. I'm deeply passionate about web development, with a specialization in crafting frontends for web applications and websites. If you'd like to connect with me, here are my social media handles:

- **GitHub:** [https://github.com/Pranav-Rustagi](https://github.com/Pranav-Rustagi)
- **LinkedIn:** [https://www.linkedin.com/in/pranav-rustagi/](https://www.linkedin.com/in/pranav-rustagi/)


## Embracing Open Source: A Journey of Learning
My journey into open source began last year during the exciting Hacktoberfest'22 event. Driven by a desire to grasp the intricacies of open-source development (and, let's be honest, to snag that cool T-shirt), I embarked on this adventure. During the event, I successfully contributed to a repository by making small but meaningful changes, resulting in four PRs getting merged.

The momentum of open source kept me going, and I continued my journey by participating in GSSoC'23, where I achieved a rank of 198. However, it was during Hacktoberfest'23 that I decided to pivot my contribution approach. Until then, I had mainly focused on issues and features that I could easily tackle. But what's the fun if you don't push your limits and learn something new?

## Riding the Highs and Navigating the Lows
During Hacktoberfest'23, I took on the "Ezmail" project, which introduced me to Svelte, a technology I had no prior experience with. With determination and a deep dive into the codebase, I identified unaddressed features and requested assignments for them. The learning curve was steep, and there were moments when it felt like I had hit a dead end. However, my perseverance paid off as I successfully implemented those challenging features.

## A Message to Fellow Open-Source Enthusiasts
I've observed that during events like Hacktoberfest, a significant number of developers, often students, submit PRs that involve trivial changes like adding their name to a README file or inserting quotes into a repository. While such repositories serve as a great entry point for newcomers to open source, I firmly believe that these contributions do not maximize the value for the contributor. As developers, our core activities revolve around two key tasks:

1. Writing code that adds functionality and value.
2. Fixing the bugs we introduce :')

So, my message to fellow open-sourcers is this: Aim high, learn continuously, and make meaningful contributions that not only benefit the community but also enhance your skills and knowledge. Happy coding!
Unlock a new look for your social media profile - Avatarly
Tags: productivity, ai, news, mobile
Published: 2023-10-26 03:19:19

Hello, Dev.io wizards! 🧙‍♂️

I am thrilled to introduce a brand-new iOS application, tailor-made for this ever-evolving digital realm we inhabit - Avatarly.

**What's Avatarly? **🤔

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

Avatarly is not just another app; it's your personal digital avatar designer. Whether you're a developer, a designer, or simply someone looking to have a digital face lift, Avatarly crafts unique avatars based on your features in mere seconds.

**Features to Look Out For:**

🎨 **Diverse Styles:** With Avatarly, monotony is a thing of the past. Dive into a plethora of styles that adapt to any mood, theme, or professional requirement.
⏱ **Rapid Results**: We know time is of the essence, especially when you're in the middle of coding marathons. Get your personalized avatar in just a few taps.
🔄 **Instant Shareability**: Connect your avatars directly to your preferred platform, be it GitHub, Slack, or any other.


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

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

**Why Avatarly?**

In a digital community, where first impressions are often made through avatars, it's essential to stand out. While we put so much effort into optimizing our codes, portfolios, and tech skills, our digital representation should be no different. Avatarly bridges that gap.

Get Started with Avatarly Now: https://apps.apple.com/us/app/webp-converter-anywebp/id1527716894?mt=12

Here's to pioneering a vibrant and distinctive digital identity for everyone in our Dev.io community. Cheers! 🍻

Stay Coding, Stay Unique!

Feel free to dive in and share your Avatarly experiences right here. Let's together redefine our digital footprints! 💼👾
Bandit Level 13 Level 14
Tags: ctf, writeup, overthewire, bandit
Published: 2023-10-26 02:59:16

### Introduction

Greetings, We're back with another step in the Bandit wargame journey. Level 13 introduces us to Secure Shell (SSH) and the concept of privilege escalation. Let's dive right into the details with no extra flair.

### **Starting Point**

Before we proceed, have the password from Level 12 handy: `wbWdlBxEir4CaE8LaPhauuOo6pwRmrDw`.

### **Steps**

1. **SSH Access with a Private Key**: This time, you're using a private SSH key named `sshkey.private`. Let's get in:
    
    ```bash
    ssh -i sshkey.private bandit14@localhost -p 2220
    ```
    
    This command establishes a secure connection with the key and the provided username and port.
    
2. **Retrieve the Flag**: Once you're in, read the flag:
    
    ```bash
    cat /etc/bandit_pass/bandit14
    ```
    

By doing so, you will get the password for the next level:

```
fGrHPx402xGC7U7rXKDaxiWFTOiF0ENq
```
DOM vs Virtual DOM — Key Differences!
Tags: dom, virtualdom, virtualvsrealdom, realdom
Published: 2023-10-26 02:56:54


![DOM vs Virtual DOM — Key Differences](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c3v4nx4zmsh9gcfxdgty.jpg)

> Are you ready to speed up your web development process If yes, then you first need to know what DOM and Virtual DOM is. But if you don’t know these terms, don’t fret. I’ll tell you everything in this article.

## DOM
The term ‘**DOM**’ stands for **Document Object Model**. It is basically a tree-structured programming interface or API that can be used with any programming language. But, well it is most commonly used with JavaScript.

Now, whenever you click something on the web page, there’s a lot of work and changes made and done by the browser. One function that your browser performs if of updating the real DOM to show the changes. Afterward, your browser re-renders the whole page and shows the updated HTML. But the problem is that the real DOM is really slow. Because on every update, first the complete document layout is calculated. But there’s this one advantage of using DOM. You can directly edit and change HTML. In fact, if elements are updated then a new DOM is created.

Further, real DOM also has nodes in HTML documents. It shows the UI of the application. But since nowadays, most websites are **[SPA](https://dev.to/shariqahmed525/single-page-application-spa-vs-multi-page-application-mpa-a-user-friendly-comparison-5gg3)**, DOM trees must be changed multiple times. And this is really time-consuming.


## Virtual DOM
To solve these problems, **[React](https://dev.to/shariqahmed525/what-is-react-js-20hi)** uses Virtual DOM that’s basically a copy of real DOM. It’s also lightweight.

What’s even better? Virtual DOM updates quickly. It also provides better performance because here React first updates the Virtual DOM, and only updates the Real DOM that requires changes after comparing it with the previous DOM. This whole process is termed reconciliation.

Virtual DOM is fast because instead of every node, event listeners are placed on only the root node. Another best thing? Virtual DOM can be used with any programming language that uses JavaScript. DOM manipulation is also easy. But in Virtual DOM, HTML can’t be updated directly. Also, contrary to the real DOM, in Virtual DOM when elements are updated, JSX is updated.

> And that’s it. You now know the difference between real and virtual DOM. I’ve also explained to you how you can speed up your website development. So, tell us what are you planning to use: real or virtual DOM?
Hacktoberfest2023
Tags: hack23contributor
Published: 2023-10-25 14:54:29

## Intro
Hello, I'm Kamalesh Seervi, and I'm excited to share my experience with Hacktoberfest 2023. This is my first Hacktoberfest; I've have participated in this event for first time. You can find my contributions on my [GitHub profile](https://github.com/kamalesh-seervi).

## Highs and Lows
This Hacktoberfest had its fair share of highs and lows. One of the biggest accomplishments for me was successfully contributing to an open-source project that I've been following for a long time. It was a light-bulb moment because I had always thought contributing to this project was beyond my capabilities, but with determination and guidance from the project maintainers, I was able to make meaningful contributions.

However, there were also some challenges during the month. I encountered a complex issue in one of the projects I was contributing to. It seemed impossible to fix at first, and I was frustrated. But instead of giving up, I decided to reach out to the project's community for help. This experience taught me the importance of seeking assistance and collaborating with others in the open-source community. Eventually, we solved the issue together, which was a valuable learning experience.

## Growth
Before Hacktoberfest 2023, my skillset was primarily centered around web development and a bit of scripting. However, during this month, I expanded my knowledge and skills. I delved into the world of open-source contributions, which included working on projects in various programming languages, like Python, JavaScript, and even C++. I improved my understanding of version control systems, code review processes, and collaborating with a diverse group of developers.

My learning and career goals have evolved as well. I've realized the importance of giving back to the open-source community, and I plan to continue contributing to projects that align with my interests. This experience has opened up new opportunities for me, and I'm considering a shift towards a more open-source-centric career path. Hacktoberfest 2023 has been a transformative journey, and I'm looking forward to the continued growth and learning that open source has to offer.
Why Choose Hiring Offshore Developers in Vietnam?
Tags: webdev, developers, react
Published: 2023-10-26 02:23:51

**Cost Efficiency:** Vietnam is known for its competitive labor costs compared to many Western countries. 
**Skilled Workforce:** Vietnam has a growing pool of talented software developers who are well-versed in various programming languages, frameworks, and technologies. 
**Quality of Work:** Vietnamese developers are recognized for their dedication, attention to detail, and commitment to delivering high-quality work. 
**English Proficiency:** English is commonly taught in schools and universities in Vietnam, and many developers have good English communication skills. 
**Time Zone Compatibility:** Vietnam's time zone (GMT+7) can make it easier to have real-time communication and coordination.
**Proximity to Asia-Pacific Markets:** If your target market or client base includes the Asia-Pacific region, having developers in Vietnam can provide insights and cultural familiarity that can be beneficial for your projects.
**Government Support:** The Vietnamese government has been supportive of the IT industry's growth, offering various incentives and policies to attract foreign investment and promote technology development.
**Time-to-Market:** Access to a skilled and cost-effective development team can help you bring your products or projects to market faster, allowing you to stay competitive in your industry.

>>[Read more](https://www.aegona.com/software-development/key-considerations-when-hiring-offshore-developers-vietnam)
Event Handling with TypeScript in React: Two ways
Tags: typescript, react, webdev, frontend
Published: 2023-10-26 02:19:30

Handling events in a React application is a fundamental part of creating interactive and dynamic user interfaces. With TypeScript, you can take advantage of static typing to catch potential errors at compile time, making your code more robust. In this blog, we'll explore two ways of handling events in React using TypeScript

## Explicit Type Annotations

```tsx
import * as React from 'react';

const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
  e.preventDefault();
  console.log('Input value:', e.target.value);
};

const handleKeyPress = (e: React.KeyboardEvent<HTMLInputElement>) => {
  if (e.key === 'Enter') {
    e.preventDefault();
    console.log('Enter key pressed');
  }
};

const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {
  e.preventDefault();
  console.log('Button clicked');
};

const handleFormSubmit = (e: React.FormEvent<HTMLFormElement>) => {
  e.preventDefault();
  console.log('Form submitted');
};

function EventHandlingExplicit() {
  return (
    <div>
      <input type="text" onChange={handleInputChange} onKeyDown={handleKeyPress} />
      <button onClick={handleClick}>Click me</button>
      <form onSubmit={handleFormSubmit}>
        <button type="submit">Submit Form</button>
      </form>
    </div>
  );
}

export default EventHandlingExplicit;
```

In this example, we've added specific event handlers for `ChangeEvent`, `KeyboardEvent`, `MouseEvent`, and `FormEvent`.

## Using `EventHandler` Functions

```tsx
import * as React from 'react';

const handleInputChange: React.ChangeEventHandler<HTMLInputElement> = (e) => {
  e.preventDefault();
  console.log('Input value:', e.target.value);
};

const handleKeyPress: React.KeyboardEventHandler = (e) => {
  if (e.key === 'Enter') {
    e.preventDefault();
    console.log('Enter key pressed');
  }
};

const handleClick: React.MouseEventHandler = (e) => {
  e.preventDefault();
  console.log('Button clicked');
};

const handleFormSubmit: React.FormEventHandler = (e) => {
  e.preventDefault();
  console.log('Form submitted');
};

function EventHandlingImplicit() {
  return (
    <div>
      <input
        type="text"
        onChange={handleInputChange}
        onKeyDown={handleKeyPress}
      />
      <button onClick={handleClick}>Click me</button>
      <form onSubmit={handleFormSubmit}>
        <button type="submit">Submit Form</button>
      </form>
    </div>
  );
}

export default EventHandlingImplicit;
```

In this approach, we've continued to use `MouseEventHandler` for mouse events and explicitly specified the `KeyboardEvent` for keypress handling. You can extend this pattern for other event types, such as `FormEvent`, as needed.

Both of these approaches allow you to handle various event types with TypeScript in a type-safe manner.

Happy Coding
Cloud Secrets with Nitric SDK in Go
Tags: go, tutorial, cloudcomputing
Published: 2023-10-26 01:50:06

When developing applications, it's common to handle confidential data such as API keys, passwords, and tokens. We often refer to these sensitive pieces of data as "secrets". 

Common examples of secrets are:

- Database connection strings
- API keys for third-party services
- Encryption keys for sensitive data

In this guide, we'll explore how to manage these secrets using the Nitric SDK in Go.

### Getting Started:

**Prerequisites**:
1. Ensure Go is installed on your system.
2. Install the Nitric SDK for Go.

> New to Nitric SDK? Start with this beginner-friendly [tutorial](https://dev.to/rsiv/your-first-api-with-go-nitric-39b7) to get familiarized.

### Accessing a Secret in Your Application:

Below is a simple Go code snippet to access a secret:

```go
import (
  "fmt"
  "github.com/nitrictech/go-sdk/nitric"
)

func main() {
  secret, err := nitric.NewSecret("secret-name").With(nitric.SecretAccessing)
  if err != nil {
    fmt.Println("Error:", err)
    return
  }

  latest := secret.Latest()
  // Do something with the latest secret...

  if err := nitric.Run(); err != nil {
    fmt.Println("Run Error:", err)
  }
}
```

### Storing a New Secret Value:

Here's how you can store or update a secret:

```go
latest, err := apiKey.Put(context.TODO(), []byte("a new secret value"))
if err != nil {
  fmt.Println("Error:", err)
  return
}
```

> Note: Every time you put a new secret value a new version will be created and set as the latest version.

Secret management is paramount in both application development and operations. 

While the Nitric SDK simplifies the process of handling secrets, always prioritize security in your practices. 

Stay safe and happy coding!
Multiple git configs (profiles) on one computer
Published: 2023-10-26 01:21:09

## How to let git know which profile should be used in specific folders?

Imagine that you’re working for over one company. each company you have a different name, and a separate email address. Using a global git profile with your personal email address works, but GitLab won’t display your avatar correctly as your account email. So how to do that?

The include and includeIf sections allow you to include config directives from another source. So my idea is creating a separate folder for each environment (or company) and then using includeIf to let gitconfig including the correct config profile. Try it now!

## Step 1: Create a separate folder for each environment
`personal`: For personal projects
`google`: For Google projects
`facebook`: For Facebook projects

## Step 2: Create gitconfig file for each environment
You can create files anywhere with the following content:

**~/.gitconfig-personal**
```
[user]
	name = JackTT
	email = jacktt@gmail.com
```

**~/.gitconfig-google**
```
[user]
	name = JackTT
	email = jacktt@google.com
```

**~/.gitconfig-facebook***
```
[user]
	name = JackTT
	email = jacktt@facebook.com
```

## Step 3: Create the main gitconfig
Create `~/.gitconfig` file with the following content:

```
[includeIf "gitdir:/Volumes/Data/personal/"]
	path = ~/.gitconfig-personal
[includeIf "gitdir:/Volumes/Data/google/"]
	path = ~/.gitconfig-google
[includeIf "gitdir:/Volumes/Data/facebook/"]
        path = ~/.gitconfig-facebook

```

Now, cd to the personal folder then type “ git config user.email”, you can see jack@gmail.com. Try it in the google folder, you will see “jack@google.com”.

Note that if you want to apply a configuration to all projects inside a folder, you need to add a `/` at the end of the path.

## References
https://git-scm.com/docs/git-config#_includes
Journey into a cloud career
Tags: beginners
Published: 2023-10-26 01:00:23

The journey into the cloud began with me obtaining my AWS Certified Cloud Practitioner
and Certified Solutions Architect – Associate certifications. At that point I thought I was ready to begin my cloud transition journey. Little did I know the mistake I was making. I was applying for the wrong role and lacked the required experience.

A Solution Architect (SA) is a senior level position that requires years of experience. I had no actual understanding of how multiple applications and services interact with each other. No clue of the knowledge into gathering business requirements to recommend the right solution and work through the trade-offs of the choice between one service over another. 

Feeling unmotivated and on the cusp of giving up, I went down the YouTube rabbit hole and lost my way in a sea of pointless videos. I kept coming across cloud content creators. I would watch their lips move and didn’t care to hear what they had to say as I was no longer interested in what they had to say. Then one day, I took a chance and decided to stop using them as a filler for whatever I was doing. As I began to finally listen to them, I found out what mistakes I was making in looking for a cloud role and no knowledge or understanding of Linux, Bash scripting, Python, AWS CLI, CI/CD, and other technologies that seamlessly integrate into the AWS ecosystem.

I continued to listen to them with pen in hand or the use of a text editor and I began creating my roadmap towards my cloud career. I’ve started and stopped several times as I had to continuously revise my plan for various reasons. For whatever those reasons are I can say that I’m learning project management. 

Nonetheless, I still have a roadmap that will guide me towards a career working in the cloud. I know I will go through some things along the way. The outcome of this journey is to have that offer letter in my hand.
As Principais Linguagens de Programação no Mercado Tecnológico
Published: 2023-10-26 00:50:19

**[Ler Artigo Completo no Linkedin](https://www.linkedin.com/pulse/principais-linguagens-de-programa%C3%A7%C3%A3o-mercado-igor-gomes-h3g4f?utm_source=share&utm_medium=member_android&utm_campaign=share_via)**