This file contains 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
# Change these to your libgeos paths! | |
GEOS_LIBRARY_PATH = '/opt/local/lib/libgeos_c.dylib' | |
GDAL_LIBRARY_PATH = '/opt/local/lib/libgdal.dylib' | |
GEOIP_LIBRARY_PATH = '/opt/local/lib/libGeoIP.dylib' | |
GEOIP_PATH = '/opt/local/share/GeoIP/' | |
# Disable compression if you need to debug JavaScript. You need to set both. | |
COMPRESS = False | |
ASSETS_DEBUG = True |
This file contains 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
for url in re.findall(r'(https?://\S+)', content): | |
# Ignore boring urls | |
if not url.startswith('http://www.youtube.'): | |
return |
This file contains 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
ALTER TABLE events ENGINE=INNODB; | |
ALTER TABLE invites ENGINE=INNODB; | |
ALTER TABLE media_urls ENGINE=INNODB; | |
ALTER TABLE membership ENGINE=INNODB; | |
ALTER TABLE migrate_version ENGINE=INNODB; | |
ALTER TABLE queue ENGINE=INNODB; | |
ALTER TABLE rooms ENGINE=INNODB; | |
ALTER TABLE users ENGINE=INNODB; |
This file contains 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 | |
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
import datetime | |
import htmllib | |
import urllib | |
import PyRSS2Gen | |
from BeautifulSoup import BeautifulSoup |
This file contains 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
// Copyright 2011 Google Inc. All Rights Reserved. | |
/* Swiffy runtime version 1.0 */ | |
var f = void 0, | |
h = null, | |
j = Object, | |
k = document, | |
l = Math, | |
m = Array, | |
aa = Error, | |
ba = parseInt, |
This file contains 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
<div><input id=input placeholder=you-chat-here /></div> | |
<div id=box></div> | |
<div id=pubnub pub-key=demo sub-key=demo></div> | |
<script src=http://cdn.pubnub.com/pubnub-3.1.min.js></script> |
This file contains 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
# A function which restarts the ssh-agent, saves the output to a file which can | |
# be sourced later, and adds the default ssh key. | |
sshenv=$HOME/.sshlocal | |
function init-ssh-agent() { | |
# Kill the agent if it's running. | |
if [ -n "$SSH_AGENT_PID" ]; then | |
echo "Killing existing agent $SSH_AGENT_PID..." | |
kill $SSH_AGENT_PID | |
fi | |
# Run the agent and add the key. |
This file contains 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
var m, j; | |
var l = jQuery("#search_filters"); | |
var c = jQuery("#search_body"); | |
var p = l.position().top; | |
var k = l.height(); | |
function n() { | |
var s = jQuery(window).scrollTop(); | |
var r = l.position().top; | |
if ((s >= p) && (k < j)) { |
This file contains 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
from django.conf import settings | |
from django_assets import Bundle, register | |
from webassets.filter import get_filter | |
def js(name, *args, **kwargs): | |
""" | |
Convenience helper for creating JavaScript bundles. | |
Given a `name`, this function registers a bundle named `name + | |
"_js"` with default filters. The output file will prefixed with |
This file contains 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
# We currently use webassets for asset bundling. Unfortunately it | |
# requires you to write lengthy tag definitions in HTML: | |
# | |
# {% load assets %} | |
# {% assets "foo_js", "bar_js" %} | |
# <script type="text/javascript" src="{{ ASSET_URL }}"></script> | |
# {% endassets %} | |
# | |
# This tag simplifes the above: | |
# |