This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "debian/wheezy64" | |
config.vm.provision :ansible do |ansible| | |
ansible.playbook = "playbook.yml" | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
## Run every 24h via cron | |
## Old entries will time out later automatically | |
( | |
cd /var/lib/firewall | |
wget -qN 'http://www.spamhaus.org/drop/drop.txt' | |
ipset create -exist spamhaus_drop hash:net counters timeout 90000 comment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Hostname Socket | |
[Socket] | |
ListenStream=101 | |
Accept=true | |
[Install] | |
WantedBy=sockets.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": "github", | |
"execute-command": "/home/toke/webhooks/hooks/github.sh", | |
"command-working-directory": "/home/toke/go", | |
"pass-arguments-to-command": | |
[ | |
{ | |
"source": "payload", | |
"name": "head_commit.id" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SUBSYSTEMS=="usb", SYMLINK="delldock", ATTRS{idVendor}=="413c", ATTRS{idProduct}=="2513", ENV{DEVTYPE}=="usb_device", TAG+="systemd", ENV{SYSTEMD_WANTS}="dock.target" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SUBSYSTEMS=="usb", SYMLINK="delldock", ATTRS{idVendor}=="413c", ATTRS{idProduct}=="2513", ENV{DEVTYPE}=="usb_device", TAG+="systemd", ENV{SYSTEMD_WANTS}="dock.service" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Laptop at work or in work context | |
Conflicts=at-home.target | |
After=graphical.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
icon="$HOME/Pictures/lock.png" | |
tmpbg='/tmp/screen.png' | |
(( $# )) && { icon=$1; } | |
scrot "$tmpbg" | |
convert "$tmpbg" -scale 10% -scale 1000% "$tmpbg" | |
convert "$tmpbg" "$icon" -gravity center -composite -matte "$tmpbg" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
function usage() { | |
cat << EOF | |
$0 - Returns exit code 1 when on battery power | |
Backup is only run when on AC power (see --no-ac-check option). | |
Example usage: "$0 && backup.sh" in cron job |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
OUTDIR="${HOME}/backup/pacman/$(hostname --short)" | |
function usage() { | |
cat << EOF | |
$0 - backup pacman package database |