Skip to content

Instantly share code, notes, and snippets.

View monkeycycle's full-sized avatar

Michael Pereira monkeycycle

View GitHub Profile
@monkeycycle
monkeycycle / README.md
Last active February 8, 2016 00:16
blockbuilder Test
#!/bin/bash
PREFIX=$(basename "$1" .pdf)
if [ ! -z "$TESSERACT_FLAGS" ]; then
echo "Picked up TESSERACT_FLAGS: $TESSERACT_FLAGS"
fi
echo "Prefix is: $PREFIX"
echo "Converting to TIFF..."
if command -v parallel >/dev/null 2>&1; then
LAST_PAGE=$(($(pdfinfo "$1"|grep '^Pages:'|awk '{print $2}') - 1))
@monkeycycle
monkeycycle / README.md
Last active March 3, 2016 00:31 — forked from mbostock/.block
Streamgraph

For continuous data such as time series, a streamgraph can be used in place of stacked bars. This example also demonstrates path transitions to interpolate between different layouts. Streamgraph algorithm, colors, and data generation inspired by Byron and Wattenberg.

@monkeycycle
monkeycycle / no-select.scss
Created March 5, 2016 02:22 — forked from nathos/no-select.scss
Sass (SCSS) mixin to disable user-select on an element
@mixin no-select {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
/**
* Installed `jest`, `jest-cli`; ran test with `--no-watchman`
*/
describe('Helpers', function() {
jest.autoMockOff();
var Helpers = require('../helpers');
describe('isFloat', function() {
it('has isFloat as an export', function() {
expect(Helpers.isFloat).not.toBeNull();
@monkeycycle
monkeycycle / index.html
Created April 2, 2016 04:53 — forked from cool-Blue/index.html
stacked bar chart with dynamic axes and labels
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>http://stackoverflow.com/questions/32057842/d3-js-highlighting-stacked-bar-and-getting-selected-values/32079517#32079517</title>
<style>
body {
position: relative;
}
#vis {
@monkeycycle
monkeycycle / README.md
Last active April 2, 2016 23:36
Compound interest calculator with keyed (index) data

Compound Interest Calculator

With keyed (indexed) data/um.

@monkeycycle
monkeycycle / datawrapper-install-instructions-detailed.md
Created July 14, 2016 16:14 — forked from greglinch/datawrapper-install-instructions-detailed.md
Datawrapper set up instructions: Below is a detailed, step-by-step guide for setting up your own installation of Datawrapper, an open-source data visualization tool. Questions? Suggestions? Please let a comment below. Happy installing!
@monkeycycle
monkeycycle / README.md
Created July 21, 2016 20:07 — forked from kpq/README.md
Line charts with dot annotation

Line charts with circles and labels. A demonstration of the technique for a student.

@monkeycycle
monkeycycle / .block
Last active March 27, 2017 20:18 — forked from mbostock/.block
Stacked Bar Chart
license: gpl-3.0