Skip to content

Instantly share code, notes, and snippets.

View danilogco's full-sized avatar

Danilo Carolino danilogco

View GitHub Profile
@danilogco
danilogco / discord_installer.py
Created November 19, 2024 17:46
Discord Install / Update script for Linux (tar file)
import os
import requests
import tarfile
import shutil
def download_and_extract_discord():
# URL of the Discord tar.gz file
discord_url = "https://discord.com/api/download?platform=linux&format=tar.gz"
# Set paths
@danilogco
danilogco / awscli_update.sh
Created December 23, 2024 19:48
AWS CLI v2 installer script (or update)
#!/bin/bash
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o /tmp/awscliv2.zip
unzip /tmp/awscliv2.zip -d /tmp/awscli
sudo /tmp/awscli/aws/install --bin-dir /usr/local/bin --install-dir /usr/local/aws-cli
# to update:
# sudo /tmp/awscli/aws/install --bin-dir /usr/local/bin --install-dir /usr/local/aws-cli --update
rm -rf /tmp/awscliv2.zip /tmp/awscli
@danilogco
danilogco / dbeaver_installer.sh
Created December 24, 2024 16:41
DBeaver installer script for Linux (no JDK)
#!/bin/bash
APP_FOLDER=/opt
TMP_FOLDER=/tmp
rm -rf $APP_FOLDER/dbeaver*
wget "https://dbeaver.io/files/dbeaver-ce-latest-linux.gtk.x86_64-nojdk.tar.gz" -P $TMP_FOLDER/
tar -xvzf $TMP_FOLDER/dbeaver-ce-latest-linux.gtk.x86_64-nojdk.tar.gz -C $APP_FOLDER/
rm -rf $TMP_FOLDER/dbeaver-ce-latest-linux.gtk.x86_64-nojdk.tar.gz
@danilogco
danilogco / template.yml
Created December 30, 2024 19:46
AWS SAM CLI deploy IAM Role Permissions
Statement:
- Effect: "Allow"
Action:
- "cloudformation:CreateChangeSet"
- "cloudformation:DescribeStackEvents"
- "cloudformation:DescribeStacks"
- "cloudformation:DescribeChangeSet"
- "cloudformation:ExecuteChangeSet"
- "cloudformation:GetTemplate"
- "cloudformation:GetTemplateSummary"
@danilogco
danilogco / palworld-backup.sh
Last active January 22, 2025 13:04
Palworld dedicated server backup script - Ubuntu Server
# crontab -e
# 0 3 * * * /home/steam/backup.sh
# 30 3 * * * /home/steam/clean.sh
# 0 4 * * * /sbin/shutdown -r now
#!/bin/bash
# Caminho para o diretório de saves do Palworld
SAVE_DIR="/home/steam/.steam/steam/steamapps/common/PalServer/Pal/Saved"
@danilogco
danilogco / settings.json
Created January 28, 2025 16:53
Disable Discord update requirement to access
// ~/.config/discord/settings.json
{
"SKIP_HOST_UPDATE": true
}
@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 / link.txt
Created June 19, 2025 05:06
vlc skin
@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 / 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"