Skip to content

Instantly share code, notes, and snippets.

View Esl1h's full-sized avatar
🌎
Quem não tem cUrl, caça com get.

Esli Silva Esl1h

🌎
Quem não tem cUrl, caça com get.
View GitHub Profile
@Esl1h
Esl1h / SRE_en.md
Created April 26, 2025 22:32
System Prompt for SRE, DevOps, Sysadmins and Engineers

You are an Artificial Intelligence assistant specialized in infrastructure operations, SRE, system administration, and DevOps. Your goal is to provide accurate, secure, and practical answers for professionals working in IT management, automation, monitoring, and troubleshooting.

General Guidelines:

  • Always prioritize security, best practices, and automation.
  • Be objective, clear, and avoid ambiguity.
  • When suggesting commands, scripts, or configurations, briefly explain what each part does.
@Esl1h
Esl1h / deploy.v
Last active April 5, 2025 22:31
deploy.vsh
#!/usr/bin/env -S v
// A linha cima associa pelo env o .vsh ao V
// Então basta dar permissão de execução (+x) executar o script .vsh no terminal
// como `./deploy.vsh`
// print command then execute it
fn sh(cmd string) {
println('❯ ${cmd}')
print(execute_or_exit(cmd).output)
@Esl1h
Esl1h / [NO]CODE_OF_CONDUCT.md
Last active March 28, 2025 14:01
No Code of Conduct

Contributor Code of Conduct

This project adheres to No Code of Conduct. We are all adults. We accept anyone's contributions. Nothing else matters.

For more information please visit the No Code of Conduct homepage.

@Esl1h
Esl1h / CoC.md
Created March 28, 2025 13:51
Code of Adult Conduct

Code of Adult Conduct

1. Principle of Charity

When interacting with people around this project try to assume the best of them. If something seems offensive start by assuming you've misunderstood. Treat others as you would wish them to treat you.

2. Principle of Agency

We all possess the capacity to chose how we feel as well as how we react. Other people cannot "make" you feel bad or "hurt" your feelings unless you allow them to. Choose to take responsibility for your own mental state and exercise your agency. Do not give other people power over you that they do not have; the power to trigger you. You have the ability to ignore most anything. Use it.

@Esl1h
Esl1h / filters_and_scriplets.js
Last active March 20, 2025 12:38
Brave Browser - Custom Filters and Scriplets
// On Brave Browser Go to brave://settings/shields/filters
//
// Filters
app.1min.ai##.css-nqmzah.ant-float-btn.sc-fWSCoS.jUFNLE.ant-float-btn-default.ant-float-btn-square > .ant-float-btn-body
emojipedia.org###FreeStarVideoAdContainer
emojipedia.org##.flex.flex-row.justify-center.items-center.flex-wrap
theoldreader.com###tor-ad-wrapper
theoldreader.com##.banner-inner
theoldreader.com###in-feed-ad
theoldreader.com##div#in-feed-ad-container:nth-of-type(3)
npub150vn9rja0yp8thvzx4mq75g6he58curtpqygxj93xwchu4tqv2xqka39dx
@Esl1h
Esl1h / default.txt
Created June 11, 2024 00:33
Vlang - V Tool help command - vlib/v/help/default.txt
V is a tool for managing V source code.
Usage:
v [options] [command] [arguments]
Examples:
v hello.v Compile the file `hello.v` and output it as
`hello` or `hello.exe`.
v run hello.v Same as above but also run the produced
executable immediately after compilation.
@Esl1h
Esl1h / ServiceRunning.sh
Last active May 15, 2024 22:32
Programming Bash/Shell Classes - Just a little exercise to discover over systemctl and ps commands if a web server are running or not - one in a million of alternatives
#!/bin/bash
function runcheck {
printf "\n" && echo -ne 'Systemctl: ' && systemctl status $SERVICE | grep 'active' | cut -d ' ' -f 7-8
printf "\n" && echo -ne 'Process: ' && ps -ef | grep $SERVICE | grep -v grep | tr -s ' ' | cut -d ' ' -f 2-10 | head -n 1
}
PS3="Select the service: "
select SERVICE in nginx httpd apache2
do
@Esl1h
Esl1h / LBs-TGs.sh
Created April 25, 2023 17:12
Search AWS over load balancers and target groups to find Load balancers without Target groups and find TGs without Registered targets
#!/bin/bash
AWS_REGION="xx-xxxx-1"
AWS_OUTPUT="json"
AWS_PROFILE="xxx"
# 01- ELBs without Target Groups
load_balancers=$(aws elbv2 describe-load-balancers --query "LoadBalancers[*].LoadBalancerArn" --output text --profile $AWS_PROFILE)
for lb in $load_balancers; do
#printf "$lb"'%b\n'
@Esl1h
Esl1h / s3url.py
Created April 11, 2023 21:36
Generate a URL from S3 objects to download (A bucket to storage logs case example)
############################################################################################################
## This script run with python3 and is able to generate pre-signed URLs from files (objects) on a s3. ##
## It is possible with it to generate URLs of several days within the same month and year for several ##
## instances without the need to provide access to the bucket for the user ##
############################################################################################################
import boto3
from colorama import Fore, Style
APP = ''