Skip to content

Instantly share code, notes, and snippets.

Grant Timmerman grant

Block or report user

Report or block grant

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@grant
grant / users.sql
Created Feb 7, 2013
Random mock users sql
View users.sql
INSERT INTO `users` (`id`, `first_name`, `last_name`, `password`, `phone_number`) VALUES
(NULL, 'Justin','Brown','OVab1ohthaech','+18284001200'),
(NULL, 'Emma','Abbey','Chae8loo4','+13605684665'),
(NULL, 'Connie','Hatten','rah1ou2Qu','+14144591956'),
(NULL, 'Jesus','Goodwin','Laiph6oo','+18188644418'),
(NULL, 'Ernest','Ruffin','ahY0ijei3h','+19172338187'),
(NULL, 'Laurel','Owen','Oom8yohje','+16155206920'),
(NULL, 'Carol','Stormer','choh2ahF','+13126607383'),
(NULL, 'Annette','Paul','Ieke5yai','+12482553404'),
(NULL, 'Ronda','Stanley','suiD5id7Toh','+15622754365'),
@grant
grant / gist:6276945
Last active Dec 21, 2015
Leap Motion Developers around the world
View gist:6276945
Get coordinates:
http://jsfiddle.net/granttimmerman/MqEQ3/6/embedded/result/
Paste them here:
http://www.darrinward.com/lat-long/
Original data from:
https://developer.leapmotion.com/forums/forums/events-meetups/topics/where-are-you-from
View redirect to html
app.get(/^([^.]+)$/, function (req, res) { res.redirect(req.routes.path + '.html');});
@grant
grant / gist:b611edf97235b56665cf
Created May 1, 2014
Node Modules organization
View gist:b611edf97235b56665cf
/node_modules
/package.json
/src
/node_modules
/client -> ../client
/server -> ../server
/shared -> ../shared
/client
/apps
/main
@grant
grant / javascript callbacks
Created May 4, 2014
javascript callbacks
View javascript callbacks
function test() {
//code
codeThatListensToEvent(function() {
// finish the code
});
}
function codeThatListensToEvent(cb) {
socket.doStuff();
View gist:60544ed82443ff1e678b
setInterval(function () {
var color = 'rgb('+Math.floor(Math.random()*255)+','+Math.floor(Math.random()*255)+','+Math.floor(Math.random()*255)+')';
console.log(color);
document.getElementsByTagName('header')[0].style['background-color'] = color;
}, 10);
@grant
grant / fonts.md
Last active Aug 29, 2015
Favorite fonts
View index.html
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
div {
width: 40px;
height: 10px;
display: inline-block;
@grant
grant / style.css
Created Jul 13, 2014
Swift Flatdoc Style
View style.css
.lang-swift {
color: #528186;
}
.lang-swift .symbol {
color: #000;
}
.lang-swift .keyword {
color: #b6399f;
@grant
grant / index.js
Last active Aug 29, 2015
Markov Chain Generator
View index.js
var numNodes = 20;
var roundNum = 100;
var a = [];
for (var i = 0; i < numNodes; ++i) {
var connections = [];
var sum = 0;
for (var j = 0; j < numNodes; ++j) {
var randNum = Math.random() / numNodes;
// round the num
randNum = Math.round(randNum * roundNum) / roundNum;
You can’t perform that action at this time.