Skip to content

Instantly share code, notes, and snippets.

View desandro's full-sized avatar

David DeSandro desandro

View GitHub Profile
@desandro
desandro / dabblet.css
Created May 23, 2012 11:13
Pinterest layout mashed up
/* Pinterest layout mashed up */
/* ----------------------------> See Line 8 of CSS for instructions of how the layout mashes up with Masonry */
div.statcol{ float: left; padding: 0px; vertical-align: middle; overflow: hidden; text-align: left; margin-bottom: 42px; }
/* div.statrow{ padding-top: 0px; vertical-align: middle; clear: both; float: none; } */
div.statrow { width: 100%; margin: 0 auto; overflow: hidden; }
.polaroid { padding: 10px 10px 19px 10px; background-color: #f7f7f7;
display: inline-table; font-style: italic; line-height: 1.45em; }
.statcol:nth-child(4) { padding-bottom: 40px; clear:both; }
.statcol { text-align: center; }
@desandro
desandro / command.js
Created June 5, 2012 15:15
basic TextMate command with node
#!/usr/bin/env node
// run command and it should output "hello world"
function print( str ) {
process.stdout.write( str );
}
print('hello world')
@desandro
desandro / uppercase-command.js
Created June 5, 2012 15:55
To uppercase TextMate node command
#!/usr/bin/env node
process.stdin.resume();
var str = '';
process.stdin.on( 'data', function ( chunk ) {
str += chunk;
});
@desandro
desandro / index.html
Created July 30, 2012 03:57
A web page created at CodePen.io.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Google WebFont Loader test &middot; CodePen</title>
<!--
Copyright (c) 2012 David DeSandro, http://codepen.io/desandro
Permission is hereby granted, free of charge, to any person obtaining
module.exports = function(grunt) {
grunt.registerTask( 'ls', function() {
grunt.utils.spawn({
cmd: 'ls'
}, function(err, result, code) {
grunt.log.writeln('done');
grunt.log.write( result );
});
});
@desandro
desandro / masonry.js
Created October 7, 2012 15:23
vanilla masonry test
/**
* Vanilla Masonry v1.0.5
* Dynamic layouts for the flip-side of CSS Floats
* http://vanilla-masonry.desandro.com
*
* Licensed under the MIT license.
* Copyright 2012 David DeSandro
*/
/*jshint forin: false, undef: true, eqeqeq: true, curly: true, browser: true */
@desandro
desandro / close-pixelate.js
Created October 17, 2012 21:41
Close pixelate demo
/*!
* Close Pixelate v2.0.00 beta
* http://desandro.com/resources/close-pixelate/
*
* Developed by
* - David DeSandro http://desandro.com
* - John Schulz http://twitter.com/jfsiii
*
* Licensed under MIT license
*/
@desandro
desandro / jquery.isotope-csshooks.js
Created October 21, 2012 23:19
Isotope no cssHooks conflict
/**
* Isotope v1.5.20 - cssHooks no conflict
* An exquisite jQuery plugin for magical layouts
* http://isotope.metafizzy.co
*
* Commercial use requires one-time license fee
* http://metafizzy.co/#licenses
*
* Copyright 2012 David DeSandro / Metafizzy
*/
@desandro
desandro / jquery.isotope.js
Created October 30, 2012 13:16
Isotope with deleting prevObject
/**
* Isotope v1.5.21
* An exquisite jQuery plugin for magical layouts
* http://isotope.metafizzy.co
*
* Commercial use requires one-time license fee
* http://metafizzy.co/#licenses
*
* Copyright 2012 David DeSandro / Metafizzy
*/
@desandro
desandro / index.html
Created November 7, 2012 03:30
Electoral college scaled maps
<blockquote class="twitter-tweet" data-in-reply-to="266011047348035585"><p>@<a href="https://twitter.com/desandro">desandro</a> We’ve got you covered. <a href="http://t.co/zd8l1svU" title="http://www.npr.org/blogs/itsallpolitics/2012/11/01/163632378/a-campaign-map-morphed-by-money">npr.org/blogs/itsallpo…</a></p>&mdash; Danny DeBelius (@dannydb) <a href="https://twitter.com/dannydb/status/266011471396364289" data-datetime="2012-11-07T02:57:31+00:00">November 7, 2012</a></blockquote>
<blockquote class="twitter-tweet" data-in-reply-to="266011047348035585"><p>@<a href="https://twitter.com/desandro">desandro</a> I’m sure there are prettier ones: <a href="http://t.co/UXvaKc40" title="http://election.princeton.edu/electoral-college-map/">election.princeton.edu/electoral-coll…</a></p>&mdash; Richard Archambault (@richardmtl) <a href="https://twitter.com/richardmtl/status/266011540073885696" data-datetime="2012-11-07T02:57:48+00:00">November 7, 2012</a></blockquote>
<blockquote class="twitter-tweet" data-in-reply-