Skip to content

Instantly share code, notes, and snippets.

<header class="header">
<nav>
<ul class="nav-list container">
<li class="col--3">
<div class="link-group">
<h3 class="h--3">Heading</h3>
<ul class="link-group__list">
<li><a href="#">Some link</a></li>
<li><a href="#">Some link</a></li>
<li><a href="#">Some link</a></li>
@nhunzaker
nhunzaker / 0_reuse_code.js
Created February 7, 2014 14:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@nhunzaker
nhunzaker / gist:6262330
Last active December 21, 2015 06:09 — forked from anonymous/gist:6262325
exports.searchContactPost = function(req, res) {
if (req.body.searchContacts === '') { res.send('Oops you searching for nothing, well here is nothing!'); };
async.waterfall([
function(callback) {
var contact = req.body.searchContacts.toLowerCase()
User.find({$or:[
{firstName: contact },
{lastName : contact },
@nhunzaker
nhunzaker / animationLoop
Created August 27, 2012 00:07
JS: requestAnimationFrame Loop Pattern
/*
TIME BASED ANIMATION:
---------------------
To keep things moving at a constant time-based rate instead of varying
frame-based, multiply your movement by APP.deltaTime
BAD: 100 pixels per frame (BOO... movement is tied to framerate)
var velocity = 100;
BETTER: 100 pixels per second (Horray! Framerate independence!)