Skip to content

Instantly share code, notes, and snippets.

@tylergaw
tylergaw / gist:1217185
Created September 14, 2011 17:32
Generate noise with canvas.
// Big up to Jeffrey Way for this noise generator (http://net.tutsplus.com/tutorials/javascript-ajax/how-to-generate-noise-with-canvas/)
function generateNoise(opacity) {
if (!!!document.createElement('canvas').getContext) {
return false;
}
var canvas = document.createElement("canvas"),
ctx = canvas.getContext('2d'),
x, y,
@tylergaw
tylergaw / gist:1265771
Created October 5, 2011 21:18
Retrieve a template file via an Ajax request and add it to ICanHazJS's template store.
// Make a request to retrieve an html template.
// @param OBJECT options
mxAdmin.tmpl = function (templateName, data, callback, options) {
var defaults = {
// Providing a filename will allow for naming the ich template
// one name and then requesting a different file from the server
filename: templateName,
extension: 'html',
dataType: 'html',
@tylergaw
tylergaw / dabblet.css
Created March 28, 2012 02:24
Untitled
body {
font-family: helvetica;
}
li:nth-last-child(-n + 4) {
opacity: 0.6;
}
li:nth-last-child(-n + 3) {
opacity: 0.4;
@tylergaw
tylergaw / dabblet.css
Created March 28, 2012 03:54
Untitled
body {
font-family: helvetica;
}
li:nth-last-child(-n + 4) {
opacity: 0.6;
}
li:nth-last-child(-n + 3) {
opacity: 0.4;
@tylergaw
tylergaw / dabblet.css
Created April 4, 2012 16:52
Right aligned placeholder
/**
* Right aligned placeholder
*/
input {
font-size: 32px;
text-align: right;
}
@tylergaw
tylergaw / dabblet.css
Created April 5, 2012 15:37
Right aligned placeholder
/**
* Right aligned placeholder
*/
input {
font-size: 32px;
text-align: right;
}
@tylergaw
tylergaw / dabblet.css
Created April 5, 2012 15:44
Notched Arrow attempt + failure
/**
* Notched Arrow attempt + failure
*/
a {
background-color: darkred;
color: #f1f1f1;
display: inline-block;
font-family: georgia, times, serif;
font-size: 2em;
font-style: italic;
@tylergaw
tylergaw / dabblet.css
Created April 11, 2012 12:58
Arrow Button
/**
* Arrow Button
*/
a {
color: #f1f1f1;
display: inline-block;
font-family: helvetica, sans;
font-size: 2.2em;
letter-spacing: 0.1em;
text-decoration: none;
@tylergaw
tylergaw / dabblet.css
Created April 18, 2012 22:23
Centered Vertical line with CSS Gradient
/**
* Centered Vertical line with CSS Gradient
*/
div {
background: #fff;
background: linear-gradient(180deg, transparent, #353535, transparent);
background-position: 50%;
background-repeat: repeat-y;
background-size: 1px auto;
}
@tylergaw
tylergaw / dabblet.css
Created April 19, 2012 04:17
Centered Vertical line with CSS Gradient
/**
* Centered Vertical line with CSS Gradient
*/
div {
background: #fff;
background: linear-gradient(180deg, transparent, #353535, transparent);
background-position: 50%;
background-repeat: repeat-y;
background-size: 1px auto;
}