Skip to content

Instantly share code, notes, and snippets.

View stith's full-sized avatar

Anna Stith stith

View GitHub Profile
@stith
stith / readme.md
Created September 28, 2023 10:39
Rekordbox .flac to .aiff conversion

quick script that, given a rekordbox library.xml file, converts all .flac files to .aiff, preserving file metadata like cue points, play count, and album art. also maintains the file's bit rate.

probably will fail in some weird cases that i didn't have to care about with my tiny baby library

@stith
stith / keybase.md
Created June 5, 2015 02:50
keybase.md

Keybase proof

I hereby claim:

  • I am stith on github.
  • I am stith (https://keybase.io/stith) on keybase.
  • I have a public key whose fingerprint is 34D5 7F07 9811 B5EA B7D4 5915 7C4E EFA1 B205 55BD

To claim this, I am signing this object:

@stith
stith / ssltest.py
Last active October 9, 2024 10:28
#!/usr/bin/python
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford ([email protected])
# The author disclaims copyright to this source code.
# Mirror from http://s3.jspenguin.org/ssltest.py
import sys
import struct
import socket
import time
@stith
stith / stuff.js
Last active August 29, 2015 13:57
doStuff().then(function(things) {
if (!things) {
throw new Error("Here I want to skip everything else, including the 'then's after the next catch..");
}
if (canMakeNewThing) {
// This should continue to the next 'then'
return someNewThing.save();
}
@implementation Observer
-(id)init {
// ...
[_preferences addObserver:self forKeyPath:@"apiKey" options:NSKeyValueObservingOptionNew context:nil];
[_preferences addObserver:self forKeyPath:@"apiSecret" options:NSKeyValueObservingOptionNew context:nil];
}
// ...
// Type this into your address bar at simple.com:
// It just messes with the background, don't worry about your cookies :D
javascript:void(function(){disPage.guilloche.guillocheKey=0;setInterval(function(){disPage.guilloche.guillocheKey++; disPage.guilloche.drawNiceGuilloche();},100)}());
@stith
stith / strace.sh
Created February 25, 2012 08:28
strace all processes
strace $(pidof httpd |sed 's/\([0-9]*\)/\-p \1/g')
NSString *filename = [NSString stringWithFormat:@"%0.0f.png", [[NSDate date] timeIntervalSince1970]];
NSString *documentsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
MSLogTo(@"info", @"documentsPath = %@",documentsPath);
NSURL *newUrl = [NSURL fileURLWithPath:documentsPath isDirectory:YES];
NSString *saveTo = [[newUrl absoluteString] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
MSLogTo(@"info", @"Saving image to %@",saveTo);
NSError *error;
if (![UIImagePNGRepresentation(image) writeToFile:saveTo options:NSDataWritingAtomic error:&error]) {
@stith
stith / ess2cbwarp.py
Created September 20, 2011 11:49
Convert Essentials warps to CommandBook's CSV
#!/usr/bin/env python
import sys
import yaml
import os
import time
from os import path
# Make sure paths exist
if len(sys.argv) != 2:
@stith
stith / ess2sc.py
Created September 20, 2011 08:49
Convert Essentials homes to SpawnControl
#!/usr/bin/env python
import sys
import sqlite3
import yaml
import os
import time
from os import path
# Make sure paths exist