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

### Keybase proof
I hereby claim:
* I am phillipalexander on github.
* I am phillipalexander (https://keybase.io/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
phillipalexander / keybase.md
Created February 4, 2015 05:04
keybase.md

Keybase proof

I hereby claim:

  • I am phillipalexander on github.
  • I am phillipalexander (https://keybase.io/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:

/* REPO UNWATCHER
*
* This unwatches any repo that you don't specify.
* It must be run from the console while you are at https://github.com/watching
*
* *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
phillipalexander / SourceCodeSearchEngines.md
Last active October 24, 2024 15:08
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
phillipalexander / filterFilesinCWD.js
Created January 27, 2014 17:30
filter files in cwd to js files
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
phillipalexander / uri.js
Created October 16, 2013 18:52 — forked from jlong/uri.js
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@phillipalexander
phillipalexander / TidyRefs.py
Created October 5, 2013 00:02
Tidy Markdown Refs
#!/usr/bin/python
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.'''