Skip to content

Instantly share code, notes, and snippets.

View tychoish's full-sized avatar

Sam Kleinman tychoish

View GitHub Profile
git log --simplify-by-decoration --decorate --pretty="{\"hash\": \"%H\", "date": \"%cI\", \"tag\": \"%D\"}" -- "ref/tags/" | grep -e "tag: r" | grep -v -e "[0-9], " | grep -v "_" | sed 's/ "tag": "tag: / "tag": "/' | sed -r 's/T.*",/",/'
import subprocess
import os.path
from fabric.api import local, puts, cd
def _get_dirname(name):
return os.path.join(os.path.expanduser("~/abs"), name)
def git_package(name):
local("git clone https://aur.archlinux.org/{0}.git".format(name))
>>> def bad_idea(value, arg=[]):
... arg.append(value)
... print(arg)
... if value % 2 == 0:
... return True
... else:
... return False
...
>>> bad_idea(1)
[1]
ssh-reagent () {
for agent in /tmp/ssh-*/agent.*; do
export SSH_AUTH_SOCK=$agent
if ssh-add -l 2>&1 > /dev/null; then
echo Found working SSH Agent:
ssh-add -l
return
fi
done
echo Cannot find ssh agent - maybe you should reconnect and forward it?
Host ssh1.vpc1.build.10gen.cc
User tychoish
IdentityFile ~/.ssh/id_rsa
Host !ssh1.vpc3.10gen.cc *.vpc3.10gen.cc
ProxyCommand ssh -aq ssh1.vpc3.10gen.cc nc %h %p
ForwardAgent yes
Host !ssh1.perf.ny.cbi.10gen.cc *.perf.ny.cbi.10gen.cc
ProxyCommand ssh -aq ssh1.perf.ny.cbi.10gen.cc nc %h %p
ForwardAgent yes
gcam () {
git commit --amend -m "$*"
}
gcaam () {
git commit -a --amend -m "$*"
}
gc () {
git commit -m "$*"
}
import subprocess
import logging
import collections
import distutils.spawn
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger('mci-packer-test')
TestCase = collections.namedtuple("TestCase", ['name', 'callable', 'args', 'flunk'])
# Add a TestCase() object (a collections.namedtuple) to the cases list. The name
source/drivers/node-js.txt:52: ERROR: Error parsing content block for the "list-table" directive: uniform two-level bullet list expected, but row 2 does not contain the same number of items as row 1 (5 vs 8).
.. list-table::
:header-rows: 1
:class: compatibility
* -
-
- MongoDB Version
- 2.4
- 2.6
- 3.0
Sam:
Yesterday/Done:
- Final touches of toc-spec converter and new toc format
- work on fsync+lock behavior
Today/Todo:
- Conversion to toc-spec
- merging pull reuqests.
- Faux holiday