Skip to content

Instantly share code, notes, and snippets.

@joshweinstein
joshweinstein / gist:3693177
Created September 10, 2012 19:23 — forked from nono/gist:1600053
autocomplete with tire
#encoding: utf-8
require 'tire'
require 'json'
require 'active_support/core_ext/object/to_query'
require 'active_support/core_ext/object/to_param'
conf = {
settings: {
number_of_shards: 1,
number_of_replicas: 0,
@joshweinstein
joshweinstein / Growl.rb
Created June 18, 2011 19:12 — forked from kurbmedia/Growl.rb
watchr + growl + rspec
class Growl
attr_accessor :report, :status
def initialize(report, opts = {})
@report, options = report, create_options(opts)
message = create_message
opts = options.inject([]) do |arr, item|
key, value = item.first, item.last