Skip to content

Instantly share code, notes, and snippets.

View jackrugile's full-sized avatar

Jack Rugile jackrugile

View GitHub Profile
$.definitions.letters = {
'1': [
[ , , 1, , 0 ],
[ , 1, 1, , 0 ],
[ , , 1, , 0 ],
[ , , 1, , 0 ],
[ 1, 1, 1, 1, 1 ]
],
'2': [
[ 1, 1, 1, 1, 0 ],
@jackrugile
jackrugile / main.js
Last active December 22, 2015 06:09
Favicon generated from array using canvas and toDataURL()
function generateFavicon() {
var favicon = document.getElementById( 'favicon' ), // referencing shortcut icon in <head>
favc = document.createElement( 'canvas' ),
favctx = favc.getContext( '2d' ),
faviconGrid = [
[ 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1 ],
[ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 ],
[ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 ],
[ 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0 ],
[ 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0 ],
@jackrugile
jackrugile / index.html
Created December 15, 2011 19:36
Canvas Particles
<!DOCTYPE html>
<html lang="en">
<head>
<title>Canvas Particles v2</title>
<meta charset="utf-8" />
<style>
html, body {
margin: 0;
padding: 0;
}
<nav class="nav">
<ul class="nav__list">
<li class="nav-list__item">
<a class="nav-list-item__link"></a>
</li>
<li class="nav-list__item">
<a class="nav-list-item__link"></a>
</li>
<li class="nav-list__item">
<a class="nav-list-item__link"></a>
@jackrugile
jackrugile / SassMeister-input.scss
Created February 26, 2015 17:50
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
// ----
@mixin specify($selector) {
@at-root {
#{selector-append($selector, &)} {
@content;
}
@jackrugile
jackrugile / SassMeister-input.scss
Created January 31, 2015 00:57
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
// ----
/*
The item class is sometimes a <div>, and sometimes an <a>.
I'd like to only set a hover effect when it's an <a>.
Id there a way to utilize the ampersand and
nested syntax to achieve this?