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(undefined) { | |
'use strict'; | |
var debug = function(err) { | |
console.error(err.message + '\n' + err.stack); | |
}; | |
try { |
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
/* private modernizr mixin | |
* | |
* downside - only works on single-element selectors. nesting still works though. | |
* | |
* @param features - a list of modernizr test classes e.g.: csstransitions opacity OR csstransitions, opacity | |
* @param declaration - the {block} of content passed by the block mixins +yep()/+nope() | |
* @param support - boolean, true if testing support, false if testing no support | |
* | |
* 1. if testing for support, set selector to empty string | |
* if testing for no support, set selector to ".no-js" appended by |
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
import page from 'page' | |
import pathToRegExp from 'path-to-regexp' | |
import querystring from 'querystring' | |
import HomePage from './components/HomePage' | |
import ProfilePage from './components/ProfilePage' | |
import NotFoundPage from './components/NotFoundPage' | |
// generate expression for iterating over object keys | |
function entries(obj) { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="Futuristic HUD single-div no-image CSS3 loading spinner" /> | |
<title>CSS3 Loading Spinner</title> | |
</head> | |
<body> | |
<div id="spinner"></div> | |
</body> | |
</html> |
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
### | |
# Solo Pong - Declan de Wet | |
# TODO: Prevent paddle from going out of the viewport | |
# TODO: Implement collision animations | |
# TODO: Music and sound | |
# TODO: Keyboard controls | |
### | |
# Create a self-instantiating shim/polyfill for the requestAnimationFrame API, if it does not exist, |
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
{ | |
"auto_complete_commit_on_tab": true, | |
"bold_folder_labels": true, | |
"caret_style": "phase", | |
"color_scheme": "Packages/Tomorrow Color Schemes/Tomorrow-Night.tmTheme", | |
"create_window_at_startup": false, | |
"default_line_ending": "unix", | |
"detect_slow_plugins": false, | |
"draw_minimap_border": true, | |
"ensure_newline_at_eof_on_save": true, |
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
### | |
brainfuck() function | |
description: takes a string of Brainfuck code and returns the parsed result | |
usage: brainfuck('++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.') | |
// output: 'Hello World.' | |
### | |
brainfuck = (code) -> | |
inp = '23\n' | |
out = '' |
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
// vars ending in $ are streams | |
var flyd = require('flyd') | |
var botkit = require('botkit') | |
var controller = botkit.slackbot(/*...*/) | |
var direct_message$ = flyd.stream() | |
var conversation$ = flyd.stream() |
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
const getValidatedTransformation = sequentialCallback( | |
findSomething, | |
transformSomething, | |
validateTransformed | |
) | |
getValidatedTransformation((error, validated) => { | |
if (error) { | |
console.error(new Error(error)) | |
} else { |
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
findSomething() | |
.then(transformSomething) | |
.then(validateTransformed) | |
.then((validated) => console.log('data is valid:', validated)) | |
.catch((error) => console.error(new Error(error)) |
OlderNewer