Skip to content

Instantly share code, notes, and snippets.

View lorenzsell's full-sized avatar

Lorenz Sell lorenzsell

View GitHub Profile
@lorenzsell
lorenzsell / description
Created May 6, 2016 16:06 — forked from pduey/00 Rails autocomplete
sunspot_solr ruby gem with solr autosuggest/autocomplete, JQuery UI autocomplete, and apache HTTP server
Architecture: Rails 3.2, Solr 1.4 with sunspot_solr gem, Apache HTTP server as reverse proxy to
Rails app, Jquery UI
Note: I don't care about the distinction between autocomplete and autosuggest. I am implementing what some
people call autosuggest, and I'm calling it autocomplete.
Given the above existing architecture, I want to add an autocomplete field into my app for a single
attribute on a single model. It needs to be fast and secure (duh). The search target field could have
white space and the search input should allow it, e.g., if I search with "iker's gui" it should return
@lorenzsell
lorenzsell / redis_pubsub_demo.rb
Created September 24, 2015 23:10 — forked from tobym/redis_pubsub_demo.rb
Redis PubSub demo with EventMachine (chat service)
# Author: Pieter Noordhuis
# Description: Simple demo to showcase Redis PubSub with EventMachine
#
# Requirements:
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby
# - a browser with WebSocket support
#
# Usage:
# ruby redis_pubsub_demo.rb
#