This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var binary_xhr = require('binary-xhr'); | |
var zlib = require('zlib-browserify'); | |
binary_xhr('data.gz', function(e, data){ | |
zlib.gunzip(new Uint8Array(data), function(e, result){ | |
console.log(e, result); // e: undefined, result: Buffer {0: 80, 1: 75, 2: 3, 3: 4, 4: 20...} | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'csv' | |
require 'pry' | |
desc "Dump a representative set of test/dev data" | |
task :dump => :environment do | |
#Load models so they are available for the ActiveRecord::Base.descendants call | |
Dir.foreach("#{Rails.root}/app/models") do |f| | |
require f if f =~ /.*\.rb/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "flare", | |
"children": [ | |
{ | |
"name": "analytics", | |
"children": [ | |
{ | |
"name": "cluster", | |
"children": [ | |
{"name": "AgglomerativeCluster", "size": 3938}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(exports){ | |
fetchGzipped = function(url, cb){ | |
var req = new XMLHttpRequest() | |
req.open('GET', url, true) | |
req.responseType = 'arraybuffer' | |
req.onload = function(){ | |
gzdata = new Uint8Array(req.response) | |
data = (new Zlib.Gunzip(gzdata)).decompress() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Add space for double click highlight in imo.im | |
// @namespace http://imo.im | |
// @version 0.1 | |
// @description add a space before imo.im posts so double click highlight is functional | |
// @match https://imo.im | |
// @copyright 2012+, @jakl | |
// ==/UserScript== | |
setTimeout(function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "flare", | |
"children": [ | |
{ | |
"name": "analytics", | |
"children": [ | |
{ | |
"name": "cluster", | |
"children": [ | |
{"name": "AgglomerativeCluster", "size": 3938}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env coffee | |
argf = new (require './argf.js')() | |
md5 = require 'md5' | |
HASH = '12345678123456781234567812345678' | |
argf.forEach (line)-> | |
if md5.digest_s(line.replace('\\n', '\n')) is HASH | |
console.log line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// require something | |
require('twitter-text') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style type='text/css'> html, body { margin: 0; padding: 0; border: 0; } </style> |