teleren/devto huggingface dataset:
Commits semânticos: Melhore seus commits em 5 minutos!
Tags: commit, github, devops, webdev
Published: 2023-05-25 17:06:10


![#ParaTodosVerem: Imagem com histórico de Commmits mal padronizados, como: AAAAAAAA e 'Here Have Code'](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4235w3hc46vbkidnltmo.jpg)

Sério, eu DUVIDO que você nunca fez um commit assim:

`git commit -m "force pipeline"`

ou então:

`git commit -m "dessa vez vai funcionar"`

~~E as vezes eles até são necessários~~ HAHAHA ou mais rápidos para enviarmos nossa simples alteração ou então forçar uma pipeline por completo.

Alguns dos problemas dessa prática é que acabamos sujando o histórico de commits e por consequência acaba **dificultando o CodeReview, manutenção de código e limita extrair métricas das changes**.

Agora que sabemos o que não fazer com nossos commits, vamos ao assunto real. Você conhece a [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0)? Ela é uma especificação para tornar nossos commits mais legíveis de acordo com algumas convenções que vamos ver.


### Padrões de commit
De início eles sugerem que nossos commits sejam da seguinte forma:

`<tipo>: descrição`
ou
`<tipo>(escopo opcional): descrição`

### Misericórdia! O que é esse tipo!?
Tipos são palavras reservadas para qual *tipo de alteração* você está subindo!
Exemplo:

- **fix**: Nesse caso, estamos subindo uma correção de algum BUG existente na nossa aplicação. (Temos relação direta com o PATCH no versionamento semântico)
- **feat**: Estamos subindo uma nova Feature para nosso sistema! (Temos relação direta com o MINOR no versionamento semântico)
- **docs**: Commits que estão alterando alguma *Documentação* do nosso projeto.
- **test**: Commits que estão alterando a camada de *Testes* da aplicação.
- **build**: Commits que estão realizando modificações nos arquivos de Build e dependências do projeto.
- **perf**: Commits que não alteram a feature mas melhoram sua performance.
- **style**: Commits que apenas mexem na formatação de código ou removem algum código não utilizado.
- **refactor**: Commits que apenas refatoram o código, não alterando a funcionalidade.
- **ci**: Commits do tipo ci indicam mudanças relacionadas a integração contínua (continuous integration).

Olha quanta coisa que a gente pode fazer!

### E o que é o escopo e descrição?
Basicamente, escopo é a palavra-chave do nosso commit e é opcional. Por exemplo, se eu estou corrigindo a funcionalidade de cadastro de usuários, faço da seguinte forma:

`fix(users): Fix permission to create a user`

### Também temos Corpo e Rodapés!

- Corpo do commit: priorize a descrição mais detalhada do seu commit.
- Rodapé: geralmente preenchemos com número do Card do Kanban ou informações mais secundárias.

### Agora vem a real parte boa! ~~eu juro~~
Como quase tudo nessa vida pode ser automatizado, nós temos o plugin [Commitizen](https://commitizen-tools.github.io/commitizen/commit), que basicamente é utilizado via Prompt e é um Helper para as especificações do Conventional Commits, com o qual você ainda pode criar suas próprias regras!

Muito legal esse assunto de Commits né!

Espero ter ajudado com este post e até a próxima!
A fatal esptool.py error occurred: Cannot configure port, something went wrong. Original message: PermissionError(13, 'A dev...
Tags: arduino, ino
Published: 2023-05-25 16:55:02

I have this error when upload code in Arduino IDE to ESP8266

```terminal
. Variables and constants in RAM (global, static), used 28104 / 80192 bytes (35%)
║   SEGMENT  BYTES    DESCRIPTION
╠══ DATA     1496     initialized variables
╠══ RODATA   920      constants       
╚══ BSS      25688    zeroed variables
. Instruction RAM (IRAM_ATTR, ICACHE_RAM_ATTR), used 59667 / 65536 bytes (91%)
║   SEGMENT  BYTES    DESCRIPTION
╠══ ICACHE   32768    reserved space for flash instruction cache
╚══ IRAM     26899    code in IRAM    
. Code in flash (default, ICACHE_FLASH_ATTR), used 232148 / 1048576 bytes (22%)
║   SEGMENT  BYTES    DESCRIPTION
╚══ IROM     232148   code in flash   
esptool.py v3.0
Serial port COM8

A fatal esptool.py error occurred: Cannot configure port, something went wrong. Original message: PermissionError(13, 'A device attached to the system is not functioning.', None, 31)
```
I solved with install CH340 Driver.
1. Download CH340 driver from [sparkfun.com](https://learn.sparkfun.com/tutorials/how-to-install-ch340-drivers/all)
2. Install driver, I use `CH340SER.EXE` file *(just next and next and finish)*

---

## reference
[sparkfun.com](https://learn.sparkfun.com/tutorials/how-to-install-ch340-drivers/all)
Greet to the new PR and issue creator in Github Action - #1
Tags: githubactions, webdev, beginners, gh
Published: 2023-05-25 16:45:22

## Github action greeting

> Github action is the great tool to automate the manual stuff for your project.

## What
The below action will greet to the contributor who will create first Pull Request and also the first issue.


## How?
Create a folder `.github/workflows` in the root folder

create a new workflow called `greeting.yml` inside the `.github/workflows/` directory.

Copy the below code and paste in the `greeting.yml`

```yml
name: Greetings

on: [pull_request_target, issues]

jobs:
  greetings:
    runs-on: ubuntu-latest
    permissions:
      issue: write
      pull-requests: write
    steps:
      - uses: actions/first-interaction@v1
        with:
          repo-token: ${{secrets.GITHUB_TOKEN}}
          issue-message: "We appreciate you pointing us to the problem, and as soon as time allows, we will look into it. Thank you!"
          pr-message: "We appreciate you creating your first pull request and look forward to reviewing your future contributions."
```

Push the file in the main branch and try to create a first issue and first Pull request.

This will send a greeting message in the comment of the PR and issue.

Happy Automation!
Casio calculator
Tags: codepen
Published: 2023-05-25 16:35:52

<p>preview with fonts: <a href="https://linuxiness.github.io/calculator-scientific/" target="_blank">https://linuxiness.github.io/calculator-scientific/</a></p>

<p>contribute (JavaScript part still in progress, this is my little hobby project): <a href="https://github.com/Linuxiness/calculator-scientific" target="_blank">https://github.com/Linuxiness/calculator-scientific</a></p>

<hr>

<p>Using JavaScript.</p>

<p>I'm working on this project occasionally. I will work on it if I have nothing else to do. This is my hobby project, something I do in my spare time. I've always wanted to create a fully functional scientific calculator program that behaves like a normal scientific calculator. It brings me enjoyment whenever I find time to work on it.</p>

<p>If you want to help me, we can speed up the process of creating a fully functional calculator. My goal is to make it behave like a normal scientific calculator. The code should be in JavaScript, as I want to keep this hobby project as simple as possible.</p>

{% codepen https://codepen.io/Linuxiness/pen/OJBqQJZ %}
Share the most embarrassing code you've ever written
Tags: discusss, watercooler
Published: 2023-05-25 16:25:02

I saw this post today and it took me back to my only CS class which was taught using Java.  I'll post my embarrassing final project below 🙈

{% link https://dev.to/sendilkumarn/java-turns-28-enm %}

**_No judgment: share the most embarrassing code you've ever written!_**

[Cover image via Unsplash](https://unsplash.com/photos/ewfHXBcuFA0)
What does HTTP Response Status Code Says?
Tags: networking, computerscience, webdev, beginners
Published: 2023-05-25 16:17:50

## List Of Most Commonly Shown Status Code Along With Their Saying👇 


**100**: Continue
**101**: Switching Protocol
**102**: Processing (WebDAV)
**103**: Early Hints
**200**: OK 
**201**: Created
**202**: Accepted
**203**: Non-Authoritative Information
**204**: No Content
**205**: Reset Content
**206**: Partial Content
**207**: Multi-Status (WebDAV)
**208**: Already Reported (WebDAV)
**226**: IM Used (HTTP Delta encoding)
**300**: Multiple Choice
**301**: Moved Permanently
**302**: Found
**303**: See Other
**304**: Not Modified
**305**: Use Proxy 
**306**: unused
**307**: Temporary Redirect
**308**: Permanent Redirect
**400**: Bad Request
**401**: Unauthorized
**402**: Payment Required .
**403**: Forbidden
**404**: Not Found
**405**: Method Not Allowed
**406**: Not Acceptable
**407**: Proxy Authentication Required
**408**: Request Timeout
**409**: Conflict
**410**: Gone
**411**: Length Required
**412**: Precondition Failed
**413**: Payload Too Large
**414**: URI Too Long
**415**: Unsupported Media Type
**416**: Range Not Satisfiable
**417**: Expectation Failed
**418**: I'm a teapot
**421**: Misdirected Request
**422**: Unprocessable Entity (WebDAV)
**423**: Locked (WebDAV)
**424**: Failed Dependency (WebDAV)
**425**: Too Early 
**426**: Upgrade Required
**428**: Precondition Required
**429**: Too Many Requests
**431**: Request Header Fields Too Large
**451**: Unavailable For Legal Reasons
**500**: Internal Server Error
**501**: Not Implemented
**502**: Bad Gateway
**503**: Service Unavailable
**504**: Gateway Timeout
**505**: HTTP Version Not Supported
**506**: Variant Also Negotiates
**507**: Insufficient Storage (WebDAV)
**508**: Loop Detected (WebDAV)
**510**: Not Extended
**511**: Network Authentication Required

HTTP Response Status Codes Indicates Whether A Specific HTTP Request Has Been Successfully Completed
TypeNinja.io: Your AI Companion for Enhanced Typing
Tags: openai, productivity, tooling, ai
Published: 2023-05-25 16:10:04

Hey there, developers! 👋 I'm thrilled to introduce you to my latest project, TypeNinja. It's a game-changing tool that brings the power of OpenAI ChatGPT directly to your fingertips while you type on your computer.

With TypeNinja, you can seamlessly access OpenAI ChatGPT from any application, making it a versatile and indispensable companion for your daily tasks. It monitors your inputs in real-time and responds to your prompts, providing instant AI assistance right where you need it.

The best part? TypeNinja integrates smoothly with all your favorite apps, whether you're coding, writing emails, or having online conversations. Say goodbye to the hassle of switching between websites or applications just to get AI help. TypeNinja enhances your workflow and boosts your productivity across the board.

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

The user-friendly interface of TypeNinja makes it a breeze to monitor your usage, review chat history, and customize your command prompts to match your preferences. This level of flexibility puts you in control of your AI interactions, allowing you to tailor the tool to your unique needs.

Imagine receiving real-time suggestions as you type, or effortlessly seeking coding assistance within your preferred Integrated Development Environment (IDE). TypeNinja unlocks new possibilities and takes your typing experience to the next level.

Privacy and security are top priorities for TypeNinja. All interactions are processed locally on your computer, ensuring the confidentiality of your sensitive information. OpenAI's robust security measures further safeguard your data, giving you peace of mind while harnessing the power of TypeNinja.

I can't wait to share more updates about TypeNinja with you in the coming days. Get ready to elevate your typing game and unlock the full potential of OpenAI ChatGPT with TypeNinja. Stay tuned for exciting developments and prepare for a typing revolution!

Website: https://typeninja.io
API Methods in ASP.NET Core Web API
Tags: webdev, programming, opensource, aspdotnet
Published: 2023-05-25 16:07:29


ASP.NET Core Web API provides various methods to handle HTTP requests and build RESTful APIs. Some commonly used API methods in ASP.NET Core Web API include:

1. **GET**: Used to retrieve data from the server. Typically used when reading or fetching resources. For example:
```csharp
[HttpGet]
public IActionResult Get()
{
    // Retrieve and return data
    return Ok(data);
}
```

2. **POST**: Used to send data to the server to create a new resource. Typically used for creating new records or performing operations that cause side effects. For example:
```csharp
[HttpPost]
public IActionResult Post([FromBody] MyModel model)
{
    // Create a new resource using the provided data
    // Return created resource or appropriate response
    return Created(newResourceUri, createdResource);
}
```

3. **PUT**: Used to update an existing resource on the server. Typically used to update entire resource properties. For example:
```csharp
[HttpPut("{id}")]
public IActionResult Put(int id, [FromBody] MyModel model)
{
    // Find the resource with the specified ID and update its properties
    // Return the updated resource or appropriate response
    return Ok(updatedResource);
}
```

4. **PATCH**: Used to partially update an existing resource on the server. Typically used to update specific properties of a resource. For example:
```csharp
[HttpPatch("{id}")]
public IActionResult Patch(int id, [FromBody] JsonPatchDocument<MyModel> patchDocument)
{
    // Find the resource with the specified ID and apply the patch document to update its properties
    // Return the updated resource or appropriate response
    return Ok(updatedResource);
}
```

5. **DELETE**: Used to delete an existing resource on the server. Typically used to remove a resource. For example:
```csharp
[HttpDelete("{id}")]
public IActionResult Delete(int id)
{
    // Find the resource with the specified ID and delete it
    // Return appropriate response
    return NoContent();
}
```
These methods are commonly used in ASP.NET Core Web API controllers to handle different types of HTTP requests. They can be decorated with various attributes and configured to accept and return different data formats, such as JSON or XML.
KALI LINUX CHEAT SHEET 🔺🔌💻🛡
Tags: linux, security, terminal, codepen
Published: 2023-05-25 16:02:35

**Basic Commands**
- *pwd* : print working directory
- ls: list directory contents
- *cd*: change directory
- *mkdir* : creates a directory
- *mv* : moves a file
- *cp* : copies a file
- *rm* : removes a file
- *cat* : view contents of a file
- *less* : view contents of a file one page at a time
- *more* : view contents of a file one page at a time 
- *grep* : search for text within files
- *find* : search for files
- *chmod* : change file/directory permissions
- *man* : view help/manual page for a command

**Network and Security:** 
- *ping* : send ICMP echo request to host
- *traceroute* : show path of network hops
- *netstat* : show routing table and active connections
- *nmap* : Network Mapper (scanner)
- *ifconfig* : view/modify network interfaces
- *tcpdump* : capture network traffic
- *wireshark* : graphical network traffic analyzer
- *arp* : view arp table
- *SSH* : secure remote login 
- *WEP/WPA* : wireless encryption protocols 
- *iptables* : configure Linux firewall
- *nessus* : vulnerability scanner 

**System Administration** 
- *df* : shows free/used disk space
- *free* : shows free/used system memory
- *top* : show running processes
- *ps* : show running processes
- *uname* : show system information
- *uptime* : show system uptime 
- *init* : manage system run levels
- *chown* : change file/directory ownerships
- *crontab* : manage cron jobs
- *useradd* : add new user
- *userdel* : delete user
- *groupadd* : add new group
- *groupdel* : delete group
SQL CHEAT SHEET👩‍💻
Tags: programming, tutorial, codenewbie, sql
Published: 2023-05-25 15:32:38

SQL is a language used to communicate with databases it stands for Structured Query Language and is used by database administrators and developers alike to write queries that are used to interact with the database. Here is a quick cheat sheet of some of the most essential SQL commands:

**SELECT** - Retrieves data from a database

**UPDATE** - Updates existing data in a database

**DELETE** - Removes data from a database

**INSERT** - Adds data to a database

**CREATE** - Creates an object such as a database or table

**ALTER** - Modifies an existing object in a database

**DROP** -Deletes an entire table or database

**ORDER BY** - Sorts the selected data in an ascending or descending order

**WHERE** – Condition used to filter a specific set of records from the database

**GROUP BY** - Groups a set of data by a common parameter

**HAVING** - Allows the use of aggregate functions within the query

**JOIN** - Joins two or more tables together to retrieve data

**INDEX** - Creates an index on a table, to speed up search times.
CodinGame Clash of Code
Tags: programming, coding, developer
Published: 2023-05-25 15:18:01

preparin' for an interview? want to sharpen your codin' skills? just want to show that you're a codin' beast?CodinGame is the perfect platform with a plethora of different games an' puzzles to help you.

here i'll focus on Clash of Code. in Clash of Code, up to eight players battle in three different modes an' a multitude of languages for victory. in fastest mode, you're given a prompt an' speed is the name of the game. in reverse mode, you're only given the input an' output an' you need to figure out what the algorithm should be. in shortest mode, you have to program the solution in the least number of characters possible.

after playin' Class of Code with some friends, i set out to binge-code 68 clashes over six days an' currently sit at 429th out of 500,000+ coders. an' here i am to give you a few tips to climb the ranks an' emerge victorious over these fierce clashes between the keyboards.

first, i've only been programmin' in JavaScript for 18 months. i'm no expert, but you don't need to be. the clashes test how fast you can assess a problem, develop a solution, articulate that solution, an' then debug.

for fastest mode, use the language you're most comfortable with. get used to every native method, they'll make your life so much easier.

for reverse mode, you'll need to add an extra step. the very first thin' you should do is to create the prompt from the input an' output. sometimes, it's easy to see what the relation is an' other times, you'll need a piece of scratch paper. (yes, ski uses paper to program. sue me an' blame AP Computer Science A)

for shortest mode, you have to use Ruby. there's no way 'round it. you'll need to get used to Ruby's syntax an' methods, but once you do, that's an easy W.

last but certainly not least, don't cheat. don't plagiarize someone else's code or ask ChatGPT, :). use your own noggin an' keep it fun for everyone.
File Structures and Basic Symbols Used in Linux
Tags: linux, cybersecurity, devops
Published: 2023-05-25 15:17:04

**File Structure:**
/bin: User binaries (Common linux command needs to use in single-user mode)

/sbin: System binaries (Commands under this is for system maintenance purpose used by system admins)

/etc: Config files (etc: extended text configuration)

/dev: Device files

/proc: Process info (Contains running process info, Once the system gets rebooted then all the related files will get clear and will create new info. because it retrieves information from kernel and memory.)

/var: Variable files (It contains logs)

/tmp: Temporary files (Contains temporary files created by the system and user, Once system get reboot then all the files will get clear)

/usr: User programs (USR: Unix system resource. Contains binaries, libraries documentation files. Under it we have bin(Eg: less, awk) and sbin(Eg: cron,sshd) which contains binary files for user programs.)

/home: Home directories

/boot: Boot loader files(kernel files, grub files etc)

/lib: System libraries(Contains library files that supports the binaries that are located in /bin and /sbin)

/opt: Optional add-on apps(Contains add on installed application related files)

/mnt: Mount directory (To mount any foreign device temporarily)

/media: Removable device(To mount any removable device)

/srv: Service data (Contains server-specific service data)

**Basic Symbols:**

The dot (.) represents the current directory in the filesystem.

The dot-dot (..) represents one level above the current directory.

The forward slash (/) represents the "root" of the filesystem. (Every directory/file in the Linux filesystem is nested under the root/directory.)

The tilde (~) represents the home directory of the currently logged-in user.

The dash (-) navigates back to the previous working directory, similar to how you can navigate to your user home directory with ~. If you need to go back to our deeply nested directory 9 under your user home directory (this was my previous working directory), you would issue this command:
In your experience: could a portfolio be a devlog?
Tags: discuss, career
Published: 2023-05-25 15:02:37

I’ve got a really interesting slightly academic project a procedural floor plan generator which uses graph theory as it’s basis, I could write a paper about it but it’s quite visual and so I’d like to achieve 2 goals at once show it off and how I solve problems and hopefully that will lead to a cool portfolio with a narrative. Do you think a documentary/devlog style portfolio focussing on one project first would lead to a good portfolio or would it be confusing?
D&D Character Creation Program
Published: 2023-05-25 14:54:34

Dungeons & Dragons (D&D) is a tabletop roleplaying game where players create characters and go on adventures. One of the most important parts of D&D is character creation. This is where players decide what their character will look like, what their abilities will be, and what their personality will be like.

The D&D Character Creation Program is a Python program that makes it easy to create D&D characters. The program provides a simple interface that allows players to enter their character's information. The program then generates a character sheet with all of the information that the player needs to play the game.

The program was designed to be simple and easy to use, while still providing all of the information that players need to create a well-rounded character.

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

The D&D Character Creation Program is a Python program that uses object-oriented programming. The program defines a number of classes, including the `PC` class, which represents a D&D character. The `PC` class has a number of attributes, including the character's name, class, level, health, and armor class.

The program also defines a number of functions, including the `get_character_name()` function, which gets the character's name from the user; the `get_character_class()` function, which gets the character's class from the user; and the `create_character()` function, which creates a new `PC` object.

The program uses a number of built-in Python modules, including the `input` module, the `print` module, and the `random` module.

The D&D Character Creation Program is a simple and easy-to-use Python program that makes it easy to create D&D characters. The program is written in Python, and it is available for free on GitHub. The program is open source, so anyone can contribute to its development.{% embed https://github.com/thebacondealer/DND_Character_Creator %}

I hope you find this program useful!