Skip to content

Instantly share code, notes, and snippets.

View phillipalexander's full-sized avatar

Phillip Alexander phillipalexander

  • Galvanize
  • San Francisco
View GitHub Profile

L2 protocols

Trust protocols (not always auditable)

  • Full custody (Coinbase)
  • 2-of-3 arbitration / DLC
  • Threshold multisig (ecash, Liquid)
  • Off-chain peg-out tx (statechains)
  • Collateralized custody

Payment channels

View Keybase Proof
### Keybase proof
I hereby claim:
* I am phillipalexander on github.
* I am phillipalexander ( on keybase.
* I have a public key ASA0nBscXSTy2qchk5ZwDhELtTeokE-w72HPdoY__giyPQo
To claim this, I am signing this object:

System Design Cheatsheet

Step One: Framing The Problem

  • Identify the use cases that are in scope
  • Determine constraints based on scoped use cases

use case : the things your system needs to be do.

constraints : the things your system will have to consider to be able to do stuff

phillipalexander /
Created February 4, 2015 05:04

Keybase proof

I hereby claim:

  • I am phillipalexander on github.
  • I am phillipalexander ( on keybase.
  • I have a public key whose fingerprint is FFDF 0A1B B1A8 605F EE6E 0A84 C53B 3118 05B8 2DCF

To claim this, I am signing this object:

View repoUnwatcher.js
* This unwatches any repo that you don't specify.
* It must be run from the console while you are at
* *No need to edit any code - the instructions will prompt you to list out the repos you'd like to keep watching!*
var repo;
var repos = [];
pairs = ( obj ) ->
arr = []
for own key, val of obj when key isnt "id"
arr.push "#{ key }=#{ val}"
arr.join ","
makeORMClass = ( table ) ->
# CoffeeScript syntactic sugar for class creation.
class Model
phillipalexander /
Last active October 15, 2023 18:05
Source Code Search Engines You Can Use For Programming Projects

Source Code Search Engines

NOTE: This list is almost entirely copy/pasted from THIS awesome article. I've made my own personal edits (adding some additional content) which is why I keep it here.

Every day meanpath crawls over 200 million websites capturing the visible text, HTML source code, CSS and Javascript. This information is used by many companies to monitor the growth of web facing technology.

phillipalexander / filterFilesinCWD.js
Created January 27, 2014 17:30
filter files in cwd to js files
View filterFilesinCWD.js
var util = require('util');
var path = require('path');
var fs = require('fs');
var allFiles = fs.readdirSync(process.cwd())
var jsFiles = [];
for (var i = 0; i < allFiles.length ; i++) {
var selectedFile = allFiles[i];
if (selectedFile.substr(selectedFile.length - 3) === '.js') {
phillipalexander / uri.js
Created October 16, 2013 18:52 — forked from jlong/uri.js
View uri.js
var parser = document.createElement('a');
parser.href = "";
parser.protocol; // => "http:"
parser.hostname; // => ""
parser.port; // => "3000"
parser.pathname; // => "/pathname/"; // => "?search=test"
parser.hash; // => "#hash"; // => ""
phillipalexander /
Created October 5, 2013 00:02
Tidy Markdown Refs
import sys
import re
'''Read a Markdown file via standard input and tidy its
reference links. The reference links will be numbered in
the order they appear in the text and placed at the bottom
of the file.'''