Skip to content

Instantly share code, notes, and snippets.

View gshutler's full-sized avatar

Garry Shutler gshutler

View GitHub Profile

Keybase proof

I hereby claim:

  • I am gshutler on github.
  • I am gshutler ( on keybase.
  • I have a public key ASCbXYc3dDoaZyxROV8NYXeq2fMIrSN_OogCZJpqe0IOAwo

To claim this, I am signing this object:

gshutler /
Created June 9, 2015 14:24
Update Rubygems for all rbenv rubies
#! /usr/bin/env bash
set -e
eval "$(rbenv init -)"
for version in `rbenv whence gem`; do
rbenv shell "$version"
echo "Updating rubygems for $version"
gem update --system --no-document --quiet
gshutler /
Last active August 29, 2015 14:09
Example of retrieving a day's events in Java
public final class Example {
public static void main(String[] args) throws IOException {
String url = "";
config.hatchet.configure do |hatchet|
require 'rbconfig'
hatchet.backtrace_filters Bundler.bundle_path.to_s => '[BUNDLER]',
Bundler.bin_path.to_s => '[BUNDLER]',
Rails.root.to_s => '[RAILS_ROOT]',
RbConfig::CONFIG['sitelibdir'] => '[SITELIBDIR]',
RbConfig::CONFIG['rubylibdir'] => '[RUBYLIBDIR]',
RbConfig::CONFIG['libdir'] => '[LIBDIR]',
RbConfig::CONFIG['sitedir'] => '[SITEDIR]'
config.appender( do |appender|
appender.device ='log/application.log')
config.appender( do |appender|
appender.file = 'log/application.log'
# Could delegate to:
# self.logger ='log/application.log')
gshutler / the_key.rb
Last active August 29, 2015 13:57
The key, the secret
let(:key) { "I've got the key" }
let(:secret) { "I've got the secret" }
let(:refresh_token) { "I've got the key to another way" }
let(:token) { "Ah ah ah ah ah ah, aha aha" }
let(:iv) { "Ah ah ah ah ah" }
gshutler / proposal.markdown
Last active December 30, 2015 16:49
I'm sorry Dave, I'm afraid I don't understand that

I'm sorry Dave, I'm afraid I don't understand that

What happens when you think of email as a primary interface?

At One Diary we have spent as much time and effort on email as an interface as our website. I'll explain why we made that choice and how you can create your own.

I'll cover all we've learnt, from the basics of how to do it, how to overcome common pitfalls, tips and tricks for refining the experience, and a short introduction to natural language processing.

gshutler /
Created August 4, 2013 14:25
Tagging a commit with build status on GitHub
#! /usr/bin/env bash
# Examples
# $ pending "Build in progress"
# $ failure "Build failed"
# $ success "Build succeeded"
commit=`git rev-parse HEAD`