I hereby claim:
- I am akheron on github.
- I am akheron (https://keybase.io/akheron) on keybase.
- I have a public key whose fingerprint is B5D6 953E 6D50 59ED 7ADA 0F2F D365 7D24 D058 434C
To claim this, I am signing this object:
==27246== Memcheck, a memory error detector | |
==27246== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al. | |
==27246== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info | |
==27246== Command: /usr/bin/Xorg :3 -auth /var/run/lightdm/root/:3 -nolisten tcp vt7 -novtswitch -verbose 10 | |
==27246== | |
X.Org X Server 1.11.3 | |
Release Date: 2011-12-16 | |
X Protocol Version 11, Revision 0 | |
Build Operating System: Linux 3.2.0-27-generic x86_64 Ubuntu |
==14106== Memcheck, a memory error detector | |
==14106== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al. | |
==14106== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info | |
==14106== Command: /usr/bin/Xorg :4 -auth /var/run/lightdm/root/:4 -nolisten tcp vt7 -novtswitch -core -verbose 10 | |
==14106== | |
X.Org X Server 1.11.3 | |
Release Date: 2011-12-16 | |
X Protocol Version 11, Revision 0 | |
Build Operating System: Linux 3.2.0-27-generic x86_64 Ubuntu |
#!/bin/sh | |
# | |
# Look up the public IP address of an Amazon EC2 instance via | |
# the Amazon API, and connect to it using ssh. | |
# Defaults | |
region=eu-west-1 | |
identity_file=~/amazon/identity.pem | |
username=ubuntu |
# If a directory contains a file named .venv, read its contents and activate | |
# the corresponding virtualenv. | |
venv_cd() { | |
local venv | |
if builtin cd "$@"; then | |
if [ -e .venv ]; then | |
venv=$(cat .venv) | |
if [ -z "$VIRTUAL_ENV" ]; then | |
workon "$venv" || true |
import pytest | |
import mock as mock_ | |
class Mock(object): | |
def __init__(self): | |
self._patchers = [] | |
def _stop(self): | |
for patcher in self._patchers: |
LOGGING = { | |
'version': 1, | |
'disable_existing_loggers': False, | |
} |
# From http://derblub.com/human-readable-and-by-size-sorted-disk-usage-in-bash | |
function duf { | |
du -sk "$@" | sort -n | while read size fname; do for unit in k M G T P E Z Y; do if [ $size -lt 1024 ]; then echo -e "${size}${unit}\t${fname}"; break; fi; size=$((size/1024)); done; done | |
} |
I hereby claim:
To claim this, I am signing this object:
# Automatically activate Git projects' virtual environments based on the | |
# directory name of the project. Virtual environment name can be overridden | |
# by placing a .venv file in the project root with a virtualenv name in it | |
function workon_cwd { | |
# Check that this is a Git repo | |
GIT_DIR=`git rev-parse --git-dir 2> /dev/null` | |
if [ $? == 0 ]; then | |
# Find the repo root and check for virtualenv name override | |
GIT_DIR=`\cd $GIT_DIR; pwd` | |
PROJECT_ROOT=`dirname "$GIT_DIR"` |
# Keybindings | |
unbind C-b | |
set -g prefix C-z | |
bind z send-prefix | |
bind escape copy-mode | |
bind C-z last-window | |
bind p select-pane -t :.-1 | |
bind n select-pane -t :.+1 |