Skip to content

Instantly share code, notes, and snippets.

View anandthakker's full-sized avatar

Anand Thakker anandthakker

View GitHub Profile
@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)
@mixin min-width-query($size) {
@media screen and (min-width: $size) { @content; }
}
/**
* Media query shorthand. Usage:
*
* @include mq([condition1], [condition2], [condition3], [...]) {
* // the stuff that should happen under the given conditions.
* }
@anandthakker
anandthakker / index.js
Created March 7, 2015 02:24
Twitter search API test
// Usage: node index.js "twitter search string"
var request = require('request');
// Grab a bearer token using application-only auth
// (doc: https://dev.twitter.com/oauth/application-only)
Loading
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')
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.