Skip to content

Instantly share code, notes, and snippets.

View joyrexus's full-sized avatar

J. Voigt joyrexus

View GitHub Profile
@joyrexus
joyrexus / README.md
Last active May 21, 2022 07:44
Greiner-Hormann algorithm

I've heard a number of people praise the Greiner-Hormann algorithm for clipping arbitrary polygons. They say it has a certain conceptual simplicity and elegance.

@jasondavies is utilizing Greiner-Hormann for D3's polygon clipping operations (2D and spherical). He recently gave a demo of boolean operations on polygons based on as-of-yet unreleased work here.

His earlier clipping demos can be found here and here.

@w8r has a nice, clean implementation of the algorithm for 2D clipping operations with no dependencies. He provides an adapter for clipping polygon regions defin

@joyrexus
joyrexus / README.md
Created December 3, 2014 03:04
The 3 great virtues of a programmer

The three great virtues of a programmer (per Larry Wall)


Laziness

The quality that makes you go to great effort to reduce overall energy expenditure. It makes you write labor-saving programs that other people will find useful and document what you wrote so you don't have to answer so many questions about it.

Impatience

@joyrexus
joyrexus / functions.sh
Last active August 29, 2015 14:09
A few shell functions
# Show all declared functions
funcs () {
declare -f
}
# Show all declared function names (omitting underscored stuff)
functions () {
declare -F | grep -v _
}
@joyrexus
joyrexus / README.md
Last active August 29, 2015 14:09
KaTeX demo

Quick tire kick of KaTeX.

npm install
npm run demo
@joyrexus
joyrexus / README.md
Last active August 29, 2015 14:08
regex testing

Regex Testing

One way to deal with building and testing complex regular expressions is to break the overall pattern into component pieces, each of which can be tested individually.

Here's one example of a complex pattern and it's componentization:

@joyrexus
joyrexus / README.md
Created November 3, 2014 02:53
thru streams
@joyrexus
joyrexus / README.md
Last active November 4, 2021 07:15
crossfilter ui for timeseries data

The aim is to develop a simple generic crossfilter interface for timeseries data. The tag line for crossfilter applies: we want fast multidimensional filtering with coordinated views.

We'd like a consistent ui for visualizing/querying/filtering all columns with visual summarizers/selectors appropriate to a column's type (e.g., brushable histograms for numeric types, selectable histograms for enumerated types, typeahead keyword search for text, etc.).

I'd like it to be useful primarily as a table filter and query tool, but provide simple summary visualizations and statistics of the current selection. As in the various crossfilter demos, any data visualization should also function as part of the query interface.

@joyrexus
joyrexus / README.md
Last active August 29, 2015 14:07
questions about the dat project

big-picture questions for dat

  • Is there a preferred way to include schema definitions with a dat?

  • How might one handle datasets with multiple related tables?

  • Do you see dat as similar to Qu in its longer term ambitions? Complementary?

Notes

@joyrexus
joyrexus / README.md
Last active August 29, 2015 14:07
js notebooks

pure js variant of ipython notebook

  • i.js - IPython-inspired js environment
  • atom-shell - node.js apis that let you access local system resources from web pages
@joyrexus
joyrexus / README.md
Created October 21, 2014 20:12
12-factor design w/ heroku-style deployment