Skip to content

Instantly share code, notes, and snippets.

Yannic Haupenthal tohn

Block or report user

Report or block tohn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tohn
tohn / text2youtubevideo.sh
Last active Jun 15, 2016
Given an input .txt file, this will output a videofile, subtitles and a thumbnail for a YouTube video.
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
@tohn
tohn / create_wallpaper.sh
Last active Jun 15, 2016
Create a wallpaper with GMIC
View create_wallpaper.sh
#!/bin/bash
###
# adjust these variables
root="$HOME/pics/wallpaper"
name=$(date +%s)
log="/tmp/$(basename "$0").log"
###
###
@tohn
tohn / change_wallpaper.sh
Last active Jun 15, 2016
Change wallpaper
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
@tohn
tohn / keybase.md
Created Oct 26, 2014
Keybase identity check
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) ;)
@tohn
tohn / git-hook
Last active Jun 15, 2016
This git-hook will print all htm-files of the latest commit message to an irc channel.
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"
@tohn
tohn / watch_tv.sh
Last active Jun 15, 2016
Dmenu based german public tv station switcher
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; }
You can’t perform that action at this time.