Skip to content

Instantly share code, notes, and snippets.

View tohn's full-sized avatar
🏳️‍🌈
#fcknzs

Yana/Yannic Haupenthal tohn

🏳️‍🌈
#fcknzs
View GitHub Profile
@tohn
tohn / gender_rolls.bash
Created July 23, 2014 16:38
Gender Rolls
#!/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 / update_habitrpg.sh
Created July 2, 2015 12:15
Update HabitRPG
#!/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 / watch_tv.sh
Last active June 15, 2016 11:58
Dmenu based german public tv station switcher
#!/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; }
@tohn
tohn / git-hook
Last active June 15, 2016 12:05
This git-hook will print all htm-files of the latest commit message to an irc channel.
#!/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 / change_wallpaper.sh
Last active June 15, 2016 12:09
Change wallpaper
#!/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 / create_wallpaper.sh
Last active June 15, 2016 12:19
Create a wallpaper with GMIC
#!/bin/bash
###
# adjust these variables
root="$HOME/pics/wallpaper"
name=$(date +%s)
log="/tmp/$(basename "$0").log"
###
###
@tohn
tohn / text2youtubevideo.sh
Last active June 15, 2016 12:44
Given an input .txt file, this will output a videofile, subtitles and a thumbnail for a YouTube video.
#!/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"
@tohn
tohn / openpgp.md
Created July 2, 2023 10:14
Keyoxide

openpgp4fpr:81A25E6464AF14DEA4660B1630BEEF01A79FDDD7