Skip to content

Instantly share code, notes, and snippets.

View jacobb's full-sized avatar

Jacob Burch-Hill jacobb

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jacobb on github.
  • I am jacob (https://keybase.io/jacob) on keybase.
  • I have a public key whose fingerprint is B120 09B3 F492 51D3 822F CEE0 2E21 B472 EACF 55F1

To claim this, I am signing this object:

@jacobb
jacobb / mtggbpycon.rst
Last active August 29, 2015 13:59
Magic the Gathering and Game Boy Pycon 2014 Meetup

Love to play Magic? Heard of it, but never learned how to play?

Own a Gameboy, or want to check out someone else's 3DS? Want to exchange Streetpasses, trade Pokemon?

Come to the MTG+Gameboy Open Space!

Sunday, April 13th at 4:00pm in 525 in Hall Viger.

MTG

1234
# internal publish endpoint (keep it private / protected)
location /publish {
set $push_channel_id $arg_id; #/?id=239aff3 or somesuch
push_publisher;
push_store_messages on; # enable message queueing
push_message_timeout 2h; # expire buffered messages after 2 hours
push_max_message_buffer_length 10; # store 10 messages
push_min_message_recipients 0; # minimum recipients before purge
}
@jacobb
jacobb / memcache.py
Created June 20, 2010 22:10 — forked from noahsilas/gist:446050
memcache_normal.py
"Memcached cache backend"
import time
from django.conf import settings
from django.core.cache.backends.base import BaseCache, InvalidCacheBackendError
from django.utils.encoding import smart_unicode, smart_str
class CacheClass(BaseCache):
def __init__(self, server, params):
@jacobb
jacobb / gist:749396
Created December 21, 2010 02:26
settings used to test pylibmc support in django
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3'
},
'other': {
'ENGINE': 'django.db.backends.sqlite3',
'TEST_NAME': 'other_db'
}
}
@jacobb
jacobb / private.xml
Created January 16, 2012 21:37
KeyRemap private.xml example
<?xml version="1.0"?>
<root>
<list>
<item>
<name>Swap Space and Tab</name>
<identifier>private.swap_space_and_tab</identifier>
<autogen>--KeyToKey-- KeyCode::SPACE, KeyCode::TAB</autogen>
<autogen>--KeyToKey-- KeyCode::TAB, KeyCode::SPACE</autogen>
</item>
<item>
# ~/.pypirc
find_links = http://localhost/pypi/
@jacobb
jacobb / photo.py
Created June 17, 2012 00:37 — forked from mvattuone/photo.py
Photo Upload - MV
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.views.decorators.csrf import csrf_exempt
from django.http import HttpResponse
from django.core.files.storage import default_storage
from django.core.files.base import ContentFile
from django.conf import settings
from django.shortcuts import render
import json
import md5
/*
SublimeLinter default settings
*/
{
/*
Sets the mode in which SublimeLinter runs:
true - Linting occurs in the background as you type (the default).
false - Linting only occurs when you initiate it.
"load-save" - Linting occurs only when a file is loaded and saved.