Skip to content

Instantly share code, notes, and snippets.

Tim Cuthbertson timbertson

View GitHub Profile
set -eu
touch "$output"
function cleanup () {
rm -f "$output"

Keybase proof

I hereby claim:

  • I am timbertson on github.
  • I am timbertson ( on keybase.
  • I have a public key ASBZEynVWhSTESrt8NYWYp7riPZXVkCWhsWQCXg6ktnZSAo

To claim this, I am signing this object:

#!/usr/bin/env bash
# usage:
# bash <(curl -sS
# source $HOME/.nix-profile/etc/profile.d/
_() {
set -eu
if [ ! -e /nix ]; then
if [ "${CI:-null}" != "true" ]; then
View etcd-ca-disable-p224.patch
diff --git a/pkcs10.go b/pkcs10.go
index a257e20..6550702 100644
--- a/pkcs10.go
+++ b/pkcs10.go
@@ -169,9 +169,9 @@ func CreateCertificateSigningRequest(rand io.Reader, template *CertificateSignin
publicKeyAlgorithm.Algorithm = oidPublicKeyRSA
case *ecdsa.PrivateKey:
switch priv.Curve {
- case elliptic.P224(), elliptic.P256():
- hashFunc = crypto.SHA256
View makeDomNode.js
var makeDomNode = (function() {
/* convert an arbitrary HTML string -> dom node.
* This function adapted from JQuery code (src/manipulation.js),
* which is distributed under the MIT licence, and is
* Copyright 2013 jQuery Foundation and other contributors
var rtagName = /<([\w:]+)/;
var wrapMap = {
// Support: IE 9
timbertson / python-distribute.xml
Created Mar 17, 2012
python-distribute 0install feed
View python-distribute.xml
<?xml version="1.0"?>
<?xml-stylesheet type='text/xsl' href='interface.xsl'?>
<interface xmlns="" xmlns:compile="" uri="">
<summary>python packaging tool</summary>
<publish xmlns="" mode="third-party"/>
python packaging tool, a fork of setuptools</description>
<package-implementation package="python-distribute"/>
timbertson / rake.log
Created Feb 19, 2012
build-couchdb issue #25 info
View rake.log
This file has been truncated, but you can view the full file.
STDOUT Build CouchDB commit: 106ba9ded5ae939fe03d806d302c664ae7499466
STDERR mkdir -p /home/tim/dev/web/couchdb/build-couchdb/head/build/bin
STDERR /home/tim/dev/web/couchdb/build-couchdb/head/dependencies/autoconf-2.59/configure --prefix=/home/tim/dev/web/couchdb/build-couchdb/head/build --program-suffix=2.59
STDOUT checking for a BSD-compatible install... /usr/bin/install -c
STDOUT checking whether build environment is sane... yes
STDOUT checking for gawk... gawk
STDOUT checking whether make sets $(MAKE)... yes
STDOUT checking for expr... /usr/bin/expr
STDOUT checking for gm4... no
timbertson /
Created Jan 26, 2011
This is just a quick hack, I hope to make it a proper library soon.
import unittest
class StepCollection(object):
def __setattr__(self, attr, val):
if hasattr(self, attr):
raise RuntimeError("step %s is already declared!" % (attr,))
return super(StepCollection, self).__setattr__(attr, val)
class Object(object): pass
class World(unittest.TestCase):
def __init__(self):
View gist:763397
diff --git a/src/watchdog/observers/ b/src/watchdog/observers/
index 4ea8004..ac6136f 100644
--- a/src/watchdog/observers/
+++ b/src/watchdog/observers/
@@ -688,6 +688,7 @@ if platform.is_linux():
EventEmitter.__init__(self, event_queue, watch, timeout)
self._lock = threading.Lock()
self._inotify = Inotify(watch.path, watch.is_recursive)
+ self._moved_from_events = dict()
View rspec_immediate_feedback_formatter.rb
require 'spec/runner/formatter/specdoc_formatter'
#monkey-patch the specdoc formatter to immediately print failure messages (and continue)
module Spec
module Runner
module Formatter
class SpecdocFormatter
alias :example_failed_without_immediate_feedback :example_failed
def example_failed(example, counter, failure)
example_failed_without_immediate_feedback(example, counter, failure)
You can’t perform that action at this time.