Skip to content

Instantly share code, notes, and snippets.

View desandro's full-sized avatar

David DeSandro desandro

View GitHub Profile

Hello █████,

Thanks for getting in touch and for this tremendous invitation. I'm flattered and excited by the offer.

Representation matters to me. I'm curious: How are you aiming to build a diverse speaker line-up this year? Last years's conference only had 1 female and 1 person of color.

My inclusion rider: I'll join as a speaker if the line-up includes at least ██ women and ██ POC.

I realize putting together a diverse line-up is difficult. As a white male, I'd rather not take up a slot that could better feature someone not like me. Here's a list of people I can recommend.

@desandro
desandro / classie.js
Last active November 9, 2017 14:41
classie - class helper functions
/*!
* classie - class helper functions
* from bonzo https://github.com/ded/bonzo
*
* classie.has( elem, 'my-class' ) -> true/false
* classie.add( elem, 'my-new-class' )
* classie.remove( elem, 'my-unwanted-class' )
*/
/*jshint browser: true, strict: true, undef: true */
var paths = document.querySelectorAll('path')
for ( var i=0; i < paths.length; i++ ) {
var path = paths[i];
var d = path.getAttribute('d');
// 10.2.3 -> 10.2 0.3
d = d.replace( /(\d?\.\d)\.(\d)/g, function( match, $1, $2 ) {
return $1 + ' 0.' + $2
});
// round numbers
uijjkjn bnnbbv 7nbgn7uy8mh vb hx vghb Z bv VB Aszxsew2W
sxez3w axzas bf71b 1vfu1ch bc bgb7nvi 76r g `cxzfbc cv
dfgv n 1 2q1
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@desandro
desandro / elephant.svg
Created February 24, 2017 02:10
overprint elephant
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@desandro
desandro / README.md
Created September 24, 2013 12:26
imagesLoaded + requireJS

Install imagesLoaded via Bower

bower install imagesloaded

The config in main.js can be set up several ways

requirejs.config({
  // set paths object
  paths: {
@desandro
desandro / doit.js
Created June 28, 2011 02:10
Pretty Beautiful Javascript
(function(){
var pres = document.getElementsByTagName('pre');
if ( !pres.length || document.body.querySelectorAll('*').length !== 1 ) {
return;
}
// Copyright (C) 2006 Google Inc.
//
@desandro
desandro / conditionals.js
Created May 19, 2016 18:47
hash table vs. conditionals
// Get 1st, 2nd, 3rd, 4th, from 1, 2, 3, 4
// ignoring 11, 12, 13 for demo
// using conditionals
function suffixDate( date ) {
var lastDigit = date % 10;
if ( lastDigit == 1 ) {
return date + 'st';
} else if ( lastDigit == 2 ) {
return date + 'nd';

Ask Reddit: Have you ever felt a deep personal connection to a person you met in a dream only to wake up feeling terrible because you realize they never existed?


throw away account cause this is really personal.

My last semester at a certain college I was assulted by a football player for walking where he was trying to drive (note he was 325lbs I was 120lbs), while unconscious on the ground I lived a different life.

I met a wonderful young lady, she made my heart skip and my face red, I pursued her for months and dispatched a few jerk boyfriends before I finally won her over, after two years we got married and almost immediately she bore me a daughter.