This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Voice | |
{ | |
1.0 => static float multiplier; | |
1.0 => static float spread; | |
float freq; | |
float pan; | |
Impulse imp; | |
Pan2 p; | |
fun static Voice Voice(float freq, float pan) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--sbin-path=/usr/local/sbin --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock --http-client-body-temp-path=/var/tmp/nginx/client_body --http-proxy-temp-path=/var/tmp/nginx/proxy --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi --user=www-data --group=www-data --without-http_geo_module --without-http_ssi_module --with-http_ssl_module --with-http_realip_module --with-http_gzip_static_module --with-google_perftools_module |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Adapted from the book "Nginx HTTP Server", by Clement Nedelcu. | |
# Original Author: Ryuan Norbauer http://norbauerinc.com | |
# Modified: Geoffrey Grosenbach http://topfunky.com | |
# Modified: Clement Nedelcu http://cnedelcu.blogspot.com/ | |
# Modified: Jordan Orelli http://jordanorelli.com/ | |
# source: https://gist.github.com/1161075 | |
# Corresponds with the following compile-time options: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Python specific settings. | |
setlocal tabstop=4 | |
setlocal shiftwidth=4 | |
setlocal expandtab | |
setlocal autoindent | |
setlocal formatoptions=croql | |
nmap <F5> :w <CR> :!clear; python % <CR> | |
nmap <F6> :w <CR> :!python % | |
" set foldmethod=indent | |
let python_highlight_all=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _mk_color_fn(code): | |
return lambda text, bold=False: \ | |
'\033[%s%sm%s\033[0m' % (bold and '1;' or '', code, text) | |
_colormapping = { | |
'red': 31, | |
'green': 32, | |
'yellow': 33, | |
'blue': 34, | |
'magenta': 35, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import functools | |
from recurly.serialization import parse_xml | |
def injectcaller(fn): | |
""" | |
Attaches a "caller" attribute to a response object representing partial | |
function. The "caller" partial is a bound method that retains a | |
reference to its owner. | |
""" | |
@functools.wraps(fn) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from setuptools import setup | |
def read(fname): | |
return open(os.path.join(os.path.dirname(__file__), fname)).read() | |
setup( | |
name = "recurlib", | |
version = "0.0.1", | |
author = "Jordan Orelli", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static_dir = Dir( | |
base='static/', | |
index_file='index.html', | |
default_ctype='text/plain' | |
) | |
brubeck_handler = Handler( | |
send_spec='ipc://run/mongrel2_send', | |
send_ident='039eba8a-e879-40fc-9d33-52afb318d4bc', | |
recv_spec='ipc://run/mongrel2_recv', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
ARCHIVE_URL="https://github.com/recurly/recurly-client-python/tarball/master" | |
ARCHIVE_NAME="recurly.tar.gz" | |
if ! python -c 'import recurly' &> /dev/null; then | |
TMP_DIR=$(mktemp -d XXXXX) | |
pushd "$TMP_DIR" | |
wget "$ARCHIVE_URL" -O "$ARCHIVE_NAME" | |
tar --strip-components 1 -xf "$ARCHIVE_NAME" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.views.generic import FormView | |
class ContextFormView(FormView): | |
def get(self, request, *args, **kwargs): | |
form_class = self.get_form_class() | |
form = self.get_form(form_class) | |
context = self.get_context_data(**kwargs) | |
context['form'] = form | |
return self.render_to_response(context) |