Skip to content

Instantly share code, notes, and snippets.

View jonathansampson's full-sized avatar
🦁
*roar*

Sampson jonathansampson

🦁
*roar*
View GitHub Profile
@jonathansampson
jonathansampson / dabblet.css
Created June 26, 2012 15:43
Delayed Animations
/**
* Delayed Animations
*/
@keyframes fadeToBlue {
50% {
background: blue
}
}
.foo {
@jonathansampson
jonathansampson / dabblet.css
Created May 31, 2012 04:11
CSS Dice: An Experiment by Jonathan Sampson - @jonathansampson
/* CSS Dice: An Experiment by Jonathan Sampson - @jonathansampson */
.die.one .dot {
box-shadow: 0 .2em 0 #FFF
}
.die.two .dot {
background: transparent;
box-shadow: -2.3em -2.3em 0 #345,
2.3em 2.3em 0 #345,
-2.3em -2.3em 0 #FFF,
2.3em 2.4em 0 #FFF
@jonathansampson
jonathansampson / ebola.sample.html
Created October 17, 2014 00:05
Alternative implementation for http://apps.washingtonpost.com/g/page/politics/the-scale-of-american-ebola-infections/1381/?template=iframe which will avoid Stack size limitations in some browsers
<style>
#people {
margin-top: 20px;
}
#people img {
width: 100%;
display: block;
}
</style>
// based on https://snipt.net/gregwhitworth/w3c-keyword-colors-90c153dd/
// adds alphabetical index, hex, and rgb values
var colors = {
"a": [
[
"aliceblue",
"#F0F8FF",
"rgb(240, 248, 255)"
],
[
@jonathansampson
jonathansampson / Object-Crawler.js
Last active August 29, 2015 14:01
Creates an object that reveals browser features and functionality
/*global document, prompt */
(function( global ) {
"use strict";
var response = {
browser: {
name: prompt( "Browser Name? (Chrome, IExplorer, etc)" ),
version: prompt( "Browser Version? (34, 11, etc)" )
},
@jonathansampson
jonathansampson / Proto-Crawler.js
Last active August 29, 2015 13:57
Enumerates all properties of an object, including those found along the prototype chain.
var output = (function ( object ) {
"use strict";
function getProperties ( object ) {
return object ? Object.getOwnPropertyNames( object )
.concat( getProperties( Object.getPrototypeOf( object ) ) ) : [] ;
}
function getUnique ( array ) {