AmdcL
A Pen by John Hunter on CodePen.
// | |
// Grid mixins to support IE11 | |
// https://gist.github.com/johnhunter/1c7d332e7c2ed8351e36c40695b94d4f | |
// | |
/// Add Gap between the boxes | |
/// | |
/// @author Sascha Fuchs | |
/// | |
/// @group core - cssgrid |
exports.default = function (socket) { | |
return function (store) { | |
return function (next) { | |
return function (action) { | |
if (action.meta && action.meta.remote) { | |
var clientId = store.getState().get('clientId'); | |
socket.emit('action', objectAssign({}, action, { clientId: clientId })); | |
} | |
return next(action); | |
}; |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>How browsers set vertical spacing</title> | |
<style> | |
body { | |
margin: 20px; | |
font-family: Times,'Times new roman'; | |
font-size: 16px; |
// Allow mixins that share common properties in a single css rule | |
// store autogenerated selectors that map | |
$Placeholder-Selectors: (); | |
@mixin button($color, $extend: true) { | |
@include button-static($extend); | |
background-color: $color; | |
border-color: mix(black, $color, 25%); |
/* | |
createQueue - ease the pain of nested callbacks on animation | |
*/ | |
function createQueue (stepCallback) { | |
var queue = []; | |
var isPaused; | |
var totalSteps = 0; |
A Pen by John Hunter on CodePen.
https://github.com/joyent/node/blob/master/deps/uv/include/uv.h#L63 |
/* jshint node:true, es3:false */ | |
// we need some complex maths functions :) | |
var maths = require('./maths'); | |
console.log(maths.XplusY(2, 4)); | |
console.log(maths.XtimesY(2, 4)); |
/* | |
From Doug Crockford's talk 'Monads and Gonads' | |
*/ | |
/* | |
Doug calls this a Macroid - a JavaScript version of a macro. | |
Its purpose is to create the monad unit function for a specific monad type | |
*/ | |
function MONAD (){ |
/* jshint node: true */ | |
module.exports = function(grunt) { | |
grunt.registerTask('default', ['concat:test']); | |
grunt.loadNpmTasks('grunt-contrib-concat'); | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
concat: { |