teleren/devto huggingface dataset:
Bandit Level 0 Level 1
Tags: writeup, overthewire, bandit, ctf
Published: 2023-06-12 16:01:50

### Introduction

Bandit Level 0 → Level 1 is the second level of the OverTheWire Bandit wargame. In this level, we will learn how to use the "find" command to search for files and how to use the "cat" command to read the contents of a file. By completing this level, we will gain access to the password for the next level.

### Steps

1. Open your terminal application.
2. Enter the following command to ssh into the remote server:

```
ssh bandit0@bandit.labs.overthewire.org -p 2220
```

1. You will be prompted to enter a password. Enter the password from the previous level, "bandit0", and hit enter.
2. You are now connected to the remote server and are able to execute commands.
3. Enter the following command to search for the file "readme" in the /home directory:

```
find /home -name readme 2>/dev/null
```

1. The output should show the path to the "readme" file. In this case, the path is /home/bandit0/readme.
2. Enter the following command to read the contents of the "readme" file:

```
cat /home/bandit0/readme
```

1. The output should show the password for the next level: NH2SXQwcBdpmTEzi3bvBHMM9H66vVXjL.

Congratulations! You have successfully completed Bandit1 and gained access to the password for the next level.
From Bus Factor to Lottery Factor - Embracing Positive Framing in Team Dynamics
Tags: programming, productivity, leadership, softwareengineering
Published: 2023-06-12 15:47:59

The **bus factor** is a measure of a team's resilience and their ability to function effectively when key members are unavailable. It refers to the number of individuals who possess critical knowledge or expertise about a specific software or system. This concept highlights the risk or vulnerability that arises if those individuals were suddenly no longer accessible, such as due to unforeseen circumstances like being hit by a bus.
<!--more-->
Instead of focusing on the negative aspect of losing key team members, it's beneficial to shift our perspective to a more positive scenario. Consider a situation where team members win the lottery and choose to retire or pursue other interests. In this context, the **lottery factor** represents the team's capability to smoothly carry on their work and maintain productivity despite the sudden departure of these fortunate individuals. 

While retirement typically involves a planned handover process, it also underscores the importance of **knowledge sharing**, **pair programming**, and having a **well-documented system** to ensure the team's continued success, even in the face of unexpected changes or fortunate events.

In general, adopting a **positive framing** and replacing the notion of the "bus factor" with the "lottery factor" can help emphasize the team's ability to adapt and thrive under various circumstances. It encourages a focus on resilience while maintaining a positive ideology.
What are your goals for the week of June 12?
Tags: discuss, motivation
Published: 2023-06-12 15:43:46

## What are your goals for this week?

- What are you building? 
- What will be a good result by week's end?
- Are you attending any events this week? Any suggestions of events to attend?
- Did you meet your goals last week?


I'll start with how I did last week.

### Last Week's Goals

- [:white_check_mark:] Continue Job Search
- [:white_check_mark:] Code Challenges
- [:x:] Project work
- Events
  * [:white_check_mark:] Attend Virtual Coffee(VC) Thursday.
  * [:x:] Attend Virtual Coffee(VC) Tuesday. It's 8am my time. It's during school travel time but now that's it's summer, no school so if I'm social enough at 8am I could make it. * Nope Barely awake at the time. Was not social at all.
  * [:white_check_mark:] Other VC events if I can.
  * [:white_check_mark:]  Attend FrontEnd Test Fest Wednesday.
- [:white_check_mark:] Organize Office: Clean 2nd desk, Which is mainly a LEGO build area.

### This Week's Goals

- Continue Job Search.
- Blog
- Code Challenges
- Project work
- Events
  * Attend Virtual Coffee(VC) Thursday.
  * Other VC events if I can. Friday * lunch and learn.
- Move a site to a new host.

### Your Goals for the week


You've read my goals so I'll throw the questions back to you.


- What are you building? 
- What will be a good result by week's end?
- Are you attending any events this week? Any suggestions of events to attend?
- Did you meet your goals last week?

```html
-$JarvisScript git push
```
Just finished my first game!
Tags: python
Published: 2023-06-12 15:37:27

I finally wrote my first game on Python. I learned a lot during the process -- lots of bugs to work out, lots of small details to sort through.

I started with the idea of writing code to play Blackjack, but I wanted to make it more interesting, so I made sure there was code to allow for splitting, doubling down, buying insurance, etc. That also meant I had to write code for managing wagers. Obviously, it's all fake money, but still fun!

There is still a lot to learn, but I feel pretty good for only starting to code 4 1/2 weeks ago!

Here is a link to the code and an image below.
[Code](https://github.com/ajmikolaj/blackjack/blob/main/blackjack.py)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c370zerlszgilbrqg1y5.png)
ESLint plugin for sorting objects, imports, types, enums, JSX props, etc.
Tags: javascript, typescript, opensource, webdev
Published: 2023-06-12 15:25:32


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

Do you appreciate it when your code has a neat and organized appearance?
I certainly do!

A well-structured and standardized codebase not only improves readability but also enhances collaboration among team members. To achieve this, developers often rely on various tools and best practices. One such tool that can significantly boost your code quality is the ESLint Plugin Perfectionist.

## ESLint Plugin Perfectionist

This [ESLint plugin](https://github.com/azat-io/eslint-plugin-perfectionist) sorts imports, objects, TypeScript interfaces and types, JSX props and other stuff.

There are three types of sorting in the plugin: alphabetical sorting, natural sorting and sorting by line length.

All the rules of the plugin are fixable. This means that after installation you don't need to fix anything manually, just run the eslint command with the --fix flag

This is safe, the code will not break. The plugin takes into account comments, JSDoc, spreads in objects, etc.

### How to start using it?

First of all, you need to install ESLint itself on the project:

```
npm install --save-dev eslint

```

Next, install the plugin:

```
npm install --save-dev eslint-plugin-perfectionist

```

The easiest way to start using the plugin is to import one of the three ready-made configs into your `.eslintrc` config. For example, the config with alphabetical sorting:

```json
{
  "extends": [
    "plugin:perfectionist/recommended-alphabetical"
  ]
}

```

After installation, the linter may show many errors in the code. However, this is not a problem because all of the plugin's rules can be fixed. This means that you do not need to fix anything manually. Just run eslint with the `-fix` flag, and the plugin will fix everything automatically.

Try it:

https://github.com/azat-io/eslint-plugin-perfectionist
What Is ZenStack?
Tags: webdev, javascript, typescript, prisma
Published: 2023-06-12 15:04:35

## Video or Text

This is my initial video publication introducing [ZenStack](https://zenstack.dev/?utm_campaign=devto&utm_medium=organic&utm_content=video): an open-source full-stack development toolkit that supercharges Prisma ORM with a powerful access control layer and unleashes its full potential for full-stack development.

{%embed https://www.youtube.com/watch?v=dI8LeuFTr9c %}

Honestly, I consider myself an old-school individual who enjoyed navigating through hyperlinks to find the desired information. It gave me a sense of freedom, reminiscent of the bygone era when it was known as web surfing. However, I've noticed a growing trend where more and more individuals prefer acquiring information through videos.

Therefore, I've decided to give it a shot. If you've had the chance to watch the video, I would greatly appreciate hearing your thoughts on it. You now have the power to shape the appearance of our [new website](https://zenstack.dev/?utm_campaign=devto&utm_medium=organic&utm_content=video). 🤝
JavaScript Fundamentals: Understanding the Basics
Tags: javascript, beginners, codenewbie, webdev
Published: 2023-06-12 14:56:17



JavaScript is a versatile programming language that allows you to add interactivity and dynamic features to your web pages. If you're new to JavaScript, this article will provide you with a solid foundation by explaining the fundamentals of the language. By the end of this post, you'll have a clear understanding of JavaScript's basic concepts.

## Variables and Data Types

In JavaScript, variables are used to store and manipulate data. They act as containers that hold values. To declare a variable, you use the `let` or `const` keyword followed by the variable name. JavaScript has several data types, including numbers, strings, booleans, arrays, and objects.

Example:

```javascript
let name = "John";
const age = 25;
let isStudent = true;
let hobbies = ["reading", "coding", "gaming"];
let person = { name: "Alice", age: 30 };
```

## Functions

Functions in JavaScript allow you to group and reuse blocks of code. They help organize your code and make it more modular. A function can take input parameters and can optionally return a value. To define a function, you use the `function` keyword followed by the function name, parentheses for parameters (if any), and curly braces to enclose the function body.

Example:
```javascript
function greet(name) {
  console.log("Hello, " + name + "!");
}

greet("Alice"); // Output: Hello, Alice!
```

## Conditional Statements

Conditional statements allow you to make decisions based on certain conditions. JavaScript provides `if`, `else if`, and `else` statements to control the flow of your program. These statements execute different blocks of code based on the specified conditions.

Example:
```javascript
let age = 18;

if (age >= 18) {
  console.log("You are an adult.");
} else {
  console.log("You are a minor.");
}
```

## Loops

Loops in JavaScript are used to repeat a block of code multiple times. The two most commonly used loops are `for` and `while` loops. The `for` loop allows you to iterate over a range of values, while the `while` loop continues as long as a specified condition is true.

Example:
```javascript
for (let i = 0; i < 5; i++) {
  console.log(i);
}

let i = 0;
while (i < 5) {
  console.log(i);
  i++;
}
```

These are just some of the fundamental concepts of JavaScript. Understanding these basics will provide a solid foundation for your JavaScript programming journey. Happy coding!
AWS: Identity Access Management (IAM)
Tags: aws, webdev, tutorial, programming
Published: 2023-06-12 14:40:41

**IAM** is a web service that enables AWS clients to manage users and their permissions in AWS. This services enables clients to create users with their own security credentials, controlled and billed to a single AWS account. Users can be created using IAM by the root User who owns the AWS account.

Users can be created using Terraform; Requirements are as follows :
Resources :  [iam_user, access_key, user_policy]
data : [policy_document]

**Resources code**
```
resource "aws_iam_user" "example" {
  name = "example"
  path = "/System/"
  tags = {
    tag-key = "Valid Key"

  }
}

resource "aws_iam_access_key" "Key" {
  user = aws_iam_user.example.name
}

resource "aws_iam_user_policy" "example" {
  user   = aws_iam_user.example.name
  name   = "learn"
  policy = data.aws_iam_policy_document.Doc.json

```
**Data Code**
```
data "aws_iam_policy_document" "Doc" {
  statement {
    effect    = "Allow"
    actions   = ["ec2:describe*"]
    resources = ["*"]
  }

}
```

Run terraform apply -auto-approve to add the resources
How to auto sort imports in frontend, example with typescript & nextjs
Tags: webdev, nextjs, typescript, tutorial
Published: 2023-06-12 14:34:38

As a frontend developer, I import a lot of things on my every file and they look scary after a while! So I was looking for a way to solve this and I found a quick and easy solution which can use on any project I work on.

There are multiple ways to do the sorting and I always look for the easy and I always do that.

So here is an example of how I’m doing it in my `nextjs` project. After creating a new `nextjs` project. I install 2 packages –

```typescript
npm i -D prettier @trivago/prettier-plugin-sort-imports
```

Now I add a `.prettierrc` for my project and it contains

```json
{
  "singleQuote": true,
  "importOrder": [
    "<THIRD_PARTY_MODULES>",
    "^@internal/(.*)$",
    "^[./].*(?<!\\.(c|le|sc)ss)$",
    "^[.]/[-a-zA-Z0-9_]+[.](module)[.](css|scss|less)$"
  ],
  "importOrderSeparation": true,
  "importOrderSortSpecifiers": true,
  "printWidth": 120
}
```

I went with my configuration you can go with one you like more. Find out more by [clicking here](https://github.com/trivago/prettier-plugin-sort-imports)

I generally use vscode and I configured always use prettier for sorting (Also installed a prettier extension). This helps me to apply the prettier on each save.

If you are using vscode just add this in your setting JSON file then it’ll apply prettier every time you save

```typescript
  "editor.formatOnSave": true,
```

## Source Code

You can find it here – [https://github.com/nerdjfpb/auto-sort-import-example](https://github.com/nerdjfpb/auto-sort-import-example)

## Questions?

Drop a dm on – [twitter](https://twitter.com/nerdjfpb)

## Want to be part of an amazing programming community and participate in free programming events?

Join our [Discord server](https://discord.gg/WBvHdMCYC7)

## Want to hire me for your next project?

Connect me with [linkedin](https://www.linkedin.com/in/nerdjfpb/)
Azur Plus | Relocation, Events, Real Estate
Published: 2023-06-12 14:10:06

Azur Plus is a leading [global relocation company](https://azur-plus.com/relocation) that offers a comprehensive range of services to individuals and businesses looking to relocate or establish themselves in France. With a strong presence in the country, Azur Plus specializes in providing seamless and efficient relocation solutions for clients from around the world.

One of the primary services offered by Azur Plus is relocation assistance. Whether it's an individual or a corporate entity, the company ensures a smooth transition for clients by managing all aspects of the relocation process. This includes assistance with visa and immigration procedures, finding suitable accommodations, and facilitating the logistics of the move. Azur Plus takes pride in its extensive network and local expertise, which enables them to offer tailored solutions based on the unique needs and preferences of each client.

In addition to relocation services, Azur Plus also excels in event planning and management. The company has a dedicated team of professionals who possess extensive experience in organizing various types of events, including corporate conferences, exhibitions, and private functions. From conceptualization to execution, Azur Plus ensures that every aspect of the event is meticulously planned and executed to exceed client expectations.

Azur Plus further extends its expertise to the real estate sector. With an in-depth understanding of the French property market, the company assists clients in finding suitable residential or commercial properties. Whether it's renting, buying, or selling, Azur Plus leverages its vast network of real estate agents to provide clients with a diverse range of options that align with their specific requirements.

Committed to delivering exceptional service, Azur Plus prioritizes customer satisfaction by offering personalized attention and meticulous attention to detail. Their team of dedicated professionals is known for their efficiency, reliability, and commitment to ensuring a seamless experience throughout the entire process.

With its comprehensive range of relocation, event planning, and real estate services, Azur Plus has established itself as a trusted partner for individuals and businesses seeking assistance in navigating the complexities of relocating and establishing themselves in France.
How to create and host your Portfolio without CODING for FREE
Tags: tutorial, codenewbie, testing, webdev
Published: 2023-06-12 14:20:21

## How to create and host your Portfolio without CODING for FREE:
As developers or designers or any other kind of people, Portfolio is the introduction of ourselves on the internet. At this time, creating portfolio is expensive for who don't know coding, and very exhausting for programmers. Today, a website is created with love for who want to create a portfolio and host it for free and without any knowledge of programming, which is Portfoliyo.

---

## What is Portfoliyo:
Portfoliyo is a Portfolio creator based on users information such as name, experiences, projects and more information that the website uses in order to make a cool Portfolio.

---

## How to use Portfoliyo to create and host a portfolio for free:
1. Go to [https://Portfoliyo.glitch.me](https://Portfoliyo.glitch.me).

![Portfoliyo main screen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7dlbzl9xd7v8s045dene.png)


2. Fill all the inputs. **Don't fill it with fake information if you want to have a cool Portfolio**.
3. Click Generate.


![Fill Inputs screen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5822sua5vc7hrs6c45mr.png)




4. Click I confirm.


![Confirmation screen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oe7nngvlzinin8eah5f6.png)



5. Wait while your Portfolio is creating.

![Creating screen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/deaowbbsceblkw7sjmoj.png)



6. Taraaaa your portfolio is ready with the link to access it and also with a QR Code to share it with others.

![Success screen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xplfejv1beryn9njtxu7.png)

**Follow me on [Instagram](https://instagram.com/abdessattar23) and [Twitter](https://twitter.com/AbdessattarElya) for more . . .**
Array method CheatSheet
Tags: javascript, webdev, programming, tutorial
Published: 2023-06-12 14:18:09

1. values()
2. length()
3. reverse()
4. sort()
5. at()
6. fill()
7. from()
8. join()
9. toString()
10. pop()
11. forEach()
12. shift()
13. copyWithin()
14. push()
15. unshift()
16. concat()
17. some()
18. splice()
19. flat()
20. lastIndexOf()
21. of()
22. every()
23. slice()
24. flatMap()
25. findIndex()
26. find()
27. inculdes()
28. entries()
29. reduceRight()
30. reduce()
31. isArray()
32. filter()
33. keys()
34. map()
Establishing Database Relationships in Flask with db.ForeignKey
Published: 2023-06-12 14:10:10

Flask, a widely-used Python web framework, once started as an April Fool's joke, offers seamless integration with databases. One feature of Flask's database support is the 'db.ForeignKey' function, which enables developers to establish relationships between database tables. 

Relational databases rely on relationships between tables to organize and connect data. These relationships establish connections between tables, allowing queries to related information effectively. 'db.ForeignKey' functions plays an important role in defining these relationships. 

```
from flask_sqlalchemy import SQLAlchemy

db = SQLAlchemy()

class User(db.Model):
    __tablename__ = 'users'
    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String(50))
    posts = db.relationship('User', backref='post',)

class Post(db.Model):
    __tablename__ = 'posts'
    id = db.Column(db.Integer, primary_key=True)
    title = db.Column(db.String(100))
    user_id = db.Column(db.Integer, db.ForeignKey('users.id'))

```
The above code demonstrates a simple relationship between two tables: 'User' and 'Post'. The 'user_id' column in the 'posts' table is defined as a foreign key, using the 'db.ForeignKey' function. This establishes a relationship between the 'posts' and 'users' tables, indicating that each post is associated with a specific user.

Flask's 'db.ForeignKey' function allows developers to specify the foreign key constraint in the database. It takes the form of 'db.ForeignKey('table.column')', where 'table.column' represents the references table and column. This function ensures that the values in the foreign key column correspond to valid primary key values in the referenced table. 

In the example, the 'db.ForeignKey('users.id')' line indicates that the 'user_id' column in the 'posts' table references the 'id' column in the 'users' table. This establishes a relationship between posts and their respective users.

In addition to defining the foreign key, Flask's SQLAlchemy provides the 'db.relationship' function, which simplifies the querying of related data. By specifying relationships between models, associated objects can be accessed easily.

In the line 'user = db.relationship('User', backref='user',) establishes a relationship between the 'Post' and 'User' models. It creates an attribute, 'user', in the 'Post' model that represents the 'User' object.

Flask's 'db.ForeignKey' function simplifies the management of database relationships in web applications. By using foreign keys, one can establish links between tables and ensure data integrity. Additionally, the 'db.relationship' function simplifies for the querying of related data, allowing the access of associated objects. By utilizing Flask's database integration capabilities, developers can focus on building robust and scalable web applications without getting entangled in the complexities of manual relationship management.
I'm going to start from scratch...
Tags: programming, javascript, discuss, productivity
Published: 2023-06-12 13:55:32

It's been 3 years, I've been a developer since, I learned a lot, built a lot, met lots of nice people through internet, I had good times.

but after this much time, I'm such a noob when it comes to programming & problem solving. I use Javascript as my primary weapon, but still still don't know its language features.

most of you will be thinking its dumb to feel like this, yeah i know, but look at yourself, many of you don't know core concepts of programming as a guy who started with Javascript/python I can relate, I skipped important things. I still don't know nothing much about programming in general. Because of that I never solved anything complex, I usually sticks with the easy things.

I need to change that.

Not going to quit this field, just because of my stupid thought, I'm going to start from scratch. I'm going to learn from basics. I think this is for the best.

Let me know what you guys think. Feel free to shout I'm dumb (I know, I am)

Have a good day, Fadhil

https://fadhilsaheer.tech