This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| from django.conf import settings | |
| from django.core.management.base import NoArgsCommand | |
| from django.template.loader import render_to_string | |
| from prey.models import State | |
| class Command(NoArgsCommand): | |
| """command for creating templated tilemill projects""" | |
| def handle_noargs(self, *args, **kwargs): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jQuery(document).ready(function() { | |
| var triggers_in_viewport = []; | |
| checkTriggers(); | |
| $(window).scroll(function(event) { | |
| checkTriggers(); | |
| }); | |
| $('aside h3 a').click(function(event) { | |
| showAside($(this).attr('href')); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import sys, tty, termios | |
| fd = sys.stdin.fileno() | |
| old_settings = termios.tcgetattr(fd) | |
| try: | |
| filename = sys.argv[1] | |
| f = open(filename, 'r') | |
| text = f.read() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @sans:"Droid Sans Book","Liberation Sans Regular","Arial Regular","DejaVu Sans Book"; | |
| @sans_bold:"Droid Sans Bold","Liberation Sans Bold","Arial Bold","DejaVu Sans Bold"; | |
| Map { | |
| } | |
| #world { | |
| polygon-fill: #363636; | |
| line-color: #ccc; | |
| line-width: 0.5; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import sys | |
| import curses.ascii | |
| import pickle | |
| import pprint | |
| import re | |
| from optparse import OptionParser | |
| class Page(object): | |
| """a page of contributions""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| from textwrap import TextWrapper | |
| import re | |
| import tweepy | |
| import urllib, urllib2 | |
| swap_list = ["sausage", "house", "banana", "car", "computer"] | |
| swap_list_re = '|'.join(swap_list) | |
| swap_re = re.compile('(%s)' % swap_list_re, re.I) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).ready(function() { | |
| var slider = null; | |
| var sliderUl = null; | |
| $('div.sliding').each(function() { | |
| sliderUl = $('ul', this); | |
| var productWidth = sliderUl.innerWidth() - $(this).outerWidth(); | |
| slider = $('#slider').slider({ | |
| animate: false, | |
| min: 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def json_callback(view_func): | |
| """if the GET parameter callback is set, wrap response in a function with that name""" | |
| def _decorator(request, *args, **kwargs): | |
| try: | |
| # check for callback, if it's there, modify the return | |
| callback = request.GET.__getitem__('callback') | |
| response = view_func(request, *args, **kwargs) | |
| response.content = callback + '(%s);' % response.content | |
| return response | |
| except KeyError, e: |
NewerOlder