Skip to content

Instantly share code, notes, and snippets.

View zellyn's full-sized avatar

Zellyn Hunter zellyn

View GitHub Profile
@zellyn
zellyn / _.md
Created October 9, 2012 03:08
just another inlet to tributary
@zellyn
zellyn / _.md
Created October 5, 2012 04:41
just another inlet to tributary

No parent Inlet

@zellyn
zellyn / _.md
Created October 5, 2012 04:00
just another inlet to tributary
@zellyn
zellyn / _.md
Created October 3, 2012 22:12
animation of rectangle corner radius
@zellyn
zellyn / gist:1513238
Created December 23, 2011 05:21
brew install tesseract fails to find leptonica
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by tesseract configure 3.01, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/tesseract/3.01
## --------- ##
## Platform. ##
@zellyn
zellyn / birthday.py
Created January 14, 2011 21:48
Birthday Problem Variation
#! /usr/bin/python
# See http://pballew.blogspot.com/2011/01/back-of-envelope-answers-to-hard.html
import numpy as np
def transition_matrix(slots):
return np.matrix([
([0] * i) +
[(i+1.0)/slots, 1-(i+1.0)/slots][:slots-i] +
We couldn’t find that file to show.
@zellyn
zellyn / init.el
Created June 10, 2010 14:34
Read environment vars into emacs
(let* ((env-output (shell-command-to-string "source .bashrc ; source .emacs.d/emacsenv.sh"))
(lines (split-string env-output "[\r\n]+" t))
(regex "^\\([^ ]+\\) \\(.*\\)$")
(pairs (mapcar (lambda (line)
(if (string-match regex line)
(list (match-string 1 line) (match-string 2 line))))
lines)))
(mapc (lambda (pair) (apply 'setenv pair)) pairs))
class SpecialOpenIDAuth(OpenIDAuth):
def authenticate(self, identity=None):
user = super(SpecialOpenIDAuth, self).authenticate(identity)
if user and is_staff_openid_provider(identity):
user.is_staff = True
user.save()
return user
#!/usr/bin/env python
from distutils.core import setup
setup(name='zjh_appa',
version='1.0',
description='Test Application A',
author='Zellyn Hunter',
author_email='[email protected]',
url='http://www.zellyn.com/example/appA/',