Skip to content

Instantly share code, notes, and snippets.

View bmaeser's full-sized avatar

Bernhard Mäser bmaeser

View GitHub Profile
@bmaeser
bmaeser / subtitle-extract.txt
Created September 2, 2011 23:25
extract subtitles from *.mkv-files on osx
lines with $ are commands
### install mkvtoolnix:
$ brew install mkvtoolnix
### list content of the mkv-file:
$ mkvmerge -i mymoviefile.mkv
### what will give you:
@bmaeser
bmaeser / imdb.sh
Created September 7, 2011 00:37
good movies list with bash, awk and imdb
#!/bin/bash
MIN_RATING=7
MIN_VOTES=50000
usage="usage: imdb-ratings.sh -r MIN_RATING -v MIN_VOTES"
while getopts "r:v:h" options; do
case $options in
h ) echo $usage
exit 0
@bmaeser
bmaeser / usage_and_dependencies
Created September 21, 2011 17:03
quick serve some static files with node.js
node >= 0.4.1
node-static >= 0.5.9
put somewhere in your $PATH and:
webserver /path/to/dir
# will serve files from that dir
webserver .
# will serve from current dir
@bmaeser
bmaeser / phpinfo.sh
Created October 15, 2013 12:52
print phpinfo() to stdout, no need for phpinfo.php in $document_root
#!/bin/sh
echo "<?php phpinfo() ?>" | php
@bmaeser
bmaeser / awesome-talks.md
Last active October 12, 2018 16:27
screencasts and talks every developer should have seen
@bmaeser
bmaeser / yourip
Created April 24, 2014 14:52
youtube to mp3 shortcut
#!/bin/sh
# downloads the audio-stream of a youtube video into a mp3 file
youtube-dl -x $1 --audio-format mp3
@bmaeser
bmaeser / kodi-alsa.desktop
Last active April 16, 2023 02:48
fix kodi to work with ALSA and working PASSTHROUGH
[Desktop Entry]
Name=KODI WITH ALSA
Comment=This session will start kodi with alsa
Exec=/home/berni/bin/kodi_alsa.sh
TryExec=/home/berni/bin/kodi_alsa.sh
Type=Application
@bmaeser
bmaeser / sips: CR2 to jpeg
Created October 13, 2024 14:29 — forked from mayurah/sips: CR2 to jpeg
Mass convert CR2 (Raw Image File) to JPEG in macOS command-line.
# Mass convert CR2 (Raw Image File) to JPEG in macOS command-line.
mkdir Converted
for i in *.CR2; do sips -s format jpeg $i --out Converted/$i.jpg;done