Skip to content

Instantly share code, notes, and snippets.

@sktbrt
sktbrt / redis.js
Last active March 22, 2019 03:22 — forked from rgazelot/redis.js
ShareDB Redis Database Adapter
const Db = require('sharedb').DB;
const Redis = require('redis');
module.exports = class ShareDbRedis extends Db {
constructor (options) {
super(options);
this.client = options.client || Redis.createClient(options);
this.ttl = options.ttl || 60 * 60 * 24;
@sktbrt
sktbrt / dropzone-directive.js
Last active April 16, 2016 10:09 — forked from compact/dropzone-directive.js
AngularJS directive for Dropzone.js
/**
* An AngularJS directive for Dropzone.js, http://www.dropzonejs.com/
*
* Usage:
*
* <div ng-app="app" ng-controller="SomeCtrl as ctrl">
* <button dropzone="ctrl.dropzoneConfig">
* Drag and drop files here or click to upload
* </button>
* </div>