Skip to content

Instantly share code, notes, and snippets.

View elifitch's full-sized avatar
😬

Eli Fitch elifitch

😬
View GitHub Profile
@elifitch
elifitch / gradient-borders.scss
Created August 8, 2015 20:27
A little mixin to make CSS gradient borders easy peasy
/*
* A little mixin to make CSS gradient borders easy peasy.
* Just feed it two colors, a width and direction.
* TODO: support 3+ color stops, more options
*
* A look at the mixin in action: http://codepen.io/EliFitch/pen/dorXeB
* usage: @include gradient-border($green, $blue, 3px, 'to left')
*
* Authored by Eli Fitch (https://github.com/elifitch)
* Found at https://gist.github.com/elifitch/67ae7cfe1594abf8fb57
@elifitch
elifitch / gist:8a4b0d84e49a3a9a593a
Created January 19, 2015 22:24
Draw grid of blocks on canvas
var c = document.createElement('canvas');
c.height = window.innerHeight;
c.width = window.innerWidth;
var ctx = c.getContext('2d');
function blocks(size) {
//draw row
for(var j=0, x=c.height/size; j<x; j++) {
//draw block
for(var i = 0, l = c.width/size; i<l; i++) {