Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
@tszming
tszming / fix_cloudfront.py
Created December 9, 2012 13:48
Updating caching headers for Amazon S3 and CloudFront
#!/usr/bin/env python
"""
fix_s3_cache_headers
~~~~~~~~
Updates S3 objects with new cache-control headers.
Usage::
python fix_cloudfront.py <bucket_name> <keys>*
@tszming
tszming / .hgrc
Created October 22, 2011 04:22
My .hgrc
[ui]
username = Tsz Ming WONG <tszming@gmail.com>
[hooks]
changegroup = hg update >&2
@tszming
tszming / .gitconfig
Created April 27, 2011 09:47
My .gitconfig
[user]
name = Tsz Ming WONG
email = tszming@gmail.com
[receive]
denyCurrentBranch = warn
[color]
diff = auto
status = auto
@tszming
tszming / objc.cfg
Created April 25, 2011 18:39
My uncrustify config file for objective-c
#
# uncrustify config file for objective-c and objective-c++
#
indent_with_tabs = 0 # 1=indent to level only, 2=indent with tabs
output_tab_size = 4 # new tab size
indent_columns = output_tab_size
indent_label = 2 # pos: absolute col, neg: relative column
indent_align_assign = FALSE