Skip to content

Instantly share code, notes, and snippets.

Adam Mayer phooky

Block or report user

Report or block phooky

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
phooky /
Created Nov 6, 2019
terrible fm synthesis, it's just awful
import wave
import sys
import struct
import math
print("Writing to {}".format(outpath))

Keybase proof

I hereby claim:

  • I am phooky on github.
  • I am phooky ( on keybase.
  • I have a public key whose fingerprint is 8D02 E4ED 9CB7 9E1D 739A A5AE 2811 F88B 2064 A861

To claim this, I am signing this object:

phooky /
Created Nov 9, 2012
A quick script for cloning all the githup repositories for your user. Requires the github3 package; install with "pip install github3"
from github3 import authorize, login
from getpass import getuser, getpass
from os.path import exists, expanduser
from subprocess import Popen
CREDENTIALS_PATH = expanduser('~/.clone_repo.token')
def cloneAllRepos(gh):
phooky /
Created Feb 6, 2012
That thing for the dragon curve? Yeah, again, but for the moore curve.
from itertools import chain
import sdxf
from math import sin,cos,pi
axiom = list("LFL+F+LFL")
rules = { 'L' : list("-RF+LFL+FR-"),
'R' : list("+LF-RFR-FL+") }
phooky /
Created Jan 25, 2012
Script for generating a dragon curve in dxf format; requires sdxf.
import sdxf
from math import sqrt, sin, cos, pi
iterations = 11
def move(pos,angle,distance):
nx = pos[0] + sin(angle)*distance
ny = pos[1] + cos(angle)*distance
phooky /
Created Jan 5, 2012
A simple wrapper script for git that tracks cloned repositories and implements "git pull-all" to do a git pull in each such repository.
# Git wrapper for tracking cloned repositories and implementing
# "pull-all" to update all cloned repositories from their origins.
# Add the following to your bashrc to enable:
# alias git=/PATH/TO/
# Todo: parse out options to clone to avoid completely messing up
#!/usr/bin/env python
# Here's a useful skeleton for generating (in this case) an intel hex file
# for filling size bytes with 0xff; it can be easily modified to convert
# bytes from stdin.
size = 0x200
offset = 0
blocksize = 16
You can’t perform that action at this time.