Skip to content

Instantly share code, notes, and snippets.


John Martin johnmartin

View GitHub Profile
johnmartin / screens.js
Created Mar 3, 2014
Example CKAN instance screenshot taker
View screens.js
var webshot = require('webshot');
var gm = require('gm');
var options = {
screenSize: {
width: 1015, height: 725
renderDelay: 500
View country-bo.json
"country": "Bolivia",
"code": "BO",
"obi_score": 12,
"obi_year": 2012,
"date_start": "2012-09-01T00:00:00.000Z",
"date_end": "2014-09-01T00:00:00.000Z",
"data": [
"date": "2014-09-01T00:00:00.000Z",
View Scroll Drawing.markdown

Scroll Drawing

As you scroll down, the % scrolled of the document is calculated and that same % of an SVG <path> is drawn.

A Pen by Chris Coyier on CodePen.


johnmartin / base.html
Created Oct 18, 2012
CKAN 2.0 config to JS module
View base.html
{% ckan_extends %}
{% block styles %}
{{ super() }}
<div class="js-hide" data-module="google-analytics" data-module-sitetitle="{{ config['ckan.site_title'] }}"></div>
{% endblock %}
johnmartin / example.html
Created Oct 23, 2012
Dataset list with popover examples
View example.html
<p>This is a list of <a href="#datasetgroup-1" data-module="popover-list">5 datasets</a>.
Imagine there is more text here and it carries on in a paragraph.</p>
<p id="datasetgroup-1" class="js-hide">Everything in this paragraph
should appear within the popover.</p>
johnmartin / gulpfile.js
Created Feb 4, 2016
Fixing icon font generation for Sketch 3.5
View gulpfile.js
var gulp = require("gulp");
var del = require("del");
var rename = require("gulp-rename");
var sketch = require("gulp-sketch");
var iconfont = require("gulp-iconfont");
var consolidate = require("gulp-consolidate");
gulp.task("icons", function () {
del("./dist/", { force: true });
var svg = gulp.src("./icons.sketch")

Keybase proof

I hereby claim:

  • I am johnmartin on github.
  • I am johnmartin ( on keybase.
  • I have a public key ASBk1CMlQdaXLy0XNcempZ8whayWEVzm5PuBm05_sZMD2Qo

To claim this, I am signing this object:

You can’t perform that action at this time.