Skip to content

Instantly share code, notes, and snippets.

View JosephClay's full-sized avatar
👾
game dev

Joseph Clay JosephClay

👾
game dev
View GitHub Profile
@JosephClay
JosephClay / Less: #pos
Last active August 29, 2015 13:58
Less: #pos
#pos {
.t(@a: 0) { top: @a; }
.r(@a: 0) { right: @a; }
.b(@a: 0) { bottom: @a; }
.l(@a: 0) { left: @a; }
.tl(@a: 0; @b: @a) { top: @a; left: @b; }
.tr(@a: 0; @b: @a) { top: @a; right: @b; }
.bl(@a: 0; @b: @a) { bottom: @a; left: @b; }
.br(@a: 0; @b: @a) { bottom: @a; right: @b; }
@JosephClay
JosephClay / Less: #cursor
Last active August 29, 2015 14:05
Less: #cursor
#cur {
.pointer() { cursor: default; }
.default() { cursor: default; }
.hand() { cursor: pointer; }
.help() { cursor: help; }
.move() { cursor: move; }
.horz() { cursor: w-resize; }
.vert() { cursor: n-resize; }
@JosephClay
JosephClay / JS: typecast
Last active August 29, 2015 14:13
JS: typecast
var typecast = function(val) {
// Pulled from AMD
var r;
if (val === null || val === 'null') {
r = null;
} else if (val === 'true') {
r = true;
} else if (val === 'false') {
r = false;
} else if (val === undefined || val === 'undefined') {
@JosephClay
JosephClay / .eslintrc
Last active February 26, 2018 17:25
configuration
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": [
"react"
],
"parserOptions": {