Skip to content

Instantly share code, notes, and snippets.

Avatar

Peter Sobot psobot

View GitHub Profile
@psobot
psobot / protodump.py
Created Mar 13, 2022
Protobuf Definition Dumper
View protodump.py
"""
Super hacky script to parse compiled Protobuf definitions out of one or more binary files.
Very useful if, say, you want to pull the internal data structures out of a compiled App Store app.
Requires `pip install 'protobuf>=3.20.0rc1'`.
Example usage:
python3 protodump.py /Applications/SomeAppBundle.app ./proto_files_go_here/
(c) Peter Sobot (@psobot), March 13, 2022
@psobot
psobot / kos_file_dumper.py
Last active May 11, 2022
Kurzweil KOS File Packer/Unpacker
View kos_file_dumper.py
"""
Kurzweil K2500/K2600 KOS operating system update file packer/repacker
by Peter Sobot, Nov 6, 2021
@psobot / github@petersobot.com
Requirements: none! Pure Python. Just use Python 3.2+.
"""
import os
import math
@psobot
psobot / receive_midi_sample_dump.py
Last active Nov 10, 2021
MIDI Sample Dump Receiver
View receive_midi_sample_dump.py
"""
MIDI Sample Dump receive script
by Peter Sobot, Nov 6, 2021
@psobot / github@petersobot.com
Requirements: pip install python-rtmidi tqdm numpy pysoundfile
"""
import argparse
import rtmidi
@psobot
psobot / ccl_bplist.py
Created May 5, 2018
Instruments Decoder/Re-encoder
View ccl_bplist.py
"""
Copyright (c) 2012-2016, CCL Forensics
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
@psobot
psobot / path.py
Created Apr 3, 2018
Python File and Directory Helpers
View path.py
import os
from glob import glob
class Directory(object):
def __init__(self, _dir=None):
if _dir:
self._dir = os.path.abspath(os.path.expanduser(_dir))
else:
self._dir = os.path.abspath(os.getcwd())
@psobot
psobot / generate_k2500xs_ui.py
Last active Nov 27, 2017
Kurzweil K2500XS UI Generator
View generate_k2500xs_ui.py
"""
generate_k2500xs_ui.py
November 26, 2017 by @psobot
MIT licensed
Generates a screen image for the Kurzweil K2500XS
(http://www.vintagesynth.com/kurzweil/k2500.php)
program list and keymap can be provided on the command line with
--programs <program 1> <program 2>...
@psobot
psobot / README.md
Created Jul 9, 2017
Xbox API Downloader
View README.md

This tiny script hits the Xbox API and downloads a user's entire Xbox360 achievement history into flat JSON files on disk, as well as a Sqlite DB.

Needs:

@psobot
psobot / Context.sublime-menu
Created Mar 21, 2017
Rails "Copy Test Runner Command to Clipboard" for Sublime Text 2
View Context.sublime-menu
[
{ "command": "get_single_test_run", "caption": "Copy Test Runner Command to Clipboard" },
{ "caption": "-", "id": "end" }
]
@psobot
psobot / NSDate+Extensions.swift
Created Jun 23, 2015
Swift NSDate Comparison Extension
View NSDate+Extensions.swift
// NSDate doesn't include overrides for standard comparison operators in Swift.
// This extension adds <, >, <=, >=, and ==, using NSDate's built-in `compare` method.
// MIT licensed.
func <=(lhs: NSDate, rhs: NSDate) -> Bool {
let res = lhs.compare(rhs)
return res == .OrderedAscending || res == .OrderedSame
}
func >=(lhs: NSDate, rhs: NSDate) -> Bool {
let res = lhs.compare(rhs)
@psobot
psobot / bouncer.py
Last active Oct 25, 2021
Logic Pro X Project Bounce script
View bouncer.py
import os
import sys
import time
import atomac
import subprocess
if len(sys.argv) < 2:
print "Usage: bouncer.py <path_to_logic_project> (<path_to_logic_project>)"
os.exit(1)