Skip to content

Instantly share code, notes, and snippets.


Joseph Finlayson josephfinlayson

View GitHub Profile
jschr / 01-migrate-db.config
Last active Feb 7, 2020
.ebextension file and package.json for migrating a db with knex migrate cli and a single docker container beanstalk app
View 01-migrate-db.config
command: >
docker run -e "DB_HOST=${DB_HOST}" -e "DB_PORT=${DB_PORT}" -e "DB_NAME=${DB_NAME}" -e "DB_USER=${DB_USER}" -e "DB_PASSWORD=${DB_PASSWORD}" aws_beanstalk/staging-app:latest npm run db:migration:run
leader_only: true
staltz /
Last active Mar 9, 2021
The introduction to Reactive Programming you've been missing
bennofs / profunctors.lhs
Created Apr 11, 2014
Profunctor lenses
View profunctors.lhs
Profunctor lenses
First, we enable the RankNTypes extension which gives us 'forall' and also import some modules:
> {-# LANGUAGE RankNTypes #-}
> module ProfunctorLenses where
> import Data.Profunctor
> import Data.Tagged
> import Data.Bifunctor
branneman /
Last active Mar 6, 2021
Better local require() paths for Node.js

Better local require() paths for Node.js


When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

JeffreyWay / PhotoApiTest.php
Created May 21, 2013
Testing APIs in Laravel. Thoughts?
View PhotoApiTest.php
class PhotoApiTest extends TestCase {
public function setUp()
jharjono /
Created Aug 20, 2011
Python script to clone all watched repos that a user is watching on Github
#!/usr/bin/env python
# Script to clone all the github repos that a user is watching
import requests
import json
import subprocess
# Grab all the URLs of the watched repo
user = 'jharjono'
r = requests.get("" % (user))
repos = json.loads(r.content)