teleren/devto huggingface dataset:
[NestJS] API DockerHub + IA + PASETO (Local)
Tags: nestjs, javascript, api, ai
Published: 2024-06-23 21:13:43

Proyecto en NestJS usando los endpoints de DockerHub (para buscar repositorios), utilizando autenticación con Paseto y con la ayuda de IA (Geminis).


**Introducción:**
Es un proyecto que arme estando aburrido, mediante los endpoints de DockerHub obtengo datos de los repositorios, con ellos y usando IA Geminis creo un docker-compose.yml listo para ser ejecutado. 
Si se envia un parametro tipo boleano en la query ej:

`http://localhost:3000/api/v1/docker/find?id=bitnami/laravel&execute=true`

ejecuta el docker compose para crear las imagenes y el contenedor.

Si todo esta bien la respuesta de la API será correcta devolviendo, la respuesta de DockerHub, el contenido del docker-compose.yml el comando que se puede ejecutar, y el output del docker-compose a la hora de crearse.


**Capturas**


![Postman](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2am8hzgm4gml2zmirjgu.png)

![Postman](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u1yt74y39jktu8e90a5f.png)

![Folder](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/htg729emqiiaw22oa49d.png)

![Docker](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/77wtt0gmbkcwnm9r2wqd.png)

![Docker](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7fi4d92pw1fasfrocxe8.png)

![VSCode](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5zfrdnd6kvvoh6iw4hvw.png)


Luego puedes configurar cualquier proyecto o repositorio.


**Extras**
También se uso la libreria de PASETO para autenticación con token.
Para más info [sitio web](https://paseto.io/)

Si ven que no funciona a la primera o sale error 400, vuelven a ejecutar o sino pueden ir al directorio raíz donde se creo el composer y lo pueden volver a generar.


Código del proyecto 
[https://github.com/JkDevArg/API-NestJS-DockerHub](https://github.com/JkDevArg/API-NestJS-DockerHub)⭐⭐⭐
We were tired of bureaucracy, so we built an opensource repo for the best guides
Published: 2024-06-23 21:09:11

Today we are launching [Tramitit](https://tramitit.com/), a shared database on getting all those poor-UX local procedures done in a much simpler way!

- **How it works**: The community provides detailed walkthroughs on every possible bureaucratic process you might go through.
- **For the community by the community**: The content on this website is curated, verified, and rated by the community.
- **Welcoming providers that can help our users**: Although our guides are as simple as possible, users may still prefer to delegate tasks to a curated provider.

We are in a bit a chicken & egg problem: for the traffic to pick up and have contributors, we need to start by adding some content - some of which we have already gone through and fixed it, other not yet there. We will get there over time, and work with providers that can also bring the quality up.

You can find our [GitHub repo here](https://github.com/tramitit/guides), where you can contribute as well!
Our [website is also open-source](https://github.com/tramitit/tramitit.github.io), so feel free to add anything.
Small Forms Bundle
Tags: php, symfony, showdev
Published: 2024-06-23 21:03:31

I've just released small/forms-bundle 1.0.0 and small/forms 1.1.2.

small/forms provide input data validation and transformation.

small/forms-bundle implement it in Symfony normalizer.

git : [https://git.small-project.dev/lib/small-forms-bundle](https://git.small-project.dev/lib/small-forms-bundle)

packagist : [https://packagist.org/packages/small/forms-bundle](https://packagist.org/packages/small/forms-bundle)
"Traverse" in Computer Science
Tags: devchallenge, cschallenge, computerscience, beginners
Published: 2024-06-23 21:03:29

*This is a submission for [DEV Computer Science Challenge v24.06.12: One Byte Explainer](https://dev.to/challenges/cs).*

## Explainer

The definition of the verb 'traverse' is to "travel across or through", and in the context of computer science simply refers to the read, write, or execution upon the members of a compositional structure, broken down to operate on a granular level.

## Additional Context

No additional context is needed - the Explainer is self-explanatory
"Traverse" in Computer Science
Tags: devchallenge, cschallenge, computerscience, beginners
Published: 2024-06-23 21:03:23

*This is a submission for [DEV Computer Science Challenge v24.06.12: One Byte Explainer](https://dev.to/challenges/cs).*

## Explainer

The definition of the verb 'traverse' is to "travel across or through", and in the context of computer science simply refers to the read, write, or execution upon the members of a compositional structure, broken down to operate on a granular level.

## Additional Context

No additional context is needed - the Explainer is self-explanatory
Wie man Wordpress lokal mit docker compose aufsetzt
Published: 2024-06-23 20:55:00

## Wieso so?
Um eine reproduzierbare Entwicklungs - Umgebung zu haben, ist es gut das Aufsetzen dieser Umgebung automatisch tun zu können. Dazu kann man docker compose benutzen. Hier zeige Ich euch ein docker-compose.yml, welches ein guter Startpunkt ist für eine reproduzierbare Entwicklungsumgebung.
Wir Benutzen hier als Stack
```
- wordpress:6.5.4-php8.1-apache
- mariadb:10.6.4-focal
- traefik:v3.0.3
```


Die `docker-compose.yml` können wir mit dem wordpress - Service anfangen:

```
services:
  wordpress:
      # Am Besten die Wordpress - Version festsetzen
    image: wordpress:6.5.4-php8.1-apache
    volumes:
      # Im wp_data Volume liegt der Wordpress - Code,
      # So kannst du ihn mit anderen Containern teilen
      - wp_data:/var/www/html
    restart: always
    environment:
      # Hier kannst du durch deine eigenen Werte ersetzen
      - WORDPRESS_DB_HOST=db
      - WORDPRESS_DB_USER=wordpress
      - WORDPRESS_DB_PASSWORD=wordpress
      - WORDPRESS_DB_NAME=wordpress
    labels:
      # Weiter unten konfigurieren wir dann traefik als Reverse Proxy
      - traefik.enable=true
      - traefik.http.routers.mywordpress.rule=Host(`localhost`)
    networks:
      # Füge dein Wordpress dem proxy Netzwerk hinzu:
      - proxy
    # Optional kannst du dir noch den richtigen Hostname geben, 
    # sonst beschwert sich Wordpress
    hostname: localhost
```

Als nächstes kannst du die Datenbank hinzufügen:
```
  db:
    # Das mariadb image unterstützt amd64 & arm64 architecture
    image: mariadb:11.4.2-noble
    command: '--default-authentication-plugin=mysql_native_password'
    volumes:
      # Deine Datenbank ist unter dem db_data Volume gespeichert
      - db_data:/var/lib/mysql
    restart: always
    environment:
      # Hier kannst du durch deine eigenen Werte ersetzen
      - MYSQL_ROOT_PASSWORD=somewordpress
      - MYSQL_DATABASE=wordpress
      - MYSQL_USER=wordpress
      - MYSQL_PASSWORD=wordpress
    expose:
      - 3306
      - 33060
    networks:
      - proxy
```

Jetzt müssen wir das ganze nur noch um unseren traefik Reverse - Proxy erweitern:
```
  traefik:
    image: traefik:v3.0.3
    ports:
      - "80:80"
      - "8080:8080"
    networks:
      - proxy
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    command:
      # Lokal reicht das http - Setup
      - "--api.insecure=true"
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--entrypoints.web.address=:80"

  # Mit whoami kannst du traefik debuggen
  whoami:
    image: traefik/whoami:v1.8
    networks:
      - proxy
    labels:
      - traefik.enable=true
      - traefik.http.routers.mywhoami.rule=Host(`whoami.localhost`)

networks:
  proxy:
    name: proxy

volumes:
  letsencrypt:
    name: letsencrypt
  db_data:
  wp_data:
```

Nun musst du nur noch `docker compose up` Auf deinem Terminal ausführen, und dein Wordpress wird unter localhost bei dir erreichbar sein!

Happy Coden!
Dein Ruben

[Mein Blog](https://rubenvoss.de/?p=48)
My 2024 Software Development Goals Update
Tags: career, programming, productivity, beginners
Published: 2024-06-23 20:52:10

It's been 170 days since I set [my 2024 resolutions](https://melbite.com/Evans-Nyamai/Navigating-2024-with-Software-Development,-Tech-Training,-and-Open-Source-Aspirations). It's been tough but the grind is worth it.



At the beginning of the year, I promised self-growth, this includes:

- Growing [melbite](https://melbite.com) platform with over 100,000 users by the end of the year. 😊
- Growing my [YouTube channel](https://www.youtube.com/@codewithevans) to 10k subs.
- 😊 Become the best tech trainer/instructor in Africa
- Grow my software development course "[progskill](https://progskill.com/courses)" and impact thousands of software developers across the globe.
- And finally do 300 days of code, everything documented on my [GitHub profile](https://github.com/Evans-mutuku)
With this kind of goals, it seems hard to achieve, Yes it might be but once you take your first step, most of these goals will align.



### Here is my update on each in no particular order:
- **300DaysOfCode challenge** - I have been able to beat all the odds and coding challenges in which have done [200DaysOfCode - 100DaysToGo](https://github.com/Evans-mutuku).This achievement has made me feel better about myself. I can really achieve anything. 😊
- **Growing my [YouTube Channel](https://www.youtube.com/@codewithevans)** - At the beginning of the year, we have grown [YouTube subscribers](https://www.youtube.com/@codewithevans) from 150 subscribers to 420 subscribers. Motivate me by subscribing to my tech [YouTube channel](https://www.youtube.com/@codewithevans). 😊
- **Being the best trainer In Africa** - this year, I have been able to train over 6,000 people across the globe on how to create software through my [YouTube channel](https://www.youtube.com/@codewithevans) with different programming languages including Python development, [Javascript Development](https://progskill.com/courses/javascript-basics), [ReactJs](https://progskill.com/courses/react-basics), [Typescript Course](https://progskill.com/courses/typescript-for-beginners), and [Machine Learning](https://progskill.com/pro/intermediate-machine-learning).
- **Progskill Growth**- [Progskill](https://progskill.com) has been able to train over 2,000 people in software development. Kindly check out some of our courses.


With all that said, what have you been able to achieve this year on your New Year's resolutions? Leave a comment below.

Thank you for reading! ✨
Headlamp - k8s Lens open source alternative
Tags: devops, kubernetes
Published: 2024-06-27 03:16:28

---
title: Headlamp - k8s Lens open source alternative
published: true
date: 2024-06-23 20:18:02 UTC
tags: devops,kubernetes
canonical_url: https://avilpage.com/2024/06/headlamp-k8s-lens-open-source-alternative.html
---

![headlamp - Open source Kubernetes Lens alternator](https://avilpage.com/images/headlamp-k8s-lens-open-source-alternative.png)

Since Lens is not open source, I tried out monokle, octant, k9s, and headlamp<sup id="fnref:headlamp"><a href="https://avilpage.com/2024/06/headlamp-k8s-lens-open-source-alternative.html#fn:headlamp">1</a></sup>. Among them, headlamp UI & features are closest to Lens.

#### Headlamp

Headlamp is CNCF sandbox project that provides cross-platform desktop application to manage Kubernetes clusters. It auto-detects clusters and provides cluster wide resource usage by default.

It can also be installed inside the cluster and can be accessed using a web browser. This is useful when we want to access the cluster from a mobile device.

```
$ helm repo add headlamp https://headlamp-k8s.github.io/headlamp/

$ helm install headlamp headlamp/headlamp

```

Lets port-forward the service & copy the token to access it.

```
$ kubectl create token headlamp

# we can do this via headlamp UI as well
$ kubectl port-forward service/headlamp 8080:80

```

Now, we can access the headlamp UI at [http://localhost:8080](http://).

![headlamp - Open source Kubernetes Lens alternator](https://avilpage.com/images/headlamp-k8s-lens-open-source-alternative2.png)

#### Conclusion

If you are looking for an open source alternative to Lens, headlamp is a good choice. It provides a similar UI & features as Lens and it is accessible via mobile devices as well.

* * *

1. [https://headlamp.dev/](https://headlamp.dev/) [↩](https://avilpage.com/2024/06/headlamp-k8s-lens-open-source-alternative.html#fnref:headlamp "Jump back to footnote 1 in the text")
Pitch-Tonic
Tags: whisper, python, webdev, hackathon
Published: 2024-06-23 17:17:01

we're making a cool app for a hackathon : everyone is welcome to join us !

🎤 **Pitch Tonic: Your Ultimate Pitch Training App!** 🎤

Elevate your pitching game with **Pitch Tonic**, the open-source app designed to perfect your live pitches and investor Q&A training. Here's how it works:

1. **Interlocutor Recording & Tips** 📹: Record your interlocutor and get real-time tips to improve your pitch.
2. **Pitch Deck Training** 🎓: Record yourself practicing your pitch deck and receive constructive feedback.
3. **Knowledge Testing** 🧠: Test your pitch knowledge by answering questions and get instant feedback. Choose from easy, medium, or hard levels to challenge yourself.

💡 **We Need You!** 💡
Pitch Tonic is fully open-source under the MIT license, and we're looking for passionate contributors to help us grow! Whether you're a developer, designer, or pitch enthusiast, join our community and make an impact.

🤝 **Get Involved** 🤝
Contribute to the code, suggest new features, or provide feedback. Let's make Pitch Tonic the go-to tool for startups everywhere!

🚀 **Join Us Today!** 🚀

🔗 [Contribute on our Gitlab](https://git.tonic-ai.com/tonic-ai/pitch-tonic)

👥 **Get in Touch** 👥
Have questions or ideas? request access!

💬 [Discord](https://discord.gg/ughK8cNF)
AI is really here?
Published: 2024-06-23 20:06:16

I've recently seen a craze about AI. Every application promises integrated AI. But for me, many are simply using it as marketing strategy. I tried using Jira, and it has an AI feature that supposedly just requires me to describe what I need in the search. But instead, I still have to set up the query filter in the same way.

A friend enthusiastically told me he was looking at a washing machine with AI. I asked: What AI features does it have?

He said: You can connect it to your phone, and it will notify you when the washing cycle is finished, things like that.

Really? Is that what people understand as AI? And the funny thing is, this guy is an excellent software architect! He's in the field! How could he fall for it so easily?

Okay, maybe there are marketing powers to which we are not immune. But I still find it absurd.
Battleship Game in RUST
Tags: rust, gamedev, cli, programming
Published: 2024-06-23 20:03:38


Hey! Amir here! 🌟

First of all: Thank you so much for the incredible interaction I had had when I shared my Rust Full Course for Beginners last month. 
I'm glad to know that it was helpful to you, even if just a bit. 
Every opportunity to provide value and help you learn is something I cherish deeply. 
I'll always be ready to support your learning journey, guys.

Today, I’m super excited to share my latest project with you all: a classic Battleship game implemented in Rust. 
This isn’t just a throwback to those childhood days of sinking ships on graph paper, but also a neat little journey through the awesomeness of Rust's standard library for I/O handling and random number generation. 
So, let me show you what I have for you today, and maybe even contribute to this Battleship game.



# Features
Let's kick things off by highlighting some cool features of our Battleship game:

1. Random Ship Placement: Ships are placed randomly ensuring no overlaps or out-of-bounds positioning.
2. User Input: You can fire at coordinates through basic user input.
3. Game Board Display: The game board displays hits, misses, and ships using different symbols.
4. Simple Game Loop: The game runs in a turn-based loop.
5. Game Over Detection: It checks for game over conditions, so you know when you've won (or lost)!
{% youtube arBO1lK3tgQ %}
# Installation
First things first, you need to have Rust installed. 
If you haven’t got it yet, head over to rust-lang.org and get it.

Once Rust is all set up, cloning the repository is your next step. Here’s how you do it:

```bash
git clone https://github.com/BekBrace/rust-bship-game.git
cd battleship-rust
cargo build
cargo run
```

Here's the game tutorial if you prefer to watch it :-)


# Game Rules
For those who need a quick refresher on how Battleship works, here are the basics:

- Each player has a 10x10 board.
- Ships of different sizes (5, 4, 3, 3, 2) are randomly placed on the board.
- Players take turns firing at each other’s boards by entering coordinates.
- Hits are marked with a red dot (●), and misses with a blue dot (·).
- The game continues until all ships of one player are sunk.

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

And there you have it, folks! A full Battleship CLI game in Rust. 
Whether you're a Rustacean or just someone looking to play a fun game, I hope this project brings you as much joy as it brought me creating it. 

Stay safe, happy coding, and may the best captain win :-)
Catch you next time,
Amir 🚀
Mood-Based Music: A WhatsApp Chatbot That Curates Personalized Playlists
Tags: devchallenge, ai, twilio, twiliochallenge
Published: 2024-06-23 20:00:00

*This is a submission for the [Twilio Challenge ](https://dev.to/challenges/twilio)*

## What I Built
I built a WhatsApp chatbot using Twilio that generates a personalized playlist of 5 songs based on the user's current mood. When a user sends a message to +1 (856) 975-0130 starting with "Hi", the bot prompts them to share how they are feeling. It then analyzes the sentiment of their response and curates a playlist to match their emotional state.

## Demo
You can try out the chatbot by sending a WhatsApp message to +1 (856) 975-0130 (You can use QR code below). Start your message with "Hi" and then share your current mood when prompted. The bot will respond with a playlist of 5 songs tailored to your emotional state.


![WhatsApp QR Code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fvszo4uhtcrqvxzozead.png)


{% youtube ECwNNLt56k0 %}
{% youtube RbzXDnEa6Oc %}


## Twilio and AI
This project leverages Twilio's WhatsApp API to enable interactive chat and Twilio Studio & Twilio Functions to handle the chatbot logic. When a message is received from the user, it is forwarded to Cloudflare Workers AI for sentiment analysis.

Cloudflare Workers AI is used to perform sentiment analysis on the user's mood description. The AI model detects the sentiment of the text as positive, negative or neutral. Based on the detected mood, an appropriate search query is generated and sent to the Spotify API to retrieve a playlist of songs matching that emotional state. The playlist is then returned to the Twilio Function, which sends it back to the user via WhatsApp messages.

Twilio enabled quick development of the chat interface, while Cloudflare Workers AI allowed seamless analysis of the user's mood without needing to manage infrastructure. By leveraging AI capabilities, relevant Spotify queries could be generated to curate personalized playlists. Integrating these technologies resulted in an engaging, mood-based music recommendation experience delivered through WhatsApp.

### Twilio Studio Flow

![Twilio Studio Flow](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h0vzuu2gf0ol3ay4pgcw.png)

### Twilio Functions Code
[GitHub Repository](https://github.com/irensaltali/dev.to-twilio-challenge-spotify)

## Additional Prize Categories

- Entertaining Endeavors: This chatbot provides a fun and interactive way to discover music that resonates with your current mood.
- Twilio Times Two: This app uses Twilio's WhatsApp API, Twilio Studio for workflow automation, Twilio Functions to create a conversational experience that generates personalized playlists based on the user's mood, and Twilio CLI for building and deploying the project.

### Update
25.06.2024 - Facebook suspended my WhatsApp Account. I'm trying to recover.
Computer science
Tags: devchallenge, cschallenge, computerscience, beginners
Published: 2024-06-23 19:30:45

*This is a submission for [DEV Computer Science Challenge v24.06.12: One Byte Explainer](https://dev.to/challenges/cs).*

## Explainer

<!-- Explain a computer science concept in 256 characters or less. -->

Computer science is the study of computers, including their theoretical foundations, algorithms, hardware, and software. It focuses on computation, information, and automation using computational systems. Algorithms, which provide instructions for tasks, play a central role in computer science

## Additional Context
These are the more important area of computer science:
Data Structures: Organizing and managing data (e.g., arrays, linked lists, trees).

Algorithms: Step-by-step instructions for solving problems (e.g., sorting, searching).

Programming Languages: Tools for writing software (e.g., Python, Java, C++).

Operating Systems: Managing hardware resources (e.g., memory, processes).

Databases: Storing and retrieving structured data (e.g., SQL databases).

Artificial Intelligence: Creating intelligent systems (e.g., machine learning, neural networks).

Computer Networks: Connecting devices (e.g., TCP/IP, routers).

Software Engineering: Developing reliable, maintainable software.

Theory of Computation: Understanding what computers can and cannot do (e.g., Turing machines, complexity theory).

<!-- Please share any additional context you think the judges should take into consideration as it relates to your One Byte Explainer. -->

<!-- Team Submissions: Please pick one member to publish the submission and credit teammates by listing their DEV usernames directly in the body of the post. -->

<!-- Don't forget to add a cover image to your post (if you want). -->

<!-- Thanks for participating! -->