Skip to content

Instantly share code, notes, and snippets.


Tim Haines timhaines

View GitHub Profile
timhaines / lambda.js
Created Jan 11, 2019 — forked from luketheobscure/lambda.js
Percy Bitbucket AWS Lambda
View lambda.js
const https = require('https');
const AUTHORIZATION = ''; // base 64 of user:password
const BITBUCKET_USER = ''; // either the user or the org that owns the repo
const PERCY_USER = ''; // the name of your percy user or org
exports.handler = (event, context, callback) => {
We need to post to a URL like this:<user>/<repo>/commit/<hash>/statuses/build
timhaines / mirage.config.js
Last active Apr 16, 2017
Mirage Dev Boilerplate
View mirage.config.js
export default function() {
//window.server = this;
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
View test_busy_workers_with_rack_test.rb
it 'can display busy workers' do
get '/busy'
assert_equal(200, last_response.status)
assert_match(/status-active/, last_response.body)
assert_match(/critical/, last_response.body)
assert_match(/WebWorker/, last_response.body)
assert_match(/Quiet/, last_response.body)
assert_match(/Stop/, last_response.body)
View test_busy_workers_with_capybara_and_percy.rb
it 'can display busy workers' do
visit '/busy'
assert_equal(200, page.status_code)
assert has_button?('Quiet All')
assert has_button?('Stop All')
timhaines / additions_to_test_helper.rb
Last active Jan 18, 2017
Converting Sidekiq Minitest Rack::Test tests to Capybara, and introducing Percy snapshots
View additions_to_test_helper.rb
# Initialize and finalize
MiniTest.after_run {
View gist:603ac777d9f694775bf2ab56669a8036
timhaines / Sharing podcast subscriptions with
Last active May 27, 2016
Sharing podcast subscriptions with Tim
View Sharing podcast subscriptions with

Hi and thank you!

I'm playing around with some new ideas, and would love to have your podcast subscriptions.

Apple's Podcast app - via iTunes

First export an OPML file from iTunes, and then email me. :)

  1. Open itunes, and go to the podcasts section. You may need to sync or refresh (bottom left)
  2. Click on File -> Library -> Export Playlists
  3. Choose the OPML file format
View Elastic Search Notes
## Useful Links
* Home Page -
* Git HomePage - more info, less marketing:
* Glossary -
* Hands on Intro - Hammer Time -
* Node client -
* Mongo River - to stream data in from Mongo -
* How to setup with Chef Solo -
* Elastic Search on EC2 -
timhaines / gist:6153982
Last active Dec 20, 2015
Consent of the governed - from the 2nd paragraph of the Declaration of Independence
View gist:6153982
We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable Rights, that among these are Life, Liberty and the pursuit of Happiness.--That to secure these rights, Governments are instituted among Men, deriving their just powers from the consent of the governed, --That whenever any Form of Government becomes destructive of these ends, it is the Right of the People to alter or to abolish it, and to institute new Government, laying its foundation on such principles and organizing its powers in such form, as to them shall seem most likely to effect their Safety and Happiness.