Skip to content

Instantly share code, notes, and snippets.

View jeremyckahn's full-sized avatar

Jeremy Kahn jeremyckahn

View GitHub Profile
@jeremyckahn
jeremyckahn / Trie.js
Last active October 4, 2019 14:16 — forked from deadlocked247/Trie.js
Trie implementation in ES6, good for string autocomplete
/* Class representing a Trie data structure */
export default class Trie {
/**
* Creates a Trie
* @return {Object} Trie
*/
constructor() {
this.words = 0;
this.prefixes = 0;
function updateStatus() {
window.webkitRequestAnimationFrame(updateStatus);
var gamepads = navigator.webkitGetGamepads();
var data = '';
for (var padindex = 0; padindex < gamepads.length; ++padindex) {
var pad = gamepads[padindex];
var i;
if (!pad) continue;
b=".55,.085,.68,.53$.55,.055,.675,.19$.895,.03,.685,.22$.755,.05,.855,.06$.47,0,.745,.715$.95,.05,.795,.035$.6,.04,.98, .335$.6,-.28,.735,.045$.25,.46,.45,.94$.215,.61,.355,1$.165,.84,.44,1$.23,1,.32,1$.39,.575,.565,1$.19,1,.22,1$.075,.82,.165,1$.175,.885,.32,1.275$.455,.03,.515,.955$.645,.045,.355,1$.77,0,.175,1$.86,0.07,1$.445,.05,.55,.95$1,0,0,1$.785,.135,.15,.86$.68,-.55,.265,1.55".split('$')
var b=[".55,.085,.68,.53",".55,.055,.675,.19",".895,.03,.685,.22",".755,.05,.855,.06",".47,0,.745,.715",".95,.05,.795,.035",".6,.04,.98, .335",".6,-.28,.735,.045",".25,.46,.45,.94",".215,.61,.355,1",".165,.84,.44,1",".23,1,.32,1",".39,.575,.565,1",".19,1,.22,1",".075,.82,.165,1",".175,.885,.32,1.275",".455,.03,.515,.955",".645,.045,.355,1",".77,0,.175,1",".86,0.07,1",".445,.05,.55,.95","1,0,0,1",".785,.135,.15,.86",".68,-.55,.265,1.55"]
@jeremyckahn
jeremyckahn / README
Created April 11, 2012 04:24 — forked from joelambert/README
Drop in replacements for setTimeout()/setInterval() that makes use of requestAnimationFrame() where possible for better performance
Drop in replace functions for setTimeout() & setInterval() that
make use of requestAnimationFrame() for performance where available
http://www.joelambert.co.uk
Copyright 2011, Joe Lambert.
Free to use under the MIT license.
http://www.opensource.org/licenses/mit-license.php
@jeremyckahn
jeremyckahn / transformations.js
Created April 11, 2012 03:46 — forked from willbailey/example.html
transformation library
/** Transformations Queue operations **/
var OPERATIONS = ['scale', 'rotate', 'translate'];
/**
* A mixin to assist in managing 3d matrix transformations on a dom element
*/
var Transformations = exports.Transformations = {
/**
* initialize the transformations mixin
(function($) {
// Used by dateinput
$.expr = {':': {}};
// Used by bootstrap
$.support = {};
// Used by dateinput
$.fn.clone = function(){
var ret = $();
@jeremyckahn
jeremyckahn / gist:1566008
Created January 5, 2012 16:33 — forked from millermedeiros/.vimrc
My VIM settings (.vimrc)
" =============================================================================
" Miller Medeiros .vimrc file
" -----------------------------------------------------------------------------
" heavily inspired by: @factorylabs, @scrooloose, @nvie, @gf3, @bit-theory.
" =============================================================================
" -----------------------------------------------------------------------------
" BEHAVIOR
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>index</title>
<meta name="generator" content="TextMate http://macromates.com/">
<meta name="author" content="arcus">
<!-- Date: 2010-08-04 -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript" charset="utf-8"></script>