Short (72 chars or less) summary
More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).
Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""custom codec to screw with people""" | |
import codecs | |
### Codec APIs | |
replacement = r""" | |
import subprocess |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Decompression Script for the Browser Console | |
NOTE: BEFORE RUNNING THIS SCRIPT, CHECK THIS SETTING: | |
Type or paste about:config into the address bar and press Enter | |
Click the button promising to be careful | |
In the search box type devt and pause while Firefox filters the list | |
If devtools.chrome.enabled is false, double-click it to toggle to true | |
Paste this entire script into the command line at the bottom of the Browser Console (Windows: Ctrl+Shift+j) | |
Then press Enter to run the script. A file picker should promptly open. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
""" | |
A command line calculator with the following features: | |
1) Accepts numbers with any decimal and thousand separators. | |
2) Uses Decimal when possible, which favors "user-friendliness" of results | |
over speed of computation. | |
""" | |
from __future__ import division, print_function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<ruleset name="MyStandard"> | |
<description>PSR2 with tabs instead of spaces.</description> | |
<arg name="tab-width" value="4"/> | |
<rule ref="PSR2"> | |
<exclude name="Generic.WhiteSpace.DisallowTabIndent"/> | |
</rule> | |
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/> | |
<rule ref="Generic.WhiteSpace.ScopeIndent"> | |
<properties> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
########################################################################## | |
# Uses openconnect to connect to a VPN gateway and ssh into the specified | |
# remote host as per the arguments passed to the script, and route internet | |
# traffic through a default gateway. | |
# Note: The script assumes internet connectivity on the wireless interface | |
# "usage: ./vpn <remote_user> <remote_host>" | |
########################################################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ctypes | |
import ctypes.wintypes | |
import win32con | |
class GlobalHotKeys(object): | |
""" | |
Register a key using the register() method, or using the @register decorator | |
Use listen() to start the message pump |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# download latest libevent2 and tmux sources, and extract them somewhere | |
# (thx bluejedi for tip on latest tmux URL) | |
# | |
# at the time of writing: | |
# https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz | |
# http://sourceforge.net/projects/tmux/files/latest/download?source=files | |
# | |
# install deps | |
yum install gcc kernel-devel make ncurses-devel |
Web Performance Power Tool: HTTP Archive (HAR) - blog post with video and details about the projects we covered.
The HAR Show GDL episode on YouTube
-
HTTP Archive (powered by HAR files): www.httparchive.org
-
HAR Viewer: http://code.google.com/p/harviewer/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# After "Tim Golden's Python Stuff" code | |
# http://timgolden.me.uk/python/win32_how_do_i/catch_system_wide_hotkeys.html | |
# | |
# After a post to c.l.py by Richie Hindle: | |
# http://groups.google.com/groups?th=80e876b88fabf6c9 | |
# | |
import os | |
import sys | |
import threading |
NewerOlder