Skip to content

Instantly share code, notes, and snippets.

@alecperkins
alecperkins / SassMeister-input.sass
Created February 24, 2015 19:13
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
=replace-with-icon($x)
pretend-icon: $x
$icon-settings: 'settings-image'
$icon-settings_dark: 'settings-image--dark'
@alecperkins
alecperkins / nothirdparty.geojson
Created November 5, 2014 04:55
For the 2014 US Congressional midterm elections: a map showing districts with no third party (not Republican or Democratic), and a map showing districts with unopposed candidates.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alecperkins
alecperkins / SassMeister-input-HTML.html
Created October 10, 2014 20:06
Generated by SassMeister.com.
<div class="Site__">
<div class="_Products__">
<div class="ProductShowcase">
<img class="_Image" src="http://placepuppy.it/300/200">
<p class="_Description">Etiam porta sem malesuada magna mollis euismod. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Aenean lacinia bibendum nulla sed consectetur.</p>
</div>
<div class="ProductShowcase">
<img class="_Image" src="http://placepuppy.it/300/200">
<p class="_Description">Etiam porta sem malesuada magna mollis euismod. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Aenean lacinia bibendum nulla sed consectetur.</p>
@alecperkins
alecperkins / SassMeister-input-HTML.html
Last active August 29, 2015 14:07
Generated by SassMeister.com.
<div class="Site__">
<div class="_Products__">
<div class="ProductShowcase">
<img class="_Image" src="http://placepuppy.it/300/200">
<p class="_Description">Etiam porta sem malesuada magna mollis euismod. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Aenean lacinia bibendum nulla sed consectetur.</p>
</div>
<div class="ProductShowcase">
<img class="_Image" src="http://placepuppy.it/300/200">
<p class="_Description">Etiam porta sem malesuada magna mollis euismod. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Aenean lacinia bibendum nulla sed consectetur.</p>
@alecperkins
alecperkins / abstract_component.scss
Last active August 29, 2015 14:07
Demonstrating how placeholder classes and a naming scheme (with a helper mixin) can create cleanly semantic output. (Also shows how marvelous the Sass indented syntax is :P)
%Highlight {
color: black;
font-size: 14px;
&%-image--right {
._Image {
float: right;
}
}
&%-image--left {
._Image {

The graph references a paper by Emmanuel Saez that itself references a dataset.

The dataset includes two breakdowns, one including capital gains and one without. The following data is extracted from the capital gains-included set. It also omits the 1913–17 years since those don’t include 90–100 breakdowns.

FIRST_YEAR = 1917

#   0-100   90-100
data = """
    17,167  69,540

16,226 65,077

@alecperkins
alecperkins / names.js
Last active August 29, 2015 14:06 — forked from bnb/names.js
Cycle through the names using `Array::shift` and `Array::push`, with recursive `setTimeout` instead of a loop so it's non-blocking.
var names = [
"&!",
"bnb",
"bang",
"bitnb",
"bitandbang",
"Tierney Coren"
]
function typeName() {
// Get the first name in the list and push it to the end.
@alecperkins
alecperkins / names.js
Last active August 29, 2015 14:06 — forked from bnb/names.js
Use Array::shift and Array::push to cycle through the names indefinitely.
var names = [
"&!",
"bnb",
"bang",
"bitnb",
"bitandbang",
"Tierney Coren"
]
while(names.length > 0){
var name = names.shift();