Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
## https://gist.github.com/eminence/85961d47244a140fde89314837d0db0a
set -e
PWD=`pwd`
DD=$PWD/downloads/ # Download Directory
function download {
@simenbrekken
simenbrekken / Store.js
Created March 13, 2014 15:53
Multi format store
var lodash = require('lodash'),
superagent = require('superagent'),
Promise = require('es6-promise').Promise
Store.prototype.get = function(url) {
if (lodash.isArray(url)) {
return Promise.all(lodash.map(url, this.get))
} else if (lodash.isObject(url)) {
return Promise.all(lodash.map(url, function(url, key) {
return this.get(url).then(function(value) {