Skip to content

Instantly share code, notes, and snippets.

View johbo's full-sized avatar

Johannes Bornhold johbo

View GitHub Profile
@johbo
johbo / create-and-search-index.sh
Created March 3, 2014 16:15
Closest item out of a group
# try to delete the index in case it's already there
curl -XDELETE "http://localhost:9200/joh-test/"
# create index, add mapping
curl -XPOST "http://localhost:9200/joh-test/"
curl -XPUT "http://localhost:9200/joh-test/item/_mapping" -d'
{
"item": {
@johbo
johbo / Guardfile
Created April 13, 2013 18:33
Test runner for TDD running in background and talking to you on MacBook combined with a small Guardfile - awesome tool in the train, no need to see the terminal
notification :off
guard 'shell' do
watch(/^myproject.*.py$/) {|m| `./testrun.sh` }
end