Skip to content

Instantly share code, notes, and snippets.

View Esl1h's full-sized avatar
🌎
“Don’t put all your greps in one awk.”

Esli Silva Esl1h

🌎
“Don’t put all your greps in one awk.”
View GitHub Profile
@Esl1h
Esl1h / adb-remove-packages.sh
Last active September 9, 2025 13:27
By a list, trying remove or disable all installed packages on Android device
#!/bin/bash
# Used to turn ann old smartphone into a DAP (Digital Audio Player)
# https://esli.blog.br/transformando-antigo-smartphone-em-dap
set +e
export ANDROID_SERIAL=ZF523242ZG # 'adb devices' command to find your device
LIST=packages-remove.txt
echo "Loading package list..."
@Esl1h
Esl1h / encrypt.exp
Created July 8, 2025 13:01
Using picocrypt CLI with bash/expect to automate some encryption
#!/usr/bin/expect -f
# This script encrypts a file using picocrypt
# Install picocrypt CLI and expect
# ./encrypt.exp 'YourPassword' yourFolderOrFiles
set password [lindex $argv 0]
set file [lindex $argv 1]
spawn picocrypt $file
@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 June 9, 2025 19:25
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