Skip to content

Instantly share code, notes, and snippets.

View jjwatt's full-sized avatar

Jesse Wattenbarger jjwatt

  • North Augusta, SC
  • 21:59 (UTC -04:00)
View GitHub Profile
@jjwatt
jjwatt / suds_memcache.py
Created July 9, 2016 21:32
python suds on appengine using memcache
"""Overrides some stuff in suds to make suds play well with app engine.
For more info, see this blog post:
http://omiethenull.blogspot.in/2010/08/suds-and-appengine.html
"""
"""
Created on Aug 25, 2010
@author: jesse.j.wattenbarger@gmail.com (Jesse Wattenbarger)
"""
@jjwatt
jjwatt / coolquery.clj
Last active September 7, 2019 09:37
core.async database query fn
(ns
#^{:author "Jesse Wattenbarger"
:doc "pulled out of a production program for gist."}
coolquery.core
(:gen-class)
(:require [clojure.java.io :as io]
[clojure.core.async :as a :refer
[chan go go-loop close! <!! <! >! >!!]]
[jdbc.core :as jdbc] ;; good jdbc interop
))
@jjwatt
jjwatt / Vagrantfile
Last active August 29, 2015 13:56 — forked from erochest/Vagrantfile
# vi: set ft=ruby :
# -*- mode: ruby -*-
VAGRANTFILE_API_VERSION = "2"
BASE_URL="http://cloud-images.ubuntu.com/vagrant"
PRECISE32_URL="#{BASE_URL}/precise/current/precise-server-cloudimg-i386-vagrant-disk1.box"
PRECISE64_URL="#{BASE_URL}/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box"
QUANTAL32_URL="#{BASE_URL}/quantal/current/quantal-server-cloudimg-i386-vagrant-disk1.box"
QUANTAL64_URL="#{BASE_URL}/quantal/current/quantal-server-cloudimg-amd64-vagrant-disk1.box"
RARING32_URL="#{BASE_URL}/raring/current/raring-server-cloudimg-i386-vagrant-disk1.box"
RARING64_URL="#{BASE_URL}/raring/current/raring-server-cloudimg-amd64-vagrant-disk1.box"
@jjwatt
jjwatt / distros.rb
Created December 27, 2012 21:13
quick hack to make build-couchdb work with ruby 1.8 or whatever. I don't really know ruby, but rake kept failing about the Hash initialization, so I found some way to make it work and I think it's related to differences in ruby 1.8 and 1.9. So far the build seems to be working with this. This is build-couchdb/tasks/lib/distros.rb
# Distribution (platform) detection
def detect_distro
# OSX
if `uname`.chomp == 'Darwin'
os_release = %x[ sysctl -n kern.osrelease ].chomp
return [:osx, os_release]
end
# Solaris