Skip to content

Instantly share code, notes, and snippets.

View rollbrettler's full-sized avatar

rollbrettler

  • Berlin
View GitHub Profile

Last updated: 2017-03-18

Searching for Files

Find images in a directory that don't have a DateTimeOriginal

exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .

###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs

@rollbrettler
rollbrettler / README.md
Created February 3, 2020 19:28 — forked from carestad/README.md
TTML to SRT conversion. Written in PHP.

ttml2srt.php

This is a simple script for converting TTML subtitle files to SRT ones. Tested with TTML files on tv.nrk.no.

It assumes the data is structured like this:

<tt>
 <body>
  <div>
   <p>(...)</p>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

HowTo set it up

  1. Install the admin_notifications app
  2. Create system-notifications.sh with the content from below on your system
  3. Add the script to the cronjob crontab -u www-data -e:
0 10 * * * /path/to/file/system-notifications.sh
@rollbrettler
rollbrettler / keybase.md
Created September 9, 2015 08:00
keybase.md

Keybase proof

I hereby claim:

  • I am rollbrettler on github.
  • I am rollbrettler (https://keybase.io/rollbrettler) on keybase.
  • I have a public key whose fingerprint is 2AB2 7BE4 DBB9 4676 631B 7F6E A4D3 1DE4 BBF2 981D

To claim this, I am signing this object:

@rollbrettler
rollbrettler / dnsmasq.conf
Created June 30, 2015 06:43
dnsmasq.conf
# Configuration file for dnsmasq.
#
# Format is one option per line, legal options are the same
# as the long options legal on the command line. See
# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details.
# Listen on this specific port instead of the standard DNS port
# (53). Setting this to zero completely disables DNS function,
# leaving only DHCP and/or TFTP.
#port=5353
@rollbrettler
rollbrettler / list.md
Last active September 19, 2017 07:45
Offline reading / watch list

Books

Fictional

  • Dexter
    • Darkly Dreaming Dexter
    • Dearly Devoted Dexter – ISBN 978-1593275679
    • Dexter in the Dark – ISBN 978-0752881607
    • Dexter by Design – ISBN 978-0752884615
  • Dexter Is Delicious – ISBN 978-1409117865
sudo sh -c "echo 'deb-src http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi' >> /etc/apt/sources.list"
sudo apt-get update
sudo apt-get --no-install-recommends install build-essential devscripts autotools-dev fakeroot dpkg-dev debhelper autotools-dev dh-make quilt ccache libsamplerate0-dev libpulse-dev libaudio-dev lame libjack-jackd2-dev libasound2-dev libtwolame-dev libfaad-dev libflac-dev libmp4v2-dev libshout3-dev libmp3lame-dev
apt-get source darkice
cd $(ls | grep darkice)
# copy rules file to debian/rules
debchange -v 1.0-999~mp3+1
dpkg-buildpackage -rfakeroot -uc -b
sudo dpkg -i ../darkice_1.0-999~mp3+1_armhf.deb