Skip to content

Instantly share code, notes, and snippets.

Joseph Finlayson josephfinlayson

Block or report user

Report or block josephfinlayson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jschr
jschr / 01-migrate-db.config
Last active May 29, 2019
.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
container_commands:
migrate_db:
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
staltz / introrx.md
Last active Oct 14, 2019
The introduction to Reactive Programming you've been missing
View introrx.md
@bennofs
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
branneman / better-nodejs-require-paths.md
Last active Oct 13, 2019
Better local require() paths for Node.js
View better-nodejs-require-paths.md

Better local require() paths for Node.js

Problem

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
JeffreyWay / PhotoApiTest.php
Created May 21, 2013
Testing APIs in Laravel. Thoughts?
View PhotoApiTest.php
<?php
class PhotoApiTest extends TestCase {
public function setUp()
{
parent::setUp();
Route::enableFilters();
@jharjono
jharjono / watched-repos.py
Created Aug 20, 2011
Python script to clone all watched repos that a user is watching on Github
View watched-repos.py
#!/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("http://github.com/api/v2/json/repos/watched/%s" % (user))
repos = json.loads(r.content)
You can’t perform that action at this time.