Skip to content

Instantly share code, notes, and snippets.

@dustMason
dustMason / STDERR
Created May 30, 2014 00:17
s3 tar streamer attempt
events.js:72
throw er; // Unhandled 'error' event
^
Error: write after end
at writeAfterEnd (_stream_writable.js:133:12)
at WriteStream.Writable.write (_stream_writable.js:181:5)
at Pack.<anonymous> (/Users/jordan/Code/nuts.com/image-archiver/node_modules/knox-mpu/lib/multipartupload.js:246:28)
at Pack.EventEmitter.emit (events.js:95:17)
at EntryWriter.<anonymous> (/Users/jordan/Code/nuts.com/image-archiver/node_modules/tar/lib/pack.js:191:8)
at EntryWriter.EventEmitter.emit (events.js:95:17)
@dustMason
dustMason / Streamer.js
Created May 30, 2014 06:20
Streamer.js
var knox = require("knox");
var mpu = require("knox-mpu");
var s3lister = require("s3-lister");
var async = require("async");
var fs = require("fs");
var archiver = require("archiver");
var client = knox.createClient({
key: process.env.S3_ACCESS_KEY_ID,
secret: process.env.S3_SECRET_KEY,
@dustMason
dustMason / gulpfile.js
Last active August 29, 2015 14:11
Gulp / Browserify
...
var makeScriptBundler = function(options) {
var cache = {};
// load the cache from disk
if (fs.existsSync(options.cache)) { cache = require(options.cache); }
var mainScriptPackageCache = {};
var bundler = browserify({
entries: options.entries,
extensions: ['.coffee'],
@dustMason
dustMason / knob.scad
Last active August 29, 2015 14:14
OpenSCAD Knobber Jobber Epcot Flavor
knob_radius = 24;
knob();
module knob() {
union() {
difference() {
sphere(r=knob_radius);
translate([0, 0, 0-(knob_radius)]) {
cylinder(r1=knob_radius, r2=knob_radius, h=knob_radius);
@dustMason
dustMason / money.rb
Last active January 13, 2017 01:39 — forked from dkubb/money.rb
A modern ruby Money class, for ActiveShipping?
require 'bigdecimal'
module ActiveShipping #:nodoc:
class Money
SCALE = 2
OPERAND_CLASSES = [self, Rational, BigDecimal, Integer].freeze
attr_reader :amount
protected :amount
@dustMason
dustMason / AAPL.csv Sample
Last active March 7, 2017 17:50
Zipline Ingest
201601040931,99.943432886,99.943432886,99.3492852,99.417466082,2239086.0
201601040932,99.407725956,99.758370492,99.359025326,99.680449484,206005.0
...
# Arbotunity Report Apr 21, 5:13:20 PM
Commissions:
- polo: 0.25%
- gdax: 0.00%
- btrx: 0.25%
- kraken: 0.10%
Arbo | Asset | Buy On | Buy @ | Qty | Sell On | Sell @ | Fee | Profit

Arbotunity Report Apr 21, 5:14:23 PM

Commissions:

  • polo: 0.25%
  • kraken: 0.10%
  • gdax: 0.00%
  • btrx: 0.25%

Arbo | Asset | Buy On | Buy @ | Qty | Sell On | Sell @ | Fee | Profit

Arbotunity Report Apr 21, 5:14:39 PM

Commissions:

  • btrx: 0.25%
  • gdax: 0.00%
  • polo: 0.25%
  • kraken: 0.10%

Arbo | Asset | Buy On | Buy @ | Qty | Sell On | Sell @ | Fee | Profit

Arbotunity Report Apr 21, 5:15:04 PM

Commissions:

  • polo: 0.25%
  • kraken: 0.10%
  • gdax: 0.00%
  • btrx: 0.25%

Arbo | Asset | Buy On | Buy @ | Qty | Sell On | Sell @ | Fee | Profit