Skip to content

Instantly share code, notes, and snippets.

David DeSandro desandro

Block or report user

Report or block desandro

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View twitter-less.css
/* sidebars */
.Trends,
.wtf-module,
.RelatedUsers,
.SignupCallOut,
/* in timeline */
.wtf-module.has-content,
.tweet.dismissable-content,
.LiveVideoHomePageModuleContainer,
.WtfLargeCarouselStreamItem, /* WTF in timeline */
View README.md
View twitter-nix.css
/* sidebars */
.Trends,
.wtf-module,
.RelatedUsers,
.SignupCallOut,
/* in timeline */
.wtf-module.has-content,
.tweet.dismissable-content,
.LiveVideoHomePageModuleContainer,
.WtfLargeCarouselStreamItem, /* WTF in timeline */
View inclusion-rider-response.md

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.

View calebs-first-code.txt
uijjkjn bnnbbv 7nbgn7uy8mh vb hx vghb Z bv VB Aszxsew2W
sxez3w axzas bf71b 1vfu1ch bc bgb7nvi 76r g `cxzfbc cv
dfgv n 1 2q1
View penrose.svg
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 Feb 24, 2017
overprint elephant
View elephant.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View round-svg.js
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
@desandro
desandro / conditionals.js
Created May 19, 2016
hash table vs. conditionals
View conditionals.js
// 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';
View good-code.md

I've been struggling to come up with a good answer to this question: What is good code?

Programming is such a technical subject. It appears to be something you can definitively analyze. But when I think about it through this question, programming seems entirely subjective.

I know good code can be readable, terse, eloquent, standardized, innovative. But it can't be just one of these qualities.

Good code can be highly stylized — utilizing nuanced patterns rarely seen elsewhere. Or good code can be highly structured — following strict guidelines and established conventions. Bad code can be either as well.

I think the answer to "What is good code?" is that there is no answer. You can't put it in words. Like asking "What makes a joke funny?"

You can’t perform that action at this time.