Skip to content

Instantly share code, notes, and snippets.

View mattkennedy's full-sized avatar

Matt Kennedy mattkennedy

View GitHub Profile

Keybase proof

I hereby claim:

  • I am mattkennedy on github.
  • I am mkennedy (https://keybase.io/mkennedy) on keybase.
  • I have a public key whose fingerprint is DC9C EEE8 674D 44E4 BEE3 C2A1 DEBB 2A91 B0AD 7AF3

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am mattkennedy on github.
* I am mkennedy (https://keybase.io/mkennedy) on keybase.
* I have a public key whose fingerprint is 5329 2031 33ED 9959 B3F2 0C0E F3CF 6339 90F7 1B17
To claim this, I am signing this object:
@mattkennedy
mattkennedy / IPInsetLabel.h
Created May 4, 2012 21:47
IPInsetLabel: a simple UILabel subclass that adds padding insets and auto-height-resizing
//
// IPInsetLabel.h
// Instapaper
//
// Created by Marco Arment on 7/23/11.
// Copyright 2011 Instapaper LLC, released to the public domain.
//
#import <UIKit/UIKit.h>
@mattkennedy
mattkennedy / README.markdown
Created March 2, 2012 20:54 — forked from gudbergur/README.markdown
Bootstrap's Typeahead plugin extended (allowing for AJAX functionality) among other things

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
@mattkennedy
mattkennedy / csv-search.rb
Created February 19, 2012 20:27 — forked from copiousfreetime/csv-search.rb
Searching through a CSV
#!/usr/bin/env ruby
require 'csv'
# This assumes:
# - Ruby 1.9's CSV library, if you are using 1.8, use FasterCSV.
#
# https://raw.github.com/hadley/data-baby-names/master/baby-names.csv
csv_fname = "baby-names.csv"
@mattkennedy
mattkennedy / remote-typeahead.js
Created February 17, 2012 17:30 — forked from geuis/remote-typeahead.js
Remote data querying for Twitter Bootstrap 2.0 Typeahead without modifications
// Charles Lawrence - Feb 16, 2012. Free to use and modify. Please attribute back to @geuis if you find this useful
// Twitter Bootstrap Typeahead doesn't support remote data querying. This is an expected feature in the future. In the meantime, others have submitted patches to the core bootstrap component that allow it.
// The following will allow remote autocompletes *without* modifying any officially released core code.
// If others find ways to improve this, please share.
$('#searchinput').typeahead()
.on('keyup', function(ev){
ev.stopPropagation();
ev.preventDefault();