This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
#!/bin/bash | |
VENV=$1 | |
if [ -z $VENV ]; then | |
echo "usage: runinenv [virtualenv_path] CMDS" | |
exit 1 | |
fi | |
. ${VENV}/bin/activate | |
shift 1 | |
echo "Executing $@ in ${VENV}" | |
exec "$@" |
#include <ares.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/socket.h> | |
#include <arpa/inet.h> | |
#include <netinet/in.h> | |
#include <netdb.h> | |
#include <stdarg.h> | |
#include <string.h> | |
#include <ctype.h> |
wget -O - https://raw.github.com/gist/1069010/python.sh | sh |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
"""Simple TCP server for playing Tic-Tac-Toe game. | |
Use Player-to-Player game mode based on naming auth. | |
No thoughts about distribution or pub/sub mode | |
(for monitoring or something like this). Just | |
basic functionality. | |
""" | |
import time | |
import logging |
from time import sleep | |
from tornado import gen | |
import tornado.ioloop | |
import tornado.web | |
from tornado_threaded import threaded, inline_threaded | |
@threaded | |
def slow_func(callback): |
#!/usr/bin/tclsh8.5 | |
# | |
# Usage: unmerged branch1 branch2 | |
proc getlog branch { | |
lrange [split [exec git log $branch --oneline] "\n"] 0 100 | |
} | |
proc diff {title c1 c2} { | |
puts "\n$title" |
This article is now published on my website: Prefer Subshells for Context.
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer