Skip to content

Instantly share code, notes, and snippets.

View psobot's full-sized avatar

Peter Sobot psobot

View GitHub Profile
@psobot
psobot / receive_midi_sample_dump.py
Last active November 10, 2021 21:13
MIDI Sample Dump Receiver
"""
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 / yaml_file.py
Created August 8, 2012 20:28
Real-time YAML object access in Python
"""
liveyamlfile.py
Live Pythonic attribute access to properties in a yaml file.
by Peter Sobot (hi@psobot.com), August 8, 2012
"""
import os
import time
import yaml
import logging
@psobot
psobot / randomthumbs.rb
Created April 22, 2012 00:49
Random Image Thumbnailer
# Hacky random image thumbnailer.
# by Peter Sobot, April 21, 2012
# Based heavily on code by Michael Macias
# (https://gist.github.com/a54cd41137b678935c91)
require 'rmagick'
images = Dir.glob(ARGV[0] ? ARGV[0]
: '-default-input-paths-')
output_dir = (ARGV[1] ? ARGV[1]
@psobot
psobot / ccl_bplist.py
Created May 5, 2018 16:24
Instruments Decoder/Re-encoder
"""
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 April 3, 2018 13:26
Python File and Directory Helpers
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 / excluded_sources.txt
Last active January 26, 2018 14:41
"The Street Preacher" - hyper-local twitter bot
<a href="http://foursquare.com" rel="nofollow">foursquare</a>
<a href="http://instagram.com" rel="nofollow">Instagram</a>
@psobot
psobot / generate_k2500xs_ui.py
Last active November 27, 2017 07:51
Kurzweil K2500XS UI Generator
"""
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 July 9, 2017 16:16
Xbox API Downloader

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 March 21, 2017 19:14
Rails "Copy Test Runner Command to Clipboard" for Sublime Text 2
[
{ "command": "get_single_test_run", "caption": "Copy Test Runner Command to Clipboard" },
{ "caption": "-", "id": "end" }
]
@psobot
psobot / fmod.py
Created July 8, 2012 18:35
Binary File Change Monitor in Python
"""
Detect exactly which bytes have changed in a file.
Useful for binary reverse engineering:
- Start script
- Save file from program, changing one attribute
- See which byte(s) have changed
"""
import os
import traceback