Skip to content

Instantly share code, notes, and snippets.

View desandro's full-sized avatar

David DeSandro desandro

View GitHub Profile
@desandro
desandro / jquery.isotope.min.js
Created January 28, 2012 03:31
Isotope patch
/**
* Isotope v1.5.08 patch
* An exquisite jQuery plugin for magical layouts
* http://isotope.metafizzy.co
*
* Commercial use requires one-time license fee
* http://metafizzy.co/#licenses
*
* Copyright 2011 David DeSandro / Metafizzy
*/
@desandro
desandro / quad-curve.html
Created February 3, 2012 16:39
quadratic curve interpolation
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>quad curve</title>
<style>
body {
background: #CCC;
@desandro
desandro / requestanimationframe.js
Created February 19, 2012 23:29 — forked from paulirish/rAF.js
requestAnimationFrame polyfill
/**
* requestAnimationFrame polyfill by Erik Möller & Paul Irish et. al.
* https://gist.github.com/1866474
*
* http://paulirish.com/2011/requestanimationframe-for-smart-animating/
* http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
**/
/*jshint asi: false, browser: true, curly: true, eqeqeq: true, forin: false, newcap: true, noempty: true, strict: true, undef: true */
@desandro
desandro / dabblet.css
Created February 20, 2012 19:22
Chrome 3d compositing bug
/**
* Chrome 3d compositing bug
*/
body { font-family: sans-serif; }
.env {
-webkit-perspective: 500px;
width: 500px;
@desandro
desandro / README.markdown
Created February 24, 2012 15:17
addTap.js

addTap

helper function for adding click-ish events for touch devices

Usage

addTap( elem, onTap, options );

// for example

var box = document.getElementById('box');

@desandro
desandro / index.html
Created February 27, 2012 04:21
Safari 5 3D overflow bug
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>backface visibility bug</title>
<style>
body {
font-family: sans-serif;
error: object directory ./objects/../../data/repositories/0/nw/05/19/95/1211978/network.git/objects does not exist; check .git/objects/info/alternates.
@desandro
desandro / jquery.masonry-0.6.js
Created March 26, 2012 18:15
Early jQuery Masonry
(function($){
//Finding min and max values in array from http://snippets.dzone.com/posts/show/769
Array.prototype.min = function(){ return Math.min.apply({},this) };
Array.prototype.max = function(){ return Math.max.apply({},this) };
$.fn.masonry = function() {
this.each(function() {
var wall = $(this);
@desandro
desandro / jquery.isotope-masonry-column-shift-gutters.js
Created May 6, 2012 20:10
Isotope Masonry column shift w/ gutters custom layout mode
$.Isotope.prototype._getMasonryColumnShiftColumns = function() {
var gutter = this.options.masonryColumnShift && this.options.masonryColumnShift.gutterWidth || 0;
containerWidth = this.element.width();
this.masonryColumnShift.columnWidth = this.options.masonryColumnShift && this.options.masonryColumnShift.columnWidth ||
// or use the size of the first item
this.$filteredAtoms.outerWidth(true) ||
// if there's no items, use size of container
containerWidth;
@desandro
desandro / dabblet.css
Created May 11, 2012 17:21
border-radius: 50%;
/**
* border-radius: 50%;
*/
div {
background: #888;
margin: 10px;
border-radius: 50%;
}