Skip to content

Instantly share code, notes, and snippets.

<div class="example-numbers">
<input class="typeahead" type="text" placeholder="numbers (one through ten)">
</div>
@jharding
jharding / npm-debug.log
Created February 14, 2014 01:29
trying to publish grunt-exec@0.4.3
0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'publish' ]
2 info using npm@1.3.24
3 info using node@v0.10.25
4 verbose publish [ '.' ]
5 verbose cache add [ '.', null ]
6 verbose cache add name=undefined spec="." args=[".",null]
7 verbose parsed url { protocol: null,
7 verbose parsed url slashes: null,
7 verbose parsed url auth: null,
@jharding
jharding / typeahead.bundle.js
Created July 14, 2014 00:01
typeahead.js #899 dist
/*!
* typeahead.js 0.10.3
* https://github.com/twitter/typeahead.js
* Copyright 2013-2014 Twitter, Inc. and other contributors; Licensed MIT
*/
(function($) {
var _ = function() {
"use strict";
return {
@jharding
jharding / gist:3442977
Created August 23, 2012 22:49
view commits to current branch
git log --first-parent --no-merges

fantasy cheat sheet

quarterback

tier 1

  • aaron rodgers
  • tom brady
  • dree brees
  • matthew stafford
@jharding
jharding / extend.js
Created November 17, 2012 02:02
Extend function that plays nice with setters and getters
function extend(obj) {
var slice = Array.prototype.slice;
slice.call(arguments, 1).forEach(function(source) {
var getter
, setter;
for (var key in source) {
getter = source.__lookupGetter__(key);
setter = source.__lookupSetter__(key);
/*global isCommonJS, jasmine, spyOn, it, xit, expect, runs, waits, waitsFor, beforeEach, afterEach, describe, xdescribe */
$('.example-twitter-oss .typeahead').typeahead({
name: 'twitter-oss',
prefetch: '../data/repos.json',
template: [
'<p class="repo-language">{{language}}</p>',
'<p class="repo-name">{{name}}</p>',
'<p class="repo-description">{{description}}</p>'
].join(''),
engine: Hogan
});
$('.example-arabic .typeahead').typeahead({
name: 'arabic',
local: [
"الإنجليزية",
"نعم",
"لا",
"مرحبا",
"کيف الحال؟",
"أهلا",
"مع السلامة",
$('.example-sports .typeahead').typeahead([
{
name: 'nba-teams',
prefetch: '../data/nba.json',
header: '<h3 class="league-name">NBA Teams</h3>'
},
{
name: 'nhl-teams',
prefetch: '../data/nhl.json',
header: '<h3 class="league-name">NHL Teams</h3>'