Skip to content

Instantly share code, notes, and snippets.

@tonyhschu
tonyhschu / .block
Last active October 7, 2016 02:31
Generating hex grid positions part 2
license: mit
@tonyhschu
tonyhschu / .block
Last active October 3, 2016 02:16
Generating hex grid positions
license: mit
@tonyhschu
tonyhschu / .block
Last active October 1, 2016 21:34
Clock Screensaver Experiment
license: mit
@tonyhschu
tonyhschu / .block
Last active September 17, 2016 18:06
N Dogs Chasing Random Dog
license: mit
@tonyhschu
tonyhschu / state-positions.json
Last active July 31, 2016 23:55
A JSON key map for producing a grid map, based on the one seen here: http://www.bloomberg.com/graphics/2015-pace-of-social-change/
{
"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],
@tonyhschu
tonyhschu / README.md
Last active July 23, 2016 12:02
Time Map

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

@tonyhschu
tonyhschu / README.md
Created July 10, 2016 20:22
fresh block
@tonyhschu
tonyhschu / .block
Last active May 20, 2016 02:37
fresh block
height: 3000
scrolling: yes
@tonyhschu
tonyhschu / react-click-outside.js
Created May 12, 2016 22:45
Closing pop-ups by clicking outside in React
// 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)
}
}
@tonyhschu
tonyhschu / README.md
Last active May 2, 2016 05:12
iris demo

simple csv demo

for the building-blocks intro video