Skip to content

Instantly share code, notes, and snippets.

View timhaines's full-sized avatar

Tim Haines timhaines

View GitHub Profile
@timhaines
timhaines / Elastic Search Notes
Created December 3, 2013 05:07
Elastic Search Notes
## Useful Links
* Home Page - http://www.elasticsearch.org/
* Git HomePage - more info, less marketing: https://github.com/elasticsearch/elasticsearch
* Glossary - http://www.elasticsearch.org/guide/reference/glossary/
* Hands on Intro - Hammer Time - https://github.com/s1monw/hammertime
* Node client - https://github.com/phillro/node-elasticsearch-client
* Mongo River - to stream data in from Mongo - https://github.com/richardwilly98/elasticsearch-river-mongodb/
* How to setup with Chef Solo - http://www.elasticsearch.org/tutorials/deploying-elasticsearch-with-chef-solo/
* Elastic Search on EC2 - http://www.elasticsearch.org/tutorials/elasticsearch-on-ec2/
@timhaines
timhaines / Sharing podcast subscriptions with Tim.md
Last active May 27, 2016 06:18
Sharing podcast subscriptions with Tim

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
52.10.151.64
52.10.207.79
52.10.59.137
52.26.168.24
52.33.182.54
52.35.101.107
52.37.117.181
52.37.169.220
52.37.249.86
52.39.245.19
@timhaines
timhaines / additions_to_test_helper.rb
Last active January 18, 2017 17:40
Converting Sidekiq Minitest Rack::Test tests to Capybara, and introducing Percy snapshots
# Initialize and finalize Percy.io
Percy::Capybara.initialize_build
MiniTest.after_run {
Percy::Capybara.finalize_build
}
it 'can display busy workers' do
visit '/busy'
assert_equal(200, page.status_code)
assert_selector('.status-active')
assert_text('critical')
assert_text('WebWorker')
assert has_button?('Quiet All')
assert has_button?('Stop All')
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)
end
@timhaines
timhaines / controllers.application.js
Last active April 8, 2017 01:24 — forked from samselikoff/mirage.config.js
Mirage dev boilerplate
import Ember from 'ember';
export default Ember.Controller.extend({
});
@timhaines
timhaines / mirage.config.js
Last active April 16, 2017 14:55
Mirage Dev Boilerplate
export default function() {
//window.server = this;
this.get('users');
};
@timhaines
timhaines / lambda.js
Created January 11, 2019 17:32 — forked from luketheobscure/lambda.js
Percy Bitbucket AWS Lambda
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:
https://api.bitbucket.org/2.0/repositories/<user>/<repo>/commit/<hash>/statuses/build