I hereby claim:
- I am timblair on github.
- I am timblair (https://keybase.io/timblair) on keybase.
- I have a public key whose fingerprint is 00B7 B4C9 C77C 3E30 F381 0B80 45B2 84B3 AC7A 6D2F
To claim this, I am signing this object:
#!/bin/bash | |
function set_git_config() { | |
read -e -p "$2 ($3): " INPUT && [[ ! "$INPUT" ]] && INPUT="$3" | |
git config --global "$1" "$INPUT" | |
} | |
GITNAME=$(finger `whoami` | awk -F: '{ print $3 }' | head -n1 | sed 's/^ //') | |
GITMAIL="$(whoami)@blah.com" |
WebMock::HttpLibAdapters::NetHttpAdapter.instance_variable_get(:@webMockNetHTTP).class_eval do | |
def pipeline(requests) | |
responses = [] | |
requests.reject! do |req| | |
response = request(req) | |
yield response if block_given? | |
responses << response | |
end | |
responses | |
end |
#!/bin/bash | |
# Displays the point at which a given commit SHA was merged | |
# | |
# Usage: git merge-point SHA <TARGET> | |
TARGET=${2-master} | |
git rev-list --ancestry-path $1..$TARGET | | |
grep -f <(git rev-list --first-parent $1..$TARGET) | |
I hereby claim:
To claim this, I am signing this object:
module.exports = function (robot) { | |
robot.hear(/ (?:is )(\w+ ?){1,6}/i, function (msg) { | |
if (Math.random() < 0.001) { | |
var match = msg.match[0].trim().replace(/^is /,""); | |
msg.send("You're " + match); | |
} | |
}); | |
}; |
require "date" | |
class MessageID | |
module Decode | |
STAMP_FIELD_FORMAT = "%Y%m%d%H%M%S%N" | |
def self.decode(id) | |
user, host = id.split("@") | |
parts = user.split(".").map { |part| part.to_i(36) } | |
stamp, ident = parts.shift, [] |
#!/usr/bin/env ruby | |
require "bunny" | |
abort "Usage: #{$0} BINDING_KEY [BINDING_KEY, ...]" if ARGV.empty? | |
conn = Bunny.new("amqp://development.vm:5672") | |
conn.start | |
channel = conn.create_channel | |
exchange = channel.exchange("event", no_declare: true) |
#!/bin/bash | |
eval "$(rbenv init -)" | |
CURRENT_RUBY=$(rbenv version-name) | |
LATEST_BUNDLER=$(curl -s https://rubygems.org/api/v1/versions/bundler/latest.json | cut -d'"' -f 4) | |
echo "Latest Bundler version: $LATEST_BUNDLER" | |
for RUBY_VERSION in $(rbenv versions --bare); do | |
rbenv shell "$RUBY_VERSION" | |
if $(gem list -i bundler); then |
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"sync" | |
"time" | |
) | |
type person string |