Skip to content

Instantly share code, notes, and snippets.

View danilogco's full-sized avatar

Danilo Carolino danilogco

View GitHub Profile
@danilogco
danilogco / install.sh
Last active July 6, 2025 05:14
Install Bluemail on Linux Mint/Debian/Ubuntu without snapshit
wget https://download.bluemail.me/BlueMail/deb/BlueMail.deb
wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gconf/gconf2-common_3.2.6-6ubuntu1_all.deb
wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gconf/libgconf-2-4_3.2.6-6ubuntu1_amd64.deb
sudo dpkg -i gconf2-common_3.2.6-6ubuntu1_all.deb
sudo dpkg -i libgconf-2-4_3.2.6-6ubuntu1_amd64.deb
sudo dpkg -i BlueMail.deb
# add --no-sandbox in the end of the launcher command
@danilogco
danilogco / opensnitch_install.sh
Created June 26, 2025 18:26
Linux Mint / Ubuntu / Install and basic config
#!/bin/bash
set -e
sudo apt update
sudo apt install opensnitch
RULE_PATH="/etc/opensnitchd/rules"
sudo mkdir -p "$RULE_PATH"
sudo tee "$RULE_PATH/000-allow-system-cmds.json" > /dev/null <<'EOF'
@danilogco
danilogco / update.py
Last active June 23, 2025 21:20
Poetry order and update all dependencies
# pip install pyinstaller
# pyinstaller --onefile update.py
# sudo mv dist/update /usr/local/bin/poetry-update
# chmod +x /usr/local/bin/poetry-update
import tomlkit
import requests
from pathlib import Path
import subprocess
# Utils
alias upd='sudo apt update && sudo apt full-upgrade -y && flatpak upgrade -y'
alias cleanup='sudo apt autoremove -y && sudo apt autoclean -y && flatpak uninstall --unused -y'
alias please='sudo $(fc -ln -1)'
alias ip='ip -c a'
alias ports='sudo lsof -i -P -n | grep LISTEN'
# Zsh config helpers
alias zshconfig="nano ~/.zshrc"
alias zshaliases="nano ~/.zsh_aliases"
@danilogco
danilogco / zsh_install.sh
Last active June 22, 2025 01:32
Amazon Linux 2023 / Linux Mint / Ubuntu - ZSH install script
#!/bin/bash
set -e
# Detecta gerenciador de pacotes
if command -v dnf &>/dev/null; then
PM="dnf"
elif command -v apt &>/dev/null; then
PM="apt"
else
@danilogco
danilogco / configure_nano.sh
Last active June 22, 2025 01:24
Nano extensios > Linux Mint/Ubuntu
#!/bin/bash
NANORC="$HOME/.nanorc"
# Reseta o arquivo
> "$NANORC"
# Inclui a pasta principal (assumindo que sempre existe)
echo 'include "/usr/share/nano/*.nanorc"' >> "$NANORC"
@danilogco
danilogco / zsh_install.sh
Last active June 22, 2025 01:11
Install and configure zsh on Linux Mint/Ubuntu
# install zsh
cd $HOME
sudo apt install zsh
touch .zshrc
chsh -s $(which zsh)
sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
# install plugins
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
@danilogco
danilogco / link.txt
Created June 19, 2025 05:06
vlc skin
@danilogco
danilogco / check_dir_exists.py
Created February 27, 2025 19:52
s3 check directory exists script
import boto3
aws_access_key_id = "XXXXXXXXXXX"
aws_secret_access_key = "XXXXXXXXXXX"
aws_session_token = None
region_name = "us-east-1"
s3_client = boto3.client(
"s3",
aws_access_key_id=aws_access_key_id,
@danilogco
danilogco / settings.json
Created January 28, 2025 16:53
Disable Discord update requirement to access
// ~/.config/discord/settings.json
{
"SKIP_HOST_UPDATE": true
}