Skip to content

Instantly share code, notes, and snippets.

@pad92
pad92 / git_prune_r.sh
Last active November 22, 2022 13:46
Recursive git prune
#!/bin/sh
for REPO in $(find $(pwd) -type d -name .git | sed 's@/.git@@g'); do
echo -ne "- ${REPO}"
PRUNE=$(git --git-dir=${REPO}/.git remote prune origin 2&>1 )
if [ $? -ne 0 ]; then
echo -ne "\tERROR\n"
echo "$(date +"%Y%m%d-%H%M") ERROR: ${REPO}" >> prune.log
echo "${PRUNE}" >> prune.log
echo "" >> prune.log
@pad92
pad92 / beets_config.yaml
Last active October 23, 2022 09:35
beets and lidarr files/path mapping
directory: /music/Library_clean
library: /music/Library_clean.blb
plugins: fetchart embedart convert replaygain lastgenre chroma web bpm parentwork importadded inline
original_date: yes # Use the original date for the release.
per_disc_numbering: yes # The track numbers are incremented throughout a multi disk release.
threaded: yes # Indicating whether the autotagger should use multiple threads.
# This makes things substantially faster by overlapping work.
@pad92
pad92 / pihole-macvlan-synology-docker.txt
Created July 26, 2022 23:07 — forked from xirixiz/pihole-macvlan-synology-docker.txt
Add a PiHole instance on a macvlan enabled Docker network (Synology eth0 example)
#!/bin/bash
# NAS IP: 192.168.1.10 in this example
# DHCP scope reservation for macvlan: 192.168.1.210/28 (Details below)
## Network: 192.168.1.210/28
## HostMin: 192.168.1.211
## HostMax: 192.168.1.224
## Hosts/Net: 14
# Create a Synology macvlan0 bridge network attached to the physical eth0, and add the ip range scope (sudo)
@pad92
pad92 / rescan.sh
Created April 15, 2019 12:12
rescan disk
#!/bin/sh
for FC in $(ls /sys/class/fc_host/host*/issue_lip); do echo 1 > "${FC}"; done # rescan fiberchanel
for SCAN in $(ls /sys/class/scsi_host/host*/scan); do echo "- - -" > "${SCAN}"; done # scan new disk
for RESCAN in $(ls /sys/class/scsi_device/*/device/rescan); do echo 1 > "${RESCAN}"; done # scan disk
@pad92
pad92 / sys-btrfs.txt
Last active November 4, 2023 13:56 — forked from urwx/sys-btrfs.txt
Arch Linux Encrypted LVM Luks Btrfs Guide (EFI)
Arch Linux Encrypted LVM Luks Btrfs Guide (EFI)
# Wipe disk with random data (optional)
badblocks -c 10240 -s -w -t random -v /dev/sda
# Partition
parted -a minimal /dev/sda
- mklabel gpt
- unit Mib
- mkpart ESP fat32 0% 512
- set 1 boot on
- mkpart primary ext4 512 100%
@pad92
pad92 / vsftpd.conf
Created November 13, 2017 16:51
vsftpd lts / virtual user
#Port d'écoute (on utilise le port SSL)
#listen_port=21
#Interdiction d'utiliser le port 20
connect_from_port_20=no
#bannière d'accueil du FTP
ftpd_banner=FTP
#fichier de config PAM
@pad92
pad92 / iitc-plugin-hawk_eyes.user.js
Last active March 28, 2020 00:32
IITC plugin: Hawk Eyes
// ==UserScript==
// @id iitc-plugin-Mir
// @name IITC plugin: Hawk Eyes
// @category Misc
// @version 1.0.20150105.03
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL https://git.depad.fr/ingress-res/iitc-plugins/raw/master/pad-plugin-hawk_eyes.user.js
// @downloadURL https://git.depad.fr/ingress-res/iitc-plugins/raw/master/pad-plugin-hawk_eyes.user.js
// @description See all portals, neutrals included, regardless of the zoom used.
// @include https://www.ingress.com/intel*
@pad92
pad92 / iitc-plugin-ingressKML-exporter.user.js
Last active July 19, 2020 21:59
IITC plugin: Ingress KML Exporter
// ==UserScript==
// @id iitc-plugin-CSV@pad
// @name IITC plugin: Ingress KML Exporter
// @category Keys
// @version 1.0.20150105.03
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL https://git.depad.fr/ingress-res/iitc-plugins/raw/master/pad-plugin-ingressKML-exporter.user.js
// @downloadURL https://git.depad.fr/ingress-res/iitc-plugins/raw/master/pad-plugin-ingressKML-exporter.user.js
// @description Exports portals currently in view for use with Google Map ( KML Format ).
// @include https://www.ingress.com/intel*
#!/usr/bin/env sh
# === CONFIG ===
MYCNF='/etc/mysql/debian.cnf'
BIN_DEPS='bzip2 mysql'
# === CHECKS ===
for BIN in $BIN_DEPS; do
which $BIN 1>/dev/null 2>&1
Package: libapache2-mod-php5 libapache2-mod-php5filter
Pin: version 5.2*
Pin-Priority: 1001
Package: php5-suhosin
Pin: version 0.9.2*
Pin-Priority: 1001
Package: php5 php5-cgi php5-cli php5-common php5-curl php5-dbg php5-dev php5-enchant php5-gd php5-gmp php5-ming php5-xcache
Pin: version 5.2*