Skip to content

Instantly share code, notes, and snippets.

View airtonzanon's full-sized avatar

Airton Zanon airtonzanon

View GitHub Profile
@airtonzanon
airtonzanon / remove-node-from-cluster.sh
Last active April 5, 2025 13:46
Remove node from proxmox cluster without having to do any reinstallation.
#!/bin/bash
echo "\n #####################"
echo "Remove node from Proxmox Cluster"
echo "This is the same commands that we have in the docs:"
echo "https://pve.proxmox.com/pve-docs/pve-admin-guide.html#pvecm_separate_node_without_reinstall \n"
systemctl stop pve-cluster
systemctl stop corosync
@airtonzanon
airtonzanon / allow-ceph-1-pool.sh
Last active April 5, 2025 13:47
remove Ceph installation from Proxmox (not sure if it works with Ceph in another env)
#!/bin/bash
ceph config set global mon_allow_pool_size_one true
ceph osd pool set data_pool min_size 1
ceph osd pool set data_pool size 1 --yes-i-really-mean-it
#!/bin/bash
echo "\n #####################"
echo "Installing bigcoin source node"
echo "This is just a script putting everything together from the blog post below"
echo "https://hackernoon.com/a-complete-beginners-guide-to-installing-a-bitcoin-full-node-on-linux-2018-edition-cb8e384479ea \n"
apt update
apt install git -y
mkdir -p bitcoin-source && cd bitcoin-source
@airtonzanon
airtonzanon / install-spark-wizard.sh
Last active May 12, 2025 11:40
Script to install spark on debian 12
#!/bin/bash
echo "\n #####################"
echo "Install Spark Script"
echo "Done with massive help of Mistral"
echo "This is a wizard that it was not tested 100% yet, gonna try it later"
echo "Done with a bunch of search around, might not be the best way of installing or using spark \n"
# Function to check if the user is root
is_root() {
@airtonzanon
airtonzanon / pre-commit
Created December 8, 2023 14:46
PHPSTAN + PHPCS FIX - .git/hooks/pre-commit
fileList=$(git diff --cached --name-only)
phpFileList=$(echo "$fileList" | grep -E '\.(php)$')
if [ ${#phpFileList} -gt 0 ]; then
git stash --keep-index --include-untracked
if ! docker exec YOUR_CONTAINER php -d memory_limit=4G vendor/bin/phpstan analyse ${phpFileList[*]} "$@"; then
git stash pop
exit 1
fi
@airtonzanon
airtonzanon / php_74_phpdoc_to_property_type.txt
Created July 5, 2022 15:44
PHP 7.4 php doc (one line) to property type vim macro
wwwwvwhyjhhpkddjj0
@airtonzanon
airtonzanon / show_time_spent_per_language.py
Last active April 8, 2022 13:06
Show languages used on the day and time spent on them - Pimorony Inky
#!/usr/bin/env python3
import argparse
import socket
import requests
import datetime
from PIL import Image, ImageFont, ImageDraw
from datetime import date
from font_hanken_grotesk import HankenGroteskBold, HankenGroteskMedium
@airtonzanon
airtonzanon / .zshrc
Last active September 30, 2024 09:52
my zsh file
export ZSH="/Users/airtonzanon/.oh-my-zsh"
ZSH_THEME="robbyrussell"
plugins=(git zsh-autosuggestions zsh-wakatime)
source $ZSH/oh-my-zsh.sh
alias vim="nvim"
alias projects="cd ~/Documents/projects"
@airtonzanon
airtonzanon / cmdline.txt
Created May 4, 2021 12:44
raspberry py boot files + Waveshare LCD 5 inch
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=334dade7-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo quiet init=/usr/lib/raspi-config/init_resize.sh splash plymouth.ignore-serial-consoles