Skip to content

Instantly share code, notes, and snippets.

View vjwilson's full-sized avatar

Van Wilson vjwilson

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@vjwilson
vjwilson / .block
Created April 7, 2019 21:58
pie chart browser usage
license: mit
@vjwilson
vjwilson / .block
Last active April 27, 2019 16:31
pie chart repos by language
license: mit
@vjwilson
vjwilson / .block
Last active March 31, 2019 21:43
Altitudes in North Carolina
license: mit
@vjwilson
vjwilson / .block
Last active March 23, 2019 12:42
d3js Elevation profile - Ratio automatically chosen
license: mit
@vjwilson
vjwilson / .block
Created March 2, 2019 14:19
Redistricting
license: mit
@vjwilson
vjwilson / .block
Created March 1, 2019 12:49
New Jersey State Plane
license: gpl-3.0
height: 1200
@vjwilson
vjwilson / .block
Last active March 31, 2019 21:43
city temps example
license: mit
@vjwilson
vjwilson / front-end-testing-example.js
Created August 3, 2018 15:15
Testing a JavaScript framework on-the-cheap, with no test framework or test runner
if (getTimeRemaining(new Date('2018-07-29T03:24:45'), new Date('2018-07-29T03:24:45')) != '00:00') {
throw new Error('should return no time if end time is the same as the current time');
}
if (getTimeRemaining(new Date('2018-07-29T03:24:45'), new Date('2018-07-29T03:24:12')) !== '00:33') {
throw new Error('should returning the time difference when subtracting the second arg from the first');
}
if (getTimeRemaining(new Date('2018-07-29T03:24:45'), new Date('2018-07-29T03:04:36')) !== '20:09') {
throw new Error('should returning a time difference that includes minutes and seconds');
@vjwilson
vjwilson / componentGenerator.js
Created October 15, 2017 17:58
node script to copy create a component folder, with component, test, SASS, and doc files)
/*
* @usage
* 1.) create a folder with skeletons files for the file you want for you component
* 2.) put the following line in the npm scripts section of your package.json
* "generate:component": "babel-node helpers/componentGenerator.js"
* 3.) To generate a component, run the script with the new component name as argument
* e.g.,
* npm run generate:component seating-chart
*
* will start a new component at