Text Command New Text
--------------- ------- -----------
'Hello W|orld' ds' Hello World
(12|3+4*56)/2 ds( 123+4*56/2
<div>fo|o</div> dst foo
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 | |
import web | |
from openid.consumer.consumer import * | |
# Store OpenID session variables in memory | |
store = openid.store.memstore.MemoryStore() | |
# Get this from the Clickpass website | |
clickpass_site_key = YOUR_SITE_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
import os | |
import sys | |
sys.stdout = sys.stderr | |
PATH = os.path.dirname(os.path.abspath(__file__)) | |
sys.path.append(os.path.abspath(os.path.join(PATH, '..'))) | |
os.environ['PYTHON_EGG_CACHE'] = '/usr/local/django/python-eggs' | |
os.environ['DJANGO_SETTINGS_MODULE'] = 'myproject.settings' |
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
dan@jamaica cnn $ python2.6 manage.py test | |
Traceback (most recent call last): | |
File "manage.py", line 20, in <module> | |
execute_from_command_line() | |
File "/Library/Python/2.6/site-packages/django/core/management/__init__.py", line 429, in execute_from_command_line | |
utility.execute() | |
File "/Library/Python/2.6/site-packages/django/core/management/__init__.py", line 379, in execute | |
self.fetch_command(subcommand).run_from_argv(self.argv) | |
File "/Library/Python/2.6/site-packages/django/core/management/base.py", line 196, in run_from_argv | |
self.execute(*args, **options.__dict__) |
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
def search(n, l): | |
H = len(l) - 1 | |
L = 0 | |
M = int(H / 2) | |
while H - L > 1 and n != l[M]: | |
if n > l[M]: | |
L = M | |
else: | |
H = M |
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 | |
import tornado.httpserver | |
import tornado.ioloop | |
import tornado.web | |
from tornado import websocket | |
import os | |
class EchoWebSocket(websocket.WebSocketHandler): | |
def open(self): |
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
GLEW_INCLUDE = /opt/local/include | |
GLEW_LIB = /opt/local/lib | |
pong: pong.o | |
gcc -o pong $^ -framework GLUT -framework OpenGL -L$(GLEW_LIB) -lGLEW | |
.c.o: | |
gcc -c -o $@ $< -I$(GLEW_INCLUDE) | |
clean: |
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 | |
# | |
# Jamie Kirkpatrick, November 2009. <jkp@kirkconsulting.co.uk> | |
# Released under the BSD license. | |
# | |
""" | |
Experimental code to add asyncronous functionality to WSGI applications | |
running under the Tornado webserver. Uses greenlet to spin micro-threads | |
which can be suspended and resumed within a single thread as required. |
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
http://github.com/mxcl/homebrew/blob/master/Library/Formula/wine.rb#L44 | |
==> Environment | |
HOMEBREW_VERSION: 0.7 | |
HEAD: ad09e7fefb79831657e13572cc3a58fc6d2ab8ec | |
HOMEBREW_PREFIX: /usr/local | |
HOMEBREW_CELLAR: /usr/local/Cellar | |
HOMEBREW_REPOSITORY: /usr/local | |
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew | |
Hardware: 8-core 64-bit nehalem |
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
Engineering: | |
Some people | |
Human Interface Design: | |
Some other people | |
Testing: | |
Hopefully not nobody | |
Documentation: |