Skip to content

Instantly share code, notes, and snippets.

View vladbabii's full-sized avatar
💭
I may be slow to respond.

Vlad Babii vladbabii

💭
I may be slow to respond.
View GitHub Profile
@vladbabii
vladbabii / debian.init.sh
Last active April 24, 2024 18:23
debian init
echo "#manual" > >> /etc/apt.sources.list
echo "deb https://ftp.debian.org/debian/ bookworm contrib main non-free non-free-firmware" >> /etc/apt.sources.list
echo "deb https://ftp.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware" >> /etc/apt.sources.list
echo "deb https://ftp.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware" >> /etc/apt.sources.list
echo "deb https://ftp.debian.org/debian/ bookworm-backports contrib main non-free non-free-firmware" >> /etc/apt.sources.list
echo "deb https://security.debian.org/debian-security/ bookworm-security contrib main non-free non-free-firmware" >> /etc/apt.sources.list
apt update
apt install -y sudo
/usr/sbin/usermod -aG sudo blue
@vladbabii
vladbabii / docker-compose.yaml
Created April 9, 2024 16:24
docker compose watchtower
version: "2.1"
services:
watchtower:
image: containrrr/watchtower
container_name: watchtower
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Bucharest
@vladbabii
vladbabii / docker-compose.yaml
Created April 9, 2024 16:23
docker compose apt cacher ng
version: "2.1"
services:
apt-cacher-ng:
image: sameersbn/apt-cacher-ng:3.7.4-20220421
container_name: apt-cacher-ng
ports:
- <ip>:3142:3142
volumes:
@vladbabii
vladbabii / prox-migrate.sh
Created March 26, 2024 12:19
migrate proxmox containers from current host to a remote. doing stop, backup, rsync then start. also sets 'migrated' tag and disables onboot start on source
#!/bin/bash
# Read the ID from the first argument
id="$1"
MODE="stop"
STORAGE_LOCAL="backups3"
STORAGE_LOCAL_PATH="/storage3/pve-backup"
REMOTE_HOST="outbound"
@vladbabii
vladbabii / Code.gs
Last active February 24, 2024 15:09
google apps script for gmail to auto move totrash (run daily)
function cleanUpAll(){
clean7DaysAutoPrune();
clean6MonthsAutoPrune();
clean1YearAutoPrune();
}
function clean7DaysAutoPrune(){
cleanUpWithParams(7,'auto-prune/auto-prune-7d');
}
@vladbabii
vladbabii / portainer-only.yml
Created September 28, 2022 12:00 — forked from alecs/portainer-only.yml
traefik v28 + portainer 2.15 docker-compose
#
# mkdir -p /shared/portainer/data/
# docker-compose -f portainer-only.yml -p portainer up -d
#
version: '3.7'
services:
portainer:
image: portainer/portainer-ce:latest
container_name: 'portainer'
@vladbabii
vladbabii / klipper_printer_gcode_incremental_macro.cfg
Created December 8, 2019 13:57
klipper printer gcode incremental macro
#
# set start/end with gcode:
#
# SET_GCODE_VARIABLE MACRO=incremental_settings VARIABLE=start VALUE=2
# SET_GCODE_VARIABLE MACRO=incremental_settings VARIABLE=now VALUE=2
# SET_GCODE_VARIABLE MACRO=incremental_settings VARIABLE=end VALUE=5
#
# if you set now on each toolchange, if it runs out, the next tool will be used
#
# then run gcode:
@vladbabii
vladbabii / run_this_to_map_anet_a8_to_dev_aneta8
Created June 29, 2018 20:17
Udev Rule To Map Anet A8 to /dev/aneta8
echo "SUBSYSTEM==\"tty\", ATTRS{idVendor}==\"1a86\", ATTRS{idProduct}==\"7523\", SYMLINK+=\"aneta8\", " > /etc/udev/rules.d/99-aneta8.rules
@vladbabii
vladbabii / myezbkp.sh
Created May 2, 2018 16:20 — forked from kriansa/myezbkp.sh
Easy MySQL incremental backups
#!/bin/sh
# ========================================================= #
# MyEzBkp
# Easy and simple backup of your entire MySQL Server.
#
# Ver: 1.0
# By: Kriansa
#
# This script requires root privileges to run!
# Tested only in RHEL based distros (Fedora & CentOS)
@vladbabii
vladbabii / howto-make-desktop-elements-smaller-ubuntu-17.txt
Created May 2, 2018 05:52
Ubuntu 17 make desktop elements smaller
# apt-get install dconf-editor
$ dconf-editor
/org/gnome/desktop/interface/text-scaling-factor = 0.80
/org/gnome/nautilus/desktop/font/custom value = Ubuntu 10
$ gnome-control-center
Dock -> Icon size = 28
$ nautilus