This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var c = function(n) { | |
var string = ''; | |
n = Math.floor(n * Math.pow(256, 3)); | |
for (var i = 5; i >= 0; i--) { | |
string += (Math.floor(n / Math.pow(16, i)) % 16).toString(16); | |
} | |
return '#' + string; | |
} |
Inspired by this time map post I wanted to build a block that shows a bit more of the intuition about how time maps work. This is a very simple timemap built with D3 that visualizes the speed and frequency of keystrokes.
Built with blockbuilder.org
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
height: 3000 | |
scrolling: yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Making a gist, because I know I'm going to have to find this again... | |
// Of course, this is a terrible hack. I recommend this only to the desperate (and those who don't want to use mixins.) | |
componentWillReceiveProps(nextProps) { | |
if (nextProps.isOpen) { | |
window.addEventListener('mousedown', this.pageClick, false) | |
} else { | |
window.removeEventListener('mousedown', this.pageClick, false) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scrolling: yes | |
license: MIT |
Built with blockbuilder.org
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"AK": [0, 0], | |
"HI": [0, 7], | |
"WA": [1, 2], | |
"OR": [1, 3], | |
"CA": [1, 4], | |
"ID": [2, 2], | |
"UT": [2, 3], | |
"NV": [2, 4], | |
"AZ": [2, 5], |
OlderNewer