Skip to content

Instantly share code, notes, and snippets.

open Pom;
type middleware('context, 'result) =
(Express.Request.t, Express.Response.t, 'context) =>
pomWithError('result, Express.complete);
type handler('context) =
(Express.Request.t, Express.Response.t, 'context) => pom(Express.complete);
let _onError500 =

Keybase proof

I hereby claim:

  • I am mrmurphy on github.
  • I am murphyrandle (https://keybase.io/murphyrandle) on keybase.
  • I have a public key whose fingerprint is 3507 3BDF F37D 7B17 C16B B354 2904 F387 57B7 F1BB

To claim this, I am signing this object:

@mrmurphy
mrmurphy / ynab_to_db.js
Created February 23, 2019 05:10
A little program to save your YNAB transactions to a SQLite Database for fast and easy querying
const ynab = require("ynab");
const SQL = require("sql-template-strings");
const sqlite = require("sqlite");
let personalAccessToken = process.env.YNAB_ACCESS_TOKEN;
let client = new ynab.API(personalAccessToken);
async function go() {
const db = await sqlite.open("./transactions.sqlite");
@mrmurphy
mrmurphy / gist:2974955
Created June 22, 2012 20:20
Import all references from Maya
import pymel.core as pm
def importAllReferences():
print("Importing all references...")
done = False
while (done == False and (len(pm.listReferences()) != 0)):
refs = pm.listReferences()
print("Importing " + str(len(refs)) + " references.")
for ref in refs:
if ref.isLoaded():
done = False
type queryBuilder;
type t = (. string) => queryBuilder;
type querySql('options) = {
.
"method": string,
"options": 'options,
"bindings": array(string),
"sql": string,
@mrmurphy
mrmurphy / Handler.re
Created August 7, 2018 17:04
Type Safe Reason Express Handlers
/* Prom is a library that provides
<$> (map)
and
>>= (bind, or flatMap)
for promises.
*/
open Prom;
/*
A Handler is a more functional and type-safe way of dealing with composable "middleware" in the express chain.
Verifying my Blockstack ID is secured with the address 18Fj9tXaLucYW57miX6oteLJaN8AHcgDkq https://explorer.blockstack.org/address/18Fj9tXaLucYW57miX6oteLJaN8AHcgDkq

dayone.me

  • Log in to dayone.me
  • Log in to dayone.me with apple auth
  • Forgot password?
  • Create account
  • Link Apple ID
  • Unlink Apple ID
  • Change Password
  • Change Email Address
  • Add email address (apple only accounts)
@mrmurphy
mrmurphy / gist:5833589
Created June 21, 2013 19:14
A little python script to find a .venv file in a parent directory and activate that virtual environment. Requirements: virtualenv virtualenvwrapper Notes: Does not search above the user's home directory.
#! /usr/bin/python
import os
HOME = os.getenv("HOME")
VENVDIR = os.path.join(HOME, ".venvs") # <-- Change this to your venv dir.
VENVFILENAME = ".venv"
def main():
pwd = os.getcwd().split(os.sep)