Skip to content

Instantly share code, notes, and snippets.

View jlsandell's full-sized avatar

Jeremy Sandell jlsandell

View GitHub Profile
@jlsandell
jlsandell / bacon_ipsum.py
Created June 10, 2011 15:45
Baconified Lorem Ipsum
from random import sample, randint, choice
MORSELS = ('pork', 'hamburger', 'sirloin', 'fatback', 'bacon', 'shankle',
'tenderloin', 'pig', 'ribeye', 'loin', 'strip', 'chicken',
'meatloaf', 'hock', 'ground', 'turkey', 'chop', 'sausage',
'jowl', 'ham', 'beef', 'tip', 'pancetta', 'tail', 'venison',
'belly', 'rump', 'drumstick', 'jerky', 'ball', 'pastrami',
'shank', 'tritip', 'flank', 'salami', 't-bone', 'spare',
'bresaola', 'corned', 'tongue', 'shoulder', 'short', 'cow',
'ribs', 'chuck', 'biltong', 'swine', 'meatball', 'steak',
@jlsandell
jlsandell / error.out
Created February 3, 2011 20:34
Error when compiling Beastie with g++
voyvf@devbook:~/Desktop/repos/git/beastie$ make > error.out 2>&1
==== Building beastie_example ====
mkdir -p obj/debug
g++ -MMD -D "DEBUG" -D "_DEBUG" -g `pkg-config OGRE --cflags``pkg-config OIS --cflags` -O0 -Wall -o "obj/debug/beastie.example.o" -c "beastie.example.cpp"
In file included from beastie.example.cpp:5:
beastie.h: In static member function ‘static bool beastie::its_a_secret::intersections_t< <template-parameter-1-1> >::line(const beastie::line&, const beastie::plane&, Ogre::Vector3&)’:
beastie.h:392: error: invalid use of incomplete type ‘const struct beastie::its_a_secret::plane_t<void>’
beastie.h:279: error: declaration of ‘const struct beastie::its_a_secret::plane_t<void>’
beastie.h:392: error: invalid use of incomplete type ‘const struct beastie::its_a_secret::line_t<void>’
@jlsandell
jlsandell / get_latlon.py
Created January 25, 2011 16:33
Gets lat/lon values from city, state, and optional zipcode.
from urllib import urlencode
from urllib2 import Request, urlopen
from django.utils.simplejson import loads
__all__ = ('get_latlon',)
NOMINATIM_URL = 'http://open.mapquestapi.com/nominatim/v1/search.php'
def get_latlon(city, state, zipcode=None):
"""Takes a city and state as parameters, with optional zipcode, queries
(env)jeremy@atom:~/web/dev/env/src/actstream/actstream$ git diff urls.py
diff --git a/actstream/urls.py b/actstream/urls.py
index 131ed6e..95f475f 100644
--- a/actstream/urls.py
+++ b/actstream/urls.py
@@ -4,12 +4,12 @@ from actstream.feeds import *
urlpatterns = patterns('actstream.views',
# Syndication Feeds
- url(r'^feed/(?P<content_type_id>\d+)/(?P<object_id>\d+)/atom/$', AtomObjectActivityFeed(), name='actstream_object_feed_atom'),