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 page = require('webpage').create(); | |
// Block fonts | |
var abort_content_types = [ | |
"application/x-font-woff", | |
"font/woff", | |
"font/opentype", | |
]; | |
// Default user agent won't work with TypeKit |
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 page = require('webpage').create(); | |
// Block fonts | |
var abort_content_types = [ | |
"application/x-font-woff", | |
"font/woff", | |
"font/opentype", | |
]; | |
// Default user agent won't work with TypeKit |
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
SubtlePatterns Bookmarklet is a quick and easy way to see patterns from http://subtlepatterns.com on your site. | |
Drag this link <a href="javascript:(function()%7Bvar%20newscript%3Ddocument.createElement(%27script%27)%3Bnewscript.type%3D%27text/javascript%27%3Bnewscript.async%3Dtrue%3Bnewscript.src%3D%27https://raw.github.com/bradjasper/subtle-patterns-bookmarklet/master/bookmarklet.js%3Fcb%3D%27%20%2B%20Math.random()%3B(document.getElementsByTagName(%27head%27)%5B0%5D%7C%7Cdocument.getElementsByTagName(%27body%27)%5B0%5D).appendChild(newscript)%3B%7D)()%3B">Subtle Patterns Bookmarklet</a> to your bookmarks bar, and click it to activate on any site you want to change backgrounds on. | |
Press left and right to move between patterns. The current pattern is displayed in the lower left corner of the browser. | |
Similar projects: | |
http://raphaeleidus.com/2011/06/29/background-patterns-bookmarklet |
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
if __name__ == "__main__": | |
doIt(); |
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
# Usage: show <local-port> <subdomain> | |
function show() { | |
DOMAIN=".tekacs.com" | |
REMOTE="$2$DOMAIN" | |
ssh -tR 1080:127.0.0.1:$1 vps "sudo ssh -Nl \$USER -L $REMOTE:80:127.0.0.1:1080 localhost" | |
} |
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
# Example of adapting Mixpanel task to work with Celery | |
import base64 | |
import simplejson | |
import urllib2 | |
def track(event, properties=None): | |
""" | |
A simple function for asynchronously logging to the mixpanel.com API. | |
@param event: The overall event/category you would like to log this data under |
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
# This isn't perfect for high traffic sites, if you need something more production ready | |
# please tell us or stay tuned as we will open it up shortly. | |
import subprocess | |
import base64 | |
import simplejson | |
def track(event, properties=None): | |
""" | |
A simple function for asynchronously logging to the mixpanel.com API. |
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
@import blueprint/reset.sass | |
@import partials/base.sass | |
@import blueprint | |
@import blueprint/modules/scaffolding.sass | |
@import compass/utilities.sass | |
+blueprint-typography("body.bp") | |
+blueprint-scaffolding("body.bp") |
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 mixpanel.tasks import TrackEvent | |
# Inside a view | |
def my_view(request): | |
TrackEvent.delay("search_view", { | |
"ip": request.META['REMOTE_ADDR'], | |
"distinct_id": session_id, | |
"time": time.time()}) |
NewerOlder