Skip to content

Instantly share code, notes, and snippets.

The light inside has broken, but I still work

Arno Richter oelna

The light inside has broken, but I still work
View GitHub Profile
oelna /
Last active Jan 19, 2017
Clean an iTunes M4A audio track from all identifying/personal information with AtomicParsley and Python

What is this

This python script is a radical attempt to remove all personal information from iTunes M4A audio tracks. All ID3 information will be lost in the process, sadly. You need to figure out a special offset in one of your audio files in a hex editor for this to work. If you are looking for a very simple solution, this is not your script.

If this helps you, please consider tipping to make up for the ridiculous amount of time I lost putting this together:
Gittip Flattr

Instructions for macOS (was OS X)

oelna / closest.js
Created Nov 8, 2016
A vanilla javascript method that returns the closest DOM ancestor that matches a selector, or null.
View closest.js
var closest = function(selector, ele) {
if(!selector || !ele) return null;
//polyfill .matches()
if(Element && !Element.prototype.matches) {
Element.prototype.matches = Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector;
if(ele.matches(selector)) return ele; //return self if it matches
oelna / crontab
Last active Jun 6, 2016
Fever RSS reader modification so it can be run via cronjob php call (without curl)
View crontab
*/20 * * * * php /path/to/your/fever/index.php refresh
# or, as in my case, with php-cgi
*/20 * * * * php-cgi /path/to/your/fever/index.php refresh
oelna / imaptransfer.php
Created Jun 5, 2016
A small utility that copies mailboxes from one IMAP account to another.
View imaptransfer.php
This code is based heavily on the instructions given on
Many hours on Stackoverflow have been spent trying to make this.
I tried to clean it up, make it readable, add a nicer UI and feedback about errors.
If you like this, use this or it helps you, I'm happy to hear about it.
Drop me a line if you have feedback, too.
2016-06-05, Arno Richter <>
oelna / convert.php
Last active Jul 14, 2019
A small utility webapp that converts between various string encodings and cleans up text
View convert.php
//check for PHP version requirements
if(version_compare(phpversion(), '5.3.0', '<')) die('This requires at least PHP 5.3 to run.');
$conversions = array(
'text' => 'UTF-8 Decode',
'function' => function($input) {
return utf8_decode($input);
oelna / create_tar.workflow
Last active Jul 29, 2016
An Automator service that creates a .tar from files and folders selected in the Finder
View create_tar.workflow
#thanks to Gordon Davisson on SO:
for f in "$@"
path=`dirname "$f"`
file=`basename "$f"`
files+=(-C "$path" "$file")
oelna /
Created Jan 24, 2016
Export Github issues from the command line
echo "Please enter your Github username"
read username
echo "Please enter your Github password"
read -s password
echo "What is the Github repo you'd like to download issues from?"
echo "Format is user/repo"
oelna /
Last active Jan 12, 2017
Müllkalender .ics der Stadt Mannheim aufhübschen

Die .ics-Datei, die man von bekommt, kann man mit ein bisschen Geduld und Arbeit im Code-Editor der Wahl recht gut aufhübschen. Die Notizen hier sind für mich selbst, aber wer mag, kann sich ja auch daran versuchen. Ich habe die Termine nicht in einem eigenen Kalender, sondern in einem allgemeinen Termine-Kalender, darum füge ich vor jeden der Einträge den Begriff Müllabfuhr. Dann weiss man Bescheid.


  • .ics datei öffnen (im format windows 1252?)
  • datei speichern als UTF-8
  • Ersetze ;CHARSET=UTF-8 durch empty string (braucht man nicht, die ganze datei ist jetzt eh utf-8)



Keybase proof

I hereby claim:

  • I am oelna on github.
  • I am oelna ( on keybase.
  • I have a public key whose fingerprint is B272 7A56 6C45 01FF F2AE 1CF1 3F3E 3787 F05C 561B

To claim this, I am signing this object:

oelna / base36_c.m
Last active Aug 29, 2015
Two functions to convert a base 10 NSNumber to a base 36 NSString and the other way around, using C
View base36_c.m
/* Arno Richter, May 2014 */
- (NSString *)toBase10:(NSNumber *)fromValue withBase:(int)base {
char base_digits[] = "0123456789abcdefghijklmnopqrstuvwxyz";
unsigned long int number_to_convert = [fromValue unsignedLongValue];
int converted_number[64];
int index = 0;
char return_string[64] = "";