Skip to content

Instantly share code, notes, and snippets.

View zeekay's full-sized avatar
🔜

Zach Kelling zeekay

🔜
View GitHub Profile
@zeekay
zeekay / less2stylus.js
Last active August 29, 2015 14:15 — forked from cvan/less2stylus.js
// Usage : less2stylusDir('../src/css/');
var fs = require('fs');
// this less 2 stylus conversion script make a stylus easy to read syntax
// - let the braces
// - replace the @ for var as $
// - let semicolons
function less2stylus(less)
#!/usr/bin/env bash
for orig in "$@"
do
flac --decode --stdout "$orig" | lame -b 320 - "${orig%.flac}.mp3"
done
--- .sdk/lib/fancy_urllib/fancy_urllib/__init__.py
+++ .sdk/lib/fancy_urllib/fancy_urllib/__init__.py
@@ -384,7 +384,7 @@ class FancyProxyHandler(urllib2.ProxyHandler):
class FancyHTTPSHandler(urllib2.HTTPSHandler):
"""An HTTPSHandler that works with CONNECT-enabled proxies."""
- def do_open(self, http_class, req):
+ def do_open(self, http_class, req, **http_conn_args):
proxy_authorization = None
for header in req.headers:
@zeekay
zeekay / minls.py
Created December 12, 2014 21:14
Compress ableton live projects using Flac.
#!/usr/bin/env python2
#
# minls
#
# Compress Ableton Live sets using Flac compression.
import argparse
import gzip
import os.path
import subprocess
@zeekay
zeekay / mtime_file_watcher.py
Last active January 8, 2022 20:59
Replacement MtimeFileWatcher for App Engine SDK's dev_appserver.py
#!/usr/bin/env python
#
# Replacement `MtimeFileWatcher` for App Engine SDK's dev_appserver.py,
# designed for OS X. Improves upon existing file watcher (under OS X) in
# numerous ways:
#
# - Uses FSEvents API to watch for changes instead of polling. This saves a
# dramatic amount of CPU, especially in projects with several modules.
# - Tries to be smarter about which modules reload when files change, only
# modified module should reload.
@zeekay
zeekay / lock.js
Last active August 29, 2015 14:04
// Lock async function until complete.
function lock(fn) {
return function() {
var args = Array.prototype.slice.call(arguments, 0);
var cb = args.pop() || function(){};
var that = this;
if (fn.locked)
return cb(new Error('locked!'))
### Keybase proof
I hereby claim:
* I am zeekay on github.
* I am zeekay (https://keybase.io/zeekay) on keybase.
* I have a public key whose fingerprint is 634D 585F 1B50 FCB2 288E A77C 9544 6586 5C50 FE9C
To claim this, I am signing this object:
@zeekay
zeekay / upstart.conf
Created June 30, 2014 15:38
Virtualenv + Upstart
description "Virtualenv-based python service"
author "Zach Kelling <zk@monoid.io>"
start on startup
respawn limit 10 90
script
chdir /var/apps/service
. bin/activate
@zeekay
zeekay / _managepy
Created May 19, 2014 22:32
Flask-script completions for zsh.
#compdef managepy
typeset -A opt_args
_arguments -C \
'1:cmds:->cmds' \
'2:subcmds:->subcmds' \
'*:: :->args' \
&& ret=0
@zeekay
zeekay / Solarized White.itermcolors
Created May 15, 2014 22:29
A less jaundiced Solarized Light.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.19370138645172119</real>
<key>Green Component</key>
<real>0.15575926005840302</real>