Instantly share code, notes, and snippets.

View text2youtubevideo.sh
#!/bin/bash
# requirements
# TODO: test for mbrola-voices-de{1..8}
for i in wget awk mbrola aplay sox gmic ffmpeg convert espeak ; do
command -v "$i" >/dev/null 2>&1 || { echo >&2 "I require \"$i\" but it's not installed. Aborting."; exit 1; }
done
# some variables, adjust to your needs
url="http://bitimage.dyndns.org/german/MartinLuther-1912/Martin_Luther_Uebersetzung_1912.txt"
View update_habitrpg.sh
#!/bin/bash
# to install HabitRPG, follow this guide (german only):
# http://yhaupenthal.org/1422213598.htm
root="/path/to/habitrpg"
new="$root/habitrpg"
# shutdown service
systemctl stop habitrpg
View create_wallpaper.sh
#!/bin/bash
###
# adjust these variables
root="$HOME/pics/wallpaper"
name=$(date +%s)
log="/tmp/$(basename "$0").log"
###
###
View change_wallpaper.sh
#!/bin/bash
# change me
root="$HOME/pics/wallpaper"
# dependency
command -v feh >/dev/null 2>&1 || { echo >&2 "$0 error: missing dependency (\"feh\")"; exit 1; }
# reason for this here: http://yhaupenthal.org/1265597121.htm
export DISPLAY=:0.0
View keybase.md

Keybase proof

I hereby claim:

  • I am tohn on github.
  • I am yhaupenthal (https://keybase.io/yhaupenthal) on keybase.
  • I have a public key whose fingerprint is 81A2 5E64 64AF 14DE A466 0B16 30BE EF01 A79F DDD7

To claim this, I am signing this object:

View gender_rolls.bash
#!/bin/bash
# inspired by http://www.robot-hugs.com/gender-rolls/
# required: roll (http://matteocorti.ch/software/roll.html)
# https://stackoverflow.com/questions/592620/how-to-check-if-a-program-exists-from-a-bash-script
command -v roll >/dev/null 2>&1 || { echo >&2 "I require roll but it's not installed. Aborting."; exit 1; }
# http://tldp.org/LDP/abs/html/arrays.html
# I use Art-Leather instead of Leather (the vegan version) ;)
View git-hook
#!/bin/bash
# Requirements
command -v git >/dev/null 2>&1 || { echo >&2 "I require \"git\" but it's not installed. Aborting."; exit 1; }
command -v ii >/dev/null 2>&1 || { echo >&2 "I require \"ii\" but it's not installed. Aborting."; exit 1; }
# variables - change these
url="http://example.org"
server="irc.freenode.net"
port="8000"
View watch_tv.sh
#!/bin/bash
# Watch various streams
# http://marmaro.de/lue/txt/2014-01-05.txt
# https://linuxundich.de/gnu-linux/fussball-em-2016-auf-ard-und-zdf-per-vlc-oder-totem-schauen/
# requirements
command -v mpv >/dev/null 2>&1 || { echo >&2 "I require \"mpv\" but it's not installed. Aborting."; exit 1; }
command -v mencoder >/dev/null 2>&1 || { echo >&2 "I require \"mencoder\" but it's not installed. Aborting."; exit 1; }