Skip to content

Instantly share code, notes, and snippets.

John Hunter johnhunter

Block or report user

Report or block johnhunter

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
johnhunter / grid_mixins.scss
Last active Jan 29, 2019 — forked from ksenzee/grid_mixins.scss
Mixins that make it possible to use CSS Grid in IE 10/11 as well as in modern browsers. Based on mixins by Sascha Fuchs at
View grid_mixins.scss
// Grid mixins to support IE11
/// Add Gap between the boxes
/// @author Sascha Fuchs
/// @group core - cssgrid
View curry es5 example.js
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);
johnhunter / font.html
Created Feb 21, 2015
How browsers set vertical spacing
View font.html
<!DOCTYPE html>
<title>How browsers set vertical spacing</title>
body {
margin: 20px;
font-family: Times,'Times new roman';
font-size: 16px;
View dry-example.scss
// 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%);
johnhunter / createQueue.js
Created Apr 5, 2014
ease the pain of nested callbacks on animation
View createQueue.js
createQueue - ease the pain of nested callbacks on animation
function createQueue (stepCallback) {
var queue = [];
var isPaused;
var totalSteps = 0;
johnhunter / gist:8802905
Created Feb 4, 2014
List of Nodejs error codes
View gist:8802905
johnhunter / main.js
Created Jan 21, 2014
Simple node require example
View main.js
/* 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));
johnhunter / monad.js
Created Nov 7, 2013
Monad in Javascript
View monad.js
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 (){
johnhunter / Gruntfile.js
Last active Sep 10, 2016
Teamcity grunt runner test
View Gruntfile.js
/* jshint node: true */
module.exports = function(grunt) {
grunt.registerTask('default', ['concat:test']);
pkg: grunt.file.readJSON('package.json'),
concat: {
You can’t perform that action at this time.