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
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>{{account.twitter_screen_name}} | upgrouper</title> | |
| <link rel="stylesheet" type="text/css" href="{{cssurl}}"> | |
| <script src="{{jsurl}}"></script> | |
| </head> | |
| <body> | |
| <h1>@{{account.twitter_screen_name}}</h1> |
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
| var express = require('express'); | |
| var sys = require('sys'); | |
| var oauth = require('oauth'); | |
| var app = express.createServer(); | |
| var _twitterConsumerKey = "YOURTWITTERCONSUMERKEY"; | |
| var _twitterConsumerSecret = "YOURTWITTERCONSUMERSECRET"; | |
| function consumer() { |
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
| # originally from https://github.com/martinrusev/django-redis-sessions | |
| # but use json, not pickle | |
| import json | |
| import pickle | |
| import time | |
| from redis import Redis | |
| from django.utils.encoding import force_unicode | |
| from django.contrib.sessions.backends.base import SessionBase, CreateError | |
| from django.conf import settings |
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 | |
| def convert_mph(match): | |
| try: | |
| mph = int(match.group(0).split(' ')[0]) | |
| kph = mph*1.6 | |
| #return "%.1f kph" % (kph,) | |
| return "%s kph" % (int(round(kph)),) | |
| except: | |
| return match.group(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
| <!doctype html> | |
| <head> | |
| <title>Grid and baseline background image test</title> | |
| <style type="text/css"> | |
| html, body { | |
| height: 100%; | |
| margin: 0; | |
| padding: 0; | |
| } | |
| body { |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>placehold.js</title> | |
| <script> | |
| /* | |
| Dynamically create a canvas to be used as an image placeholder. | |
| If you really want an <img>, you can use: | |
| var dataURL = canvas.toDataURL("image/png"); |
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
| Person A: Can you imagine, Person B, what it must be like to argue for race based admissions policy? | |
| Person A: To live in endless screaming pain for months on end? No you cannot. | |
| Person B: hold, what you do is wrong! | |
| Person A: You have not asked properly. | |
| Person A: If you do not ask properly, we will not discuss this matter. | |
| Person A: Instead, we use the race card. | |
| Person A: oh wait | |
| Person A: you DID ask properly | |
| Person A: We will explain to you about the Nationalists and the British Colonialists | |
| Person A: the PAC, our only friends... whom we exterminated |
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
| /* | |
| Run this, connect to | |
| http://localhost:3000/check/image?url=http://dl.dropbox.com/u/1167202/IMAG0193.jpg | |
| That image is just under 2Mb. I tell the request to disconnect immediately (see | |
| the maxSize = 0 hack inside identifyImageURL()) and all the data keeps arriving | |
| bit by bit until the entire file is downloaded. | |
| (This is perhaps more obvious on my slow South African line, but you can see | |
| the byte totals coming in and it trying to call destroy again and again in the |
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
| var | |
| express = require('express'), | |
| gm = require('gm'), | |
| http = require('http'), | |
| request = require('request'), | |
| urlmod = require('url'), | |
| app = express.createServer(); | |
| app.use(express.logger('tiny')); | |
| app.use(express.errorHandler({ |
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
| var | |
| express = require('express'), | |
| gm = require('gm'), | |
| http = require('http'), | |
| request = require('request'), | |
| urlmod = require('url'), | |
| app = express.createServer(); | |
| app.use(express.logger('tiny')); | |
| app.use(express.errorHandler({ |