Skip to content

Instantly share code, notes, and snippets.

import time
from simpleflow import (
activity,
Workflow,
futures,
)
@activity.with_attributes(task_list='quickstart', version='example')
class recursive_dict(dict):
def __missing__(self, key):
self.__setitem__(key, recursive_dict())
return self.__getitem__(key)
h = recursive_dict()
h["a"]["b"]["c"]["d"]["e"]
# => {}
% pip list|grep oauth2client
oauth2client (1.5.1)
% python -c "import oauth2client; print oauth2client.__version__"
1.2
@jbbarth
jbbarth / gist:0f31e969e272ff396487
Last active September 11, 2015 09:47
Seriously, pip?
% pip freeze|grep ^cffi
cffi==1.0.0
% echo "import cffi; print cffi.__version__"|python
1.0.0
% pip install cffi==1.2.1
Collecting cffi==1.2.1
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Downloading cffi-1.2.1.tar.gz (335kB)
100% |################################| 335kB 717kB/s
#type "a", "b", "c", "Enter", "a", "TAB":
% crystal test.cr
> abc
you typed: abc
> a
autocompleting on: "a"
line_buffer is: "abc\n"
@jbbarth
jbbarth / test.txt
Created June 17, 2015 15:07
Big files truncate lines
1
12
123
1234
12345
123456
1234567
12345678
@jbbarth
jbbarth / alias.zsh
Created February 25, 2015 13:22
vii alias to run vi on the files of the previous ack/grep command (ZSH only)
alias vii='vi $(fc -e - ack="ack -l" grep="grep -l" -1)'

Keybase proof

I hereby claim:

  • I am jbbarth on github.
  • I am jbbarth (https://keybase.io/jbbarth) on keybase.
  • I have a public key whose fingerprint is BD29 4EA4 CD3E E72F 007F 37D6 08BC 6ECE D490 8BFD

To claim this, I am signing this object:

#!/bin/bash
DB=$(eval echo 'postgresql://docker:docker@$DB_PORT_5432_TCP_ADDR:$DB_PORT_5432_TCP_PORT/hamper')
echo DB=$DB /hamper/scripts/hamper
--- FAIL: TestBuild (6.08 seconds)
buildfile_test.go:365: Error VFS copying directory: exit status 1 (cp: writing '/tmp/docker-test23d0-newTestEngine-030417984/vfs/dir/82b326b380b55bce189c205f766eee6d5df537ff38181741d464047b3142ad01/lib/libssl.so.1.0.0': No space left on device
cp: failed to extend '/tmp/docker-test23d0-newTestEngine-030417984/vfs/dir/82b326b380b55bce189c205f766eee6d5df537ff38181741d464047b3142ad01/lib/libssl.so.1.0.0': No space left on device
cp: writing '/tmp/docker-test23d0-newTestEngine-030417984/vfs/dir/82b326b380b55bce189c205f766eee6d5df537ff38181741d464047b3142ad01/lib/libutil-2.13.so': No space left on device
cp: failed to extend '/tmp/docker-test23d0-newTestEngine-030417984/vfs/dir/82b326b380b55bce189c205f766eee6d5df537ff38181741d464047b3142ad01/lib/libutil-2.13.so': No space left on device
cp: writing '/tmp/docker-test23d0-newTestEngine-030417984/vfs/dir/82b326b380b55bce189c205f766eee6d5df537ff38181741d464047b3142ad01/lib/libnss_nis-2.13.so': No space left on device
cp: f