Skip to content

Instantly share code, notes, and snippets.

View toastdriven's full-sized avatar

Daniel Lindsley toastdriven

View GitHub Profile

In Memory of Malcolm

Last night, I received the news that Malcolm Tredinnick had passed away. I was at the hotel bar, concluding the first night of sprints at PyCon 2013. It took everything I had not to spontaneously start crying on the spot.

Malcolm was a friend, a mentor, a valued community mentor, a leader and a wonderful human being. He gave freely of himself to so very many people & causes. He made himself available to others, even when he was so busy he could

# From http://www.thinkwithportals.com/comic/#9
bin_file = open('aperture_bin.txt')
for line in bin_file.readlines():
chars = line.split(' ')
for char_bin in chars:
print(chr(int(char_bin, 2)))
import json
from itty import get, run_itty, Response
@get('/')
def index(request):
page = open('autocomplete_test.html').read()
return page
@get('/search/autocomplete/')
def autocomplete(request):
{% comment %}
This goes in ``templates/search/indexes/<appname_in_lowercase>/<modelname_in_lowercase>_autocomplete_data.txt``
with appropriate substitutions.
Also, remove this comment.
{% endcomment %}
{{ object.email }}
{{ object.url }}
@toastdriven
toastdriven / requiredreading.txt
Created December 5, 2012 20:59 — forked from adamfast/requiredreading.txt
Preserved for #lawrence history, this was the "required reading" list of totally-non-work-related inside jokes of the World Online crew.
DJ Ango, yo!
http://railsenvy.com/2007/9/10/ruby-on-rails-vs-django-commercial-7
The Whistles
[now broken] http://www.youtube.com/watch?v=ccgXjA2BLEY
http://www.youtube.com/watch?gl=US&hl=en&client=mv-google&v=Nnzw_i4YmKk
Do it live!
http://www.youtube.com/watch?v=2tJjNVVwRCY
REMIX: http://www.youtube.com/watch?v=5j2YDq6FkVE&NR=1
class TheTestResource(ModelResource):
class Meta:
object_class = Note
filtering = {
'name': ALL,
}
ttr = TheTestResource()
self.assertEqual(ttr.build_filters(), {...})
[global]
index-url = http://simple.crate.io/
DEBUG = TEMPLATE_DEBUG = True
DATABASES['default']['USER'] = 'daniel'
# ...etc...
<html>
<head>
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$.ajax({
url: '/api/v1/sessionusers/',
contentType: 'application/json',
beforeSend: function(jqXHR, settings) {
from tastypie import fields
from tastypie.resources import ModelResource
from myapp.models import CrazyModel
class CrazyModelResource(ModelResource):
class Meta:
queryset = CrazyModel.objects.all()
def obj_update(self, bundle, request=None, skip_errors=False, **kwargs):