Skip to content

Instantly share code, notes, and snippets.

View genofire's full-sized avatar
💭
@genofire:chaos.fyi

genofire genofire

💭
@genofire:chaos.fyi
View GitHub Profile
@genofire
genofire / config
Created June 4, 2020 12:30
Waybar style
{
// "layer": "top", // Waybar at top layer
// "position": "bottom", // Waybar position (top|bottom|left|right)
// "height": 14, // Waybar height (to be removed for auto height)
// "width": 1280, // Waybar width
// Choose the order of the modules
"modules-left": ["sway/workspaces", "sway/mode"],
// "modules-center": ["sway/window"],
"modules-right": ["custom/arch_update", "custom/disk_home", "custom/disk_root","temperature", "cpu", "memory", "custom/mail", "network", "backlight", "pulseaudio", "clock", "battery", "idle_inhibitor", "tray"],
@genofire
genofire / 2017-12-15.md
Last active December 15, 2017 19:36
babel-multicast
@genofire
genofire / dns-update.sh
Created October 29, 2016 12:40
zone update recursiv and with checkzone
#!/bin/bash
DNS_ZONES_FOLDER='/srv/dns'
# Check if DNS zones folder exists
if [ ! -d "$DNS_ZONES_FOLDER" ]; then
echo "${DNS_ZONES_FOLDER} does not exists!" >&2
exit 1
fi
echo "git pull:"
@genofire
genofire / ip6calc
Created July 7, 2016 16:21
Fast ipv6 connection by mac
#!/bin/bash
if [[ $1 != *":"* ]]
then
MAC="${1:0:2}:${1:2:2}:${1:4:2}:${1:6:2}:${1:8:2}:${1:10:2}"
else
MAC=$1
fi
PREFIX=fe80
IFS=':'; set $MAC; unset IFS
printf "$PREFIX::%x%x:%x:%x:%x\n" $(( 0x${1} ^ 0x02 )) 0x${2} 0x${3}ff 0xfe${4} 0x${5}${6}
@genofire
genofire / libvirt-backup.sh
Created December 3, 2015 18:07
libvirt Backup VMs
echo "Cleanup old backup"
rm /srv/virt/backup/mail.qcow2
rm /srv/virt/backup/mail.ram
rm /srv/virt/backup/mail.xml
echo "Start for Backup"
virsh domblklist mail
virsh dumpxml > /srv/virt/backup/mail.xml
virsh snapshot-create-as --domain mail backup --no-metadata --diskspec vda,file=/srv/virt/backup/mail.qcow2 --memspec file=/srv/virt/backup/mail.ram,snapshot=external --atomic
virsh domblklist mail
# Copy /srv/virt/backup/mail.ram
@genofire
genofire / gist:0c15df3f32545421dbf5
Last active August 29, 2015 14:27
ffhb openvpn client
client
proto udp
remote .... 10001
dev-type tap
dev vpn_ffhb
cipher AES-128-CBC
resolv-retry infinite
auth SHA1