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 |
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 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
// You don't want to serve HTTPS supporting for SSL3.0 any longer, see: | |
// http://googleonlinesecurity.blogspot.de/2014/10/this-poodle-bites-exploiting-ssl-30.html | |
import ( | |
"crypto/tls" | |
"net/http" | |
) | |
// This code supports SSL3.0, TLS1.0, TLS1.1 and TLS1.2 | |
// Chances are you currently do this but want to stop due to the POODLE | |
err := http.ListenAndServeTLS(addr, "crtfile", "keyfile", handler) |
"""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 |
#!/usr/bin/env python2 | |
"""Delete tweets older than X days. | |
Usage: | |
rmtweets.py [at_least_days_old (default=365)] | |
""" | |
# Twitter gives access to only the last 3200 tweets, but if you delete | |
# more recent tweets, then after some time (a week? a month?) the |
import asyncio | |
import pycurl | |
import selectors | |
MULTI = pycurl.CurlMulti() | |
SELECTOR = selectors.DefaultSelector() | |
LOOP = asyncio.get_event_loop() | |
TIMER = None |
# Notes for installing on Samsung Series 9 | |
# UEFI boot: LVM on LUKS | |
# | |
# See the full blog post: | |
# http://jasonwryan.com/blog/2013/01/25/uefi/ | |
# check you are booted in uefi | |
modprobe efivars | |
ls /sys/firmware/efi/vars |