brian wickman - @wickman
[TOC]
Pants makes the manipulation and distribution of hermetically sealed Python environments
#!/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 |
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 |
#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: |
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
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
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 |
#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 * |
#!/usr/bin/env python2 | |
""" | |
Author: takeshix <[email protected]> | |
PoC code for CVE-2014-0160. Original PoC by Jared Stafford ([email protected]). | |
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP. | |
""" | |
import sys,struct,socket | |
from argparse import ArgumentParser |
This page is no longer maintained, go to https://help.vivaldi.com/article/html5-proprietary-media-on-linux/ for help