This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = {} | |
!function (app) { | |
// boolean to indicate whether | |
// the `app` is ready | |
var isReady = false; | |
// the ready stack to house | |
// all of the callbacks pushed | |
// to it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = {} | |
!function (app) { | |
// container to push booleans | |
// for each event to indicate whether | |
// the `app` is ready | |
var isReady = []; | |
// the ready stack to house | |
// all of the callbacks pushed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[].filter.call(document.querySelectorAll('div'), function (div) { return (/^foo_*/).test(div.id); }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function stopAnimations () { | |
// Get the Body Element | |
var body = document.body | |
body.addEventListener('webkitAnimationStart', stopAnimation, false); | |
body.addEventListener('webkitAnimationIteration', stopAnimation, false); | |
body.addEventListener('animationstart', stopAnimation, false); | |
body.addEventListener('animationiteration', stopAnimation, false); | |
function stopAnimation (e) { | |
var target = e.target; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <math.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
int | |
main (void) { | |
double v, r; | |
v = 1000.0; | |
r = log10(v); | |
printf("%f\n", r); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while true; do printf "%.0f\n" $(echo "`ps -eo pcpu | head -2 | tail -n +2` * 100" | bc) ; sleep .5; done | histo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function p (s, b, e, d) { | |
var c = null; | |
var i = 0; | |
var n = 0; | |
var r = []; | |
var x = 0; | |
var y = 0; | |
while (null != (c = s[i++])) { | |
// got first brace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
PORT=5000 | |
## accept data from stdin | |
while read -r chunk; do | |
echo "$chunk" | umq push localhost $PORT | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules/ | |
resume.pdf | |
.DS_STORE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
import { UPDATE, createContainer } from 'stardux' | |
let domElement = document.createElement('div') | |
let template = '#{spinner}' | |
let initialState = {spin: false, spinner: ''} | |
let container = createContainer(domElement, initialState, reducer) | |
domElement.innerHTML = template | |
function reducer (state, action) { | |
switch (action.type) { | |
case UPDATE: |