teleren/devto huggingface dataset:
How to delete all AWS resources using aws-nuke
Tags: nuke, devops, aws, sre
Published: 2024-05-22 14:15:30

Hi, I'm Takahiro, a Software Engineer.

I've recently discovered a powerful tool.
It's aws-nuke.

aws-nuke is extremely powerful, but it can be very dangerous.
Because it deletes all AWS resources.

So, if you're careful of your usage, you can effectively manage your resource costs.

aws-nuke isn't an official AWS tool.
But The official document introduces it. Please see the link below.
https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/automate-deletion-of-aws-resources-by-using-aws-nuke.html

The automation architecture is very helpful.

So I demonstrate how to use aws-nuke.

## How to install
In the case of Mac,

```
brew install aws-nuke
```
In the case of Amazon Linux,

```
wget https://github.com/rebuy-de/aws-nuke/releases/download/v2.25.0/aws-nuke-v2.25.0-linux-amd64.tar.gz
tar -zxf aws-nuke-v2.25.0-linux-amd64.tar.gz
mv aws-nuke-v2.25.0-linux-amd64 aws-nuke
chmod u+x aws-nuke
```

## How to make config file
The file name is nuke-config.yml, Write in yaml format.

For Example,

```
regions: # specify region for deletion
- global
- ap-northeast-1
account-blocklist: # not to delete account　list
- 000000000
resource-types:
  excludes: # not to delete service
  - IAMRole
accounts:
  1111111111: # to delete account
    filters: # not to delete filtering resources by specific tag
      EC2Instance:
      - type: exact
        property: tag:DoNotNuke
        value: "True"
feature-flags:
  disable-deletion-protection: # force delete protected resources
    RDSInstance: true
```

## Execute

You need to set up an Account Alias in advance as it is required.

First, Dry run.
In the case of Mac,

```
aws-nuke --config nuke-config.yml
```
In the case of Amazon Linux,

```
./aws-nuke --config nuke-config.yml

```

you check resources to be deleted.

Next, you delete resources.
In the case of Mac,

```
aws-nuke --config nuke-config.yml --no-dry-run
```
In the case of Amazon Linux,

```
./aws-nuke --config nuke-config.yml --no-dry-run

```

If you write `--force` option, there is no confirmation message.
Be careful.

## Last
aws-nuke is a very useful tool, but very dangerous.
Handle with care.
I built LLMArena: a tool to create and share side-by-side LLM Comparisons
Tags: showdev, webdev, javascript, ai
Published: 2024-05-22 14:07:47

LLM Arena is an easy-to-use tool that allows you to share beautiful side-by-side LLM Comparisons.

It ain't much if you don't try it out for yourself.

Demo video & How to use: https://youtu.be/ieD7RhYfbu0
Live Website: 🔗 https://llmarena.ai

---

Originally an idea by Amjad Masad (CEO and founder of Replit), I set out to build a tool where you could compare LLMs side-by-side in December, 2023.

After six months, rewriting the codebase multiple times, and endless hours of brainstorming and debugging, I finally completed this project.

## The Tool

To get started, navigate to https://llmarena.ai and select some LLMs to compare

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

Click the "See Comparison" button and you will be redirected to a page where you can see the comparison and adjust some settings such as which field types to show, theme, spacing, etc

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

After you're satisfied with the settings, click the Share button and pass it along

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

## How it works

There are over 3,000 LLMs in the database, and of course room for lots more.

The process of uploading an LLM for people to use works similar to the [Community Notes](https://help.twitter.com/en/using-x/community-notes) feature of X (formerly twitter).

Once a contributor submits an LLM for review, other contributors will vote on whether to add it or not, to prevent spam, abuse, and incorrect information.

If you want to read more about how this works or help upload some LLMs to LLMArena, check out https://llmarena.ai/contribute

---

Take it for a spin and give me your most honest, brutal, and uncensored feedback.

If you have the heart, I'd really appreciate some upvotes on [Hacker News](https://news.ycombinator.com/item?id=40441194) and [Product Hunt](https://www.producthunt.com/posts/llmarena)

Thanks for reading.

Cheers.
Here is an overview of the new features in React v19
Published: 2024-05-22 14:04:11

**React Compile**r: React has implemented a new compiler. Instagram is currently utilizing this technology.

**Server Components (RSC)**: After years of development, React introduces Server Components, eliminating the need to rely on Next.js.

**Actions**: Actions will also completely change the way we interact with DOM elements.

**Documentation Metadata**: This is another much-anticipated improvement, allowing us to achieve more with less code.

**Resource Loading**: This will enable resources to be loaded in the background, thereby improving the loading speed and user experience of applications.

**Web Components**: React code now allows us to integrate Web Components.

**Enhanced Hooks**: Many exciting new hooks have been introduced, which will completely change our coding experience.
My Journey at GambleZoid
Published: 2024-05-22 13:31:25

Hi, I'm Stella, and I'm thrilled to be a part of the amazing team at GambleZoid. As a Content Specialist, my role involves crafting engaging and informative content that helps players make informed decisions and enjoy a safe gaming experience.

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

My journey into the world of online gaming started with a passion for writing and a curiosity about the iGaming industry. With a background in Communications and a love for creative storytelling, I found my perfect fit at GambleZoid. Here, I get to combine my writing skills with my interest in gaming, creating content that resonates with our audience.

At GambleZoid, every day is an opportunity to learn and grow. I collaborate with a team of talented professionals who share my dedication to providing accurate and helpful information to our users. Whether it's writing detailed game reviews, exploring the latest industry trends, or offering tips for responsible gaming, I strive to deliver content that is both informative and engaging.

What I love most about working at GambleZoid is the supportive and innovative environment. We are encouraged to think creatively and push the boundaries of what's possible. This has allowed me to develop my skills and take on exciting projects that I'm truly passionate about.

Outside of work, I enjoy staying updated on the latest developments in the gaming world. I often attend industry events and webinars to expand my knowledge and connect with other professionals. In my free time, you'll find me gaming, reading, and exploring new content ideas.

Being a part of GambleZoid has been an incredible journey. I'm proud to contribute to a platform that prioritizes player safety and informed decision-making. I look forward to continuing my journey here, creating valuable content, and helping players navigate the exciting world of online gaming.
F# For Dummys - Day 11 Collections Tuple
Tags: fsharp
Published: 2024-05-22 13:30:14

Today we learn Tuple, as the first data structure of Collections</br>
tuple is a simple data structure that combine elements together. These elements can be different types</br>
```
(1, 2)

// Triple of strings.
("one", "two", "three")

// Tuple of generic types.
(a, b)

// Tuple that has mixed types.
("one", 1, 2.0)

// Tuple of integer expressions.
(a + 1, b + 1)
```
let's do some practices
- defining a tuple with 2 elements
```f#
let person = ("John", 30)
let (name, age) = person   // this is unpack, unpack first element of person to name, second to age

printfn "Name: %s, Age: %d" name age
```
you can also get the element by fst snd for a tuple with 2 elements like below
```f#
let person = ("John", 30)
let name = fst person   // "John"
let age = snd person    // 30

printfn "Name: %s, Age: %d" name age
```
- defining a tuple with 3 elements
```f#
let point = (3, 4, 5)
let (x, y, z) = point

printfn "Point coordinates: x = %d, y = %d, z = %d" x y z
```
there is no trd to get third element of tuple with 3 elements</br>
there is no empty tuple, () is not empty tuple, it's more like Null
- ignore element of tuple
```f#
let point = (3, 4, 5)
let (x, _, z) = point

printfn "Point coordinates: x = %d, z = %d" x z
```
the second element 4 will be ignored
- return a tuple in function
```f#
let getPersonInfo() = ("John", 30)
let (personName, personAge) = getPersonInfo()

printfn "Person Name: %s, Person Age: %d" personName personAge
```
- access elements of tuple in match
```f#
let print tuple1 =
   match tuple1 with
    | (a, b) -> printfn "Pair %A %A" a b // %A can format any type

print (1, 2)
print ("John", 30)
```
Tuples are particularly useful when you need to return multiple values from a function or when you want to combine several values together
HOW TO DECODE JWT TOKEN USING REACTJS
Tags: webdev, javascript, beginners, programming
Published: 2024-05-22 13:23:14

First, install the jwt-decode library using npm or yarn:

`npm install jwt-decode`

or

`yarn add jwt-decode`

Now, you can use the jwt-decode library to decode the JWT token in your React component. Here's an example:


`import React, { useEffect } from 'react';

const App = () => {
  useEffect(() => {
    const accessToken =
      'YOUR_TOKEN';

    const parts = accessToken.split('.');
    const decodedPayload = atob(parts[1]);

    const parsedPayload = JSON.parse(decodedPayload);
    console.log("response",parsedPayload)

    const { exp } = parsedPayload;

    const currentTime = Math.floor(Date.now() / 1000);
    console.log("current time",currentTime)

    if (exp && currentTime >= exp) {
      console.log('Token has expired. Perform logout action.');
    } else {
      console.log('Token is still valid.');
    }
  }, []);

  return (
    <div>
      <h1>Decode JWT Example</h1>
      <p>Check the console for the decoded token.</p>
    </div>
  );
};

export default App;`


In this example, we import the jwtDecode function from the jwt-decode library. We then define a JWT token and use the jwtDecode function to decode the token. The decoded token is logged to the console.

Make sure to replace the accessToken variable with your own JWT token. If the token is valid, the jwtDecode function will decode it and return an object with the token's claims. If the token is invalid, the function will throw an error.
Setting up a www subdomain on a self-hosted Ghost blog
Tags: ghost, nginx
Published: 2024-05-22 13:20:26

[Ghost](https://ghost.org) CMS makes it fairly easy to link your blog to your own domain and set up SSL. The `ghost setup` command in [ghost-cli](https://ghost.org/docs/ghost-cli/) basically does it for you. However, for me it didn't automatically set up a www subdomain. So I could access, say, `https://https://myblog.lol`, but `https://www.myblog.lol` would result in a `502`. I was thinking of just adding a CNAME or ALIAS record in my providers DNS settings, but that didn't work somehow. So I just set an A record to point from www to the IP of my Ghost blog, which worked fine, but I didn't have any SSL then on my www subdomain. Thus, I had to tinker a bit in the nginx configs of Ghost, so that it automatically redirects all www traffic to the apex. I think that that's a pretty safe solution.

First I would config the www url by changing to `/var/www/ghost` and run `ghost config url https://www.myblog.lol`.
Then configure ssl via `ghost setup nginx ssl`. Set my config again to the apex domain with `ghost config url https://myblog.lol`. And now you will have to edit the nginx configs in `/etc/nginx/sites-available`. Go there, and if there are no files called `www.myblog.lol-ssl.conf` **and** `www.myblog.lol.conf` create them. The first one will have to look something like this:

```bash
server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    server_name www.myblog.lol;
    root /var/www/ghost/system/nginx-root;

    ssl_certificate /etc/letsencrypt/www.myblog.lol/fullchain.cer;
    ssl_certificate_key /etc/letsencrypt/www.myblog.lol/www.myblog.lol.key;
    include /etc/nginx/snippets/ssl-params.conf;

    location / {
        return 301 https://myblog.lol$request_uri;
    }

    location ~ /.well-known {
        allow all;
    }

    client_max_body_size 1g;
}
```

The latter one should be this:

```bash
server {
    listen 80;
    listen [::]:80;

    server_name www.myblog.lol;
    root /var/www/ghost/system/nginx-root; # Used for acme.sh SSL verification (https://acme.sh)

    location / {
       return 301 https://myblog.lol$request_uri;
    }

    location ~ /.well-known {
        allow all;
    }

    client_max_body_size 50m;
}
```

That's it. Run `sudo nginx -t` to make sure you don't have any typo in your config files and then source your config files with `sudo nginx -s reload`. You might have to do `ghost restart`, if your www subdomain doesn't work immediately.
Tropical Flair Hand-embroidered
Published: 2024-05-22 13:08:15

Embrace the enchanting fusion of tradition and modernity, and let your style speak volumes in our Printed Embroidered [Anarkali Suit Set](https://www.amodra.in/product/brown-3-piece-embroidered-anarkali-suit-set/), complete with a delicate net dupatta. Embrace elegance with every step. Whether you’re attending a wedding celebration or a festive gathering, this ensemble is guaranteed to elevate your look to new heights of style and sophistication.
Lime Yellow Straight Suit Set with Hand Embroidery
Published: 2024-05-22 13:03:02

Elevate your elegance with our Lime Yellow [Straight Suit](https://www.amodra.in/product/lime-yellow-straight-suit-set-with-hand-embroidery/) Set, adorned with exquisite hand embroidery and paired with a luxurious Chinon dupatta. Perfect for making a statement at any occasion
How to Use ngrok expose localhost Access Remotely
Tags: webdev, tutorial, serverless, learning
Published: 2024-05-22 12:54:18

When it comes to showcasing your application's latest features to project managers or clients who aren't in close proximity, the distance can indeed pose some hurdles. While deploying changes to a public staging server is one way to go about it, it can sometimes feel like overkill, especially for quick feedback on minor details like widget colors or addressing impractical suggestions.

What's really essential is an easy method for granting access to your local host server - means ngrok for localhost. Enter ngrok — what is ngrok??  

It's the perfect solution for easy sharing your local web server. [In this guide](https://www.codegirl0101.dev/2024/05/how-to-use-ngrok-to-expose-access-to.html), I'll walk you through the setup process for various purposes, ensuring you're equipped with the tools you need to ease your workflow. Additionally, we'll explore ngrok alternative options, just in case it doesn't quite fit your needs.

Read the full blog tutorial here: https://www.codegirl0101.dev/2024/05/how-to-use-ngrok-to-expose-access-to.html
Taming data with Ecto.Enum and Ecto.Type
Tags: ecto, elixir, phoenix, tutorial
Published: 2024-05-22 12:53:35

Let's take advantage of [Ecto.Enum](https://hexdocs.pm/ecto/Ecto.Enum.html) and [Ecto.Type](https://hexdocs.pm/ecto/Ecto.Type.html).

The schema:

```elixir
defmodule Blog.Category do
  use Blog.Schema

  schema "categories" do
    field(:name, Ecto.Enum, [:til, :elixir, :ecto])
  end
end
```

Divide & Conquer with [Reflections](https://hexdocs.pm/ecto/Ecto.Schema.html#module-reflection) and [Ecto.Type.load/3](https://hexdocs.pm/ecto/Ecto.Type.html#load/3):
```elixir
iex> type = Blog.Category.__schema__(:type, :name)
{:parameterized, Ecto.Enum,
 %{
   mappings: [til: "til", elixir: "elixir", ecto: "ecto"],
   on_cast: %{"til" => :til, "elixir" => :elixir, "ecto" => :ecto},
   on_dump: %{til: "til", elixir: "elixir", ecto: "ecto"},
   on_load: %{"til" => :til, "elixir" => :elixir, "ecto" => :ecto},
   type: :string
 }}
iex> Ecto.Type.load(type, "unknown")
:error
iex> Ecto.Type.load(type, "ecto")
{:ok, :ecto}
iex> Ecto.Type.load(type, :ecto)
:error
```

In the meantime: 
```elixir
iex> Ecto.Enum.values(Blog.Category, :name)
[:til, :elixir, :ecto]
iex> Ecto.Enum.dump_values(Blog.Category, :name)
["til", "elixir", "ecto"]
iex> Ecto.Enum.mappings(Blog.Category, :name)
[til: "til", elixir: "elixir", ecto: "ecto"]
```

Also, another great resource from [German Velasco](https://www.germanvelasco.com/) where he wrote [Richer domain types with Ecto custom types](https://www.elixirstreams.com/tips/richer-domain-types-with-ecto-custom-types)

Happy Hacking!
Best 9 Lesser-Known Websites That Can Make You a 10x Developer
Tags: webdev, productivity, programming, beginners
Published: 2024-05-22 12:49:24

While popular resources like Stack Overflow and GitHub are invaluable, there are several lesser-known gems that can significantly boost your development skills. Here are nine essential, but less commonly mentioned, websites that can help you become a 10x developer.

## 1. Exercism

Exercism offers free coding exercises in over 50 programming languages. With its focus on mentorship and peer reviews, it’s a great platform to improve your coding skills and get constructive feedback.

Website: Exercism

## 2. EdX

EdX provides free online courses from universities and institutions around the world. Their computer science and programming courses are top-notch and cover a wide range of topics and skill levels.

Website: EdX

## 3. Kaggle

Kaggle is a platform for data science competitions. It provides datasets and problem sets to practice machine learning and data analysis, allowing you to apply your skills to real-world problems.

Website: Kaggle

## 4. SoloLearn

SoloLearn is a mobile-first platform that offers interactive coding lessons in various languages. Its gamified learning approach makes it fun and engaging to learn new skills on the go.

Website: SoloLearn

## 5. GeeksforGeeks

GeeksforGeeks is a comprehensive resource for computer science topics. It offers tutorials, coding problems, and interview preparation material, making it an excellent resource for deepening your understanding of algorithms and data structures.

Website: GeeksforGeeks
[Read full article Here](https://glsl.site/post/best-9-websites-that-can-make-you-a-10x-developer/)
What Makes a Programming Language "Beginner-Friendly"?
Tags: discuss, programming, watercooler, learning
Published: 2024-05-22 12:45:54

#What Makes a Programming Language "Beginner-Friendly"?

In the world of software development, the debate over which programming languages are best for beginners is ongoing and multifaceted. Let's dive into the key characteristics that make a language suitable for those just starting out in programming. What are your thoughts? #discuss

### Key Characteristics of Beginner-Friendly Languages:

1. **Simple Syntax**: A language with a clean and easy-to-understand syntax reduces the learning curve. Python is often cited as a prime example due to its readability and straightforward syntax.

2. **Comprehensive Documentation**: High-quality, accessible documentation can make a significant difference for beginners. Languages like JavaScript have extensive resources and community support.

3. **Interactive Development Environment**: Tools like REPLs (Read-Eval-Print Loops) and interactive IDEs (Integrated Development Environments) allow beginners to experiment and see immediate results. Python's IDLE and Jupyter Notebooks are excellent examples.

4. **Strong Community Support**: A vibrant community means more tutorials, forums, and assistance available. Languages like Python, JavaScript, and Ruby boast large, active communities that welcome newcomers.

5. **Educational Resources**: Abundant educational content, such as courses, books, and online tutorials, can ease the learning process. Python and JavaScript, for instance, have a plethora of beginner-friendly learning materials.

6. **Error Messages and Debugging**: Languages that provide clear, descriptive error messages help beginners understand their mistakes and learn from them. Python's error messages are generally considered more user-friendly compared to languages like C++.

7. **Versatility and Practical Applications**: Languages that allow beginners to build a wide range of applications can be more engaging. JavaScript, with its ability to create web applications, and Python, with its use in data science, web development, and automation, are versatile choices.

### Popular Beginner-Friendly Languages:

- **Python**: Known for its readability, simplicity, and vast library support.
- **JavaScript**: Ubiquitous in web development, easy to start with, and supported by numerous frameworks.
- **Ruby**: Emphasizes simplicity and productivity with an elegant syntax.
- **Scratch**: A visual programming language aimed at young learners, making it easy to understand programming concepts without syntax.

### Your Turn!

What was your first programming language, and how did it influence your learning experience? Do you think certain languages are overrated or underrated in terms of beginner-friendliness? Share your thoughts and join the discussion! #discuss

Feel free to share your experiences and insights. Let's help newcomers find the best path to embark on their programming journey!
Amodra
Published: 2024-05-22 12:43:15

[Amodra](https://www.amodra.in/) Our brand is a premier manufacturer of women's suit sets, offering Anarkali suits, Straight suits, and [Co-ord ](https://www.amodra.in/co-ord-set/)sets. We blend traditional craftsmanship with contemporary designs, using high-quality fabrics and intricate embellishments. Each meticulously crafted piece ensures you feel confident and radiant on any occasion.
Best hotels in Hanamkonda
Published: 2024-05-22 12:24:23

Hotel Silver Cloud is the **_[best hotel in Hanamkonda, Warangal, and Kazipet](https://www.hotelsilvercloud.co.in/)_**. Discover comfort and luxury in Hanamkonda with Hotel Silver Cloud's exquisite range of meticulously crafted hotel rooms. From cozy retreats to lavish suites, experience unmatched hospitality and modern amenities for an unforgettable stay. Book now and indulge in the epitome of relaxation.
9066854854
How to create a resource group
Tags: azure, clouddevelopment, resourcegroup, devops
Published: 2024-05-22 12:14:02

**The following steps below is how to create Resource group in Azure portal.
1. login to Azure portal and on the home page click on resource group as seen below 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/50dg3jjvxdn84eawxxkx.png).
2. the below image will pop up, click on create
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rhoog1zc8xab3yzyc1uu.png)
3. Name the resource group a name that is universally unique (annotated red) and the annotated green on the right side as shown in the image below indicating the name is unique to me.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m2y4n77dc49oyy63qp4h.png)
4. then click review and create
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7gb596okttk1yg9rr9t8.png)
5. wait for validation to pass as seen in the image below
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tvzs8rm894rgh1495ua2.png)
6. after, validation has passed click on create 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/azmwc9mau04h9a0fa1al.png)
7. the image below shows the Resource group name UgonnaRG has being created named as given in step 3 above.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jxkdw546liyz602usmzm.png)