Skip to content

Instantly share code, notes, and snippets.

View vwochnik's full-sized avatar

Vincent Wochnik vwochnik

View GitHub Profile
@vwochnik
vwochnik / index.html
Created September 28, 2015 18:10
Scss overlay mixin
<html>
<head>
<title>Test</title>
<!-- include stylesheet -->
</head>
<body>
<div class="overlay"></div>
</body>
<!-- include jQyery -->
<!-- include javascript -->
@vwochnik
vwochnik / .block
Created March 4, 2016 13:37 — forked from mbostock/.block
Sunburst Partition
license: gpl-3.0
@vwochnik
vwochnik / .block
Last active March 8, 2016 13:48 — forked from mbostock/.block
Zoomable Sunburst
license: gpl-3.0
@vwochnik
vwochnik / .block
Last active April 12, 2016 07:36
D3 Correlation Matrix
license: mit
@vwochnik
vwochnik / .block
Last active April 12, 2016 11:28
D3.js rectangular selection
license: mit
@vwochnik
vwochnik / aggregate.js
Created April 12, 2016 11:42
Aggregate dataset by ticks
/**
* Aggregates a dataset containing {x,y} values by an array of x-axis ticks
* where the aggregated dataset contains one {x,y} value per specified
* tick.
* @param dataset input dataset of {x,y} values
* @param ticks array of ticks to aggregate by
* @return new dataset containing aggregated {x,y} values
*/
function aggregate(dataset, ticks) {
return _.chain(dataset)
license: mit
@vwochnik
vwochnik / .block
Last active June 13, 2016 12:16 — forked from katsumitakano/index.html
Line Chart with Grid [D3]
license: mit
@vwochnik
vwochnik / storage.js
Created August 25, 2016 09:54
Local Storage getter/setter with expiration
/**
* Retrieves or stores a value inside local storage.
* If only the first parameter is specified, the value is retrieved from local storage.
* If a value to store is specified, maxAge must also be specified after which the value is
* considered invalid and removed during successive retrievals.
* @param name key name to set or retrieve
* @param value value to store
* @param maxAge number of hours until expiration
*/
function storage(name, value, maxAge) {
<!DOCTYPE html>
<meta charset="utf-8">
<h1>Iframe content</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quod doloribus a
modi ullam officia dolore, ea quisquam est. Asperiores, voluptates similique
impedit aperiam, dignissimos nihil possimus itaque ex tenetur laborum!</p>
<p>Quae ipsa, excepturi temporibus ullam quasi corrupti possimus? Unde
provident, non, nulla molestiae veniam reprehenderit soluta. Consequuntur
inventore repellendus numquam, facere, nostrum et officia suscipit fugiat
aperiam modi harum beatae.</p> <p>Corrupti aut aspernatur ut quaerat maiores