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
View keybase.md

Keybase proof

I hereby claim:

  • I am phooky on github.
  • I am phooky (https://keybase.io/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
phooky / clone_repos.py
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"
View clone_repos.py
#!/usr/bin/python
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
phooky / moore.py
Created Feb 6, 2012
That thing for the dragon curve? Yeah, again, but for the moore curve.
View moore.py
#!/usr/bin/python
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
phooky / dragon.py
Created Jan 25, 2012
Script for generating a dragon curve in dxf format; requires sdxf.
View dragon.py
#!/usr/bin/python
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
phooky / git-wrapper.sh
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.
View git-wrapper.sh
#!/bin/sh
#
# 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/git-wrapper.sh
# Todo: parse out options to clone to avoid completely messing up
View hexgen.py
#!/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.