Skip to content

Instantly share code, notes, and snippets.

@anandthakker
anandthakker / Baseline-Grid-+-CSS-Background.markdown
Last active August 29, 2015 13:56
Aligning a CSS background grid with the page's typographic grid.
@anandthakker
anandthakker / a-trumpet-problem.js
Last active August 29, 2015 14:05
For some reason, piping this simple trumpet (which selects 'span' but doesn't do anything with them) to stdout works fine, but piping it to a file writestream, it doesn't reach the end...
var trumpet = require('../');
var through = require('through2');
var fs = require('fs');
trumpetBigassFile(process.stdout, "******* success with stdout!");
trumpetBigassFile(fs.createWriteStream('temp.html'), "******* success with file!");
function trumpetBigassFile(writeStream, message) {
@anandthakker
anandthakker / keybase.md
Created September 30, 2014 07:47
Keybase Verification

Keybase proof

I hereby claim:

  • I am anandthakker on github.
  • I am anandthakker (https://keybase.io/anandthakker) on keybase.
  • I have a public key whose fingerprint is 7F94 DE91 B40A 4E3D B43B 6886 F288 30EB 768D D2ED

To claim this, I am signing this object:

module.exports =
class MyPackageView
atom.deserializers.add(this)
constructor: (@data) -> #property assigned
serialize: -> { deserializer: 'MyPackageView', data: @data }
@deserialize: ({data}) -> new MyPackageView(data)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@anandthakker
anandthakker / tiles.js
Created April 15, 2015 14:39
omnivore-to-mbtiles
#!/usr/bin/env node
/**
* Convert the given omnivore-compatible vector source into an mbtiles
* file of vector tiles.
*/
var path = require('path')
var multi = require('multimeter')(process)
var tilelive = require('tilelive')
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env node
/*
* Read a newline-delimited stream of GeoJSON features,
* write a valid GeoJSON FeatureCollection.
*/
var geojsonstream = require('geojson-stream')
var ndjson = require('ndjson')
process.stdin