Skip to content

Instantly share code, notes, and snippets.

View levelingup's full-sized avatar

levelingup

  • Orange County, CA
View GitHub Profile
TypeScript +1.2k/ -485 █████████▋░░░░░░░░░░░ 45.9%
JSON +11.8k/ -10.8k ████▏░░░░░░░░░░░░░░░░ 19.8%
XML +249/ -250 ███▏░░░░░░░░░░░░░░░░░ 15.2%
JavaScript +270/ -245 ██▏░░░░░░░░░░░░░░░░░░ 10.6%
Objective… +62/ -62 ▋░░░░░░░░░░░░░░░░░░░░ 3.5%
SQL +61/ -0 ▎░░░░░░░░░░░░░░░░░░░░ 1.6%
CSS +73/ -54 ▎░░░░░░░░░░░░░░░░░░░░ 1.5%
Dotenv +11/ -11 ▏░░░░░░░░░░░░░░░░░░░░ 0.6%
Prisma +16/ -10 ░░░░░░░░░░░░░░░░░░░░░ 0.6%
Objective… +17/ -17 ░░░░░░░░░░░░░░░░░░░░░ 0.4%
🌞 Morning 132 commits ██████▌░░░░░░░░░░░░░░ 31.0%
🌆 Daytime 69 commits ███▍░░░░░░░░░░░░░░░░░ 16.2%
🌃 Evening 222 commits ██████████▉░░░░░░░░░░ 52.1%
🌙 Night 3 commits ▏░░░░░░░░░░░░░░░░░░░░ 0.7%
@levelingup
levelingup / Business Model
Created November 3, 2013 22:39
Getting a 500 error with searchkick.
class Business < ActiveRecord::Base
searchkick
def search_data
{
service_name: services.map(&:name),
service_description: services.map(&:description)
}
end
end

This is a fork of Bootstrap Typeahead that adds minimal but powerful extensions.

For example, process typeahead list asynchronously and return objects

  # This example does an AJAX lookup and is in CoffeeScript
  $('.typeahead').typeahead(
    # source can be a function
    source: (typeahead, query) ->
 # this function receives the typeahead object and the query string