Skip to content

Instantly share code, notes, and snippets.

Gordon Wintrob gwintrob

Block or report user

Report or block gwintrob

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View example.js
d3.json('geojsoncounties.json', function (err, counties) {
var countyLayer = L.geoJson(counties, {
weight: 5,
color: '#000',
dashArray: '',
fillOpacity: 0.7
});
map.addLayer(countyLayer);
});
@gwintrob
gwintrob / README.md
Last active Nov 26, 2015 — forked from mbostock/.block
Voronoi Arc Map
View README.md

Mouseover to see flights originating at the specified airport. The cool thing about this technique is that the interaction requires zero JavaScript — it’s all done in CSS using the :hover state to toggle visibility of an airport’s associated outgoing flight routes.

@gwintrob
gwintrob / README.md
Created Nov 23, 2015 — forked from mbostock/.block
Voronoi Tessellation
View README.md
@gwintrob
gwintrob / gist:6abc086b2425f3a8d5c8
Created Dec 4, 2014
Delete redis keys with unmatched single quotes
View gist:6abc086b2425f3a8d5c8
redis-cli KEYS 'icc*' | xargs -d '\n' redis-cli DEL
@gwintrob
gwintrob / index.js
Last active Jul 21, 2016
Multiple Nightmare Example
View index.js
var Nightmare = require('nightmare');
var urls = ['http://www.nytimes.com/', 'http://www.gnu.org/'];
function test() {
var nightmare1 = new Nightmare();
var nightmare2 = new Nightmare();
nightmare1
.goto(urls[0])
.evaluate(function () {
@gwintrob
gwintrob / index.js
Created Nov 5, 2014
Nightmare Async Example
View index.js
var Nightmare = require('nightmare');
var async = require ('async');
var urls = ['https://segment.com/', 'http://www.nytimes.com/', 'http://www.gnu.org/'];
function test(url, cb) {
console.log('test: ' + url);
var nightmare = new Nightmare();
nightmare
.goto(url)
.evaluate(function () {
View gist:8620847
kill -9 `lsof -i tcp:5858 | awk '{print $2}' | tail -1`
@gwintrob
gwintrob / StripTrailingWhitespaces
Last active Dec 10, 2015
Strip trailing whitespace in Vim
View StripTrailingWhitespaces
fun! <SID>StripTrailingWhitespaces()
let l = line(".")
let c = col(".")
%s/\s\+$//e
call cursor(l, c)
endfun
autocmd FileType c,cpp,java,php,ruby,python autocmd BufWritePre <buffer> :call <SID>StripTrailingWhitespaces()
You can’t perform that action at this time.