Skip to content

Instantly share code, notes, and snippets.

View cjroebuck's full-sized avatar

cjroebuck cjroebuck

View GitHub Profile
@volodymyrprokopyuk
volodymyrprokopyuk / railway_oriented_programming.js
Last active October 6, 2020 04:50
Railway Oriented Programming (JavaScript)
var _ = require('lodash');
var Success = function(success) { this.success = success; };
var Failure = function(failure) { this.failure = failure; };
var bindAll = function(fs) {
var bind = function(res, f) {
return res instanceof Success ? f(res.success) : res;
};
var bindF = function(f) { return _.partial(bind, _, f); };
@urlbox
urlbox / urlbox.py
Last active December 13, 2015 20:38
urlbox python
#!/usr/bin/python
import hmac
from hashlib import sha1
import urllib
def urlbox(key, secret, url, args):
qs = urllib.urlencode(dict(url=url, **args))