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
| 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): |
| """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 |
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
| wget -O - https://raw.github.com/gist/1069010/python.sh | sh |
| #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> |
| #!/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 "$@" |