Skip to content

Instantly share code, notes, and snippets.

View phillipalexander's full-sized avatar

Phillip Alexander phillipalexander

  • Galvanize
  • San Francisco
View GitHub Profile
@phillipalexander
phillipalexander / SourceCodeSearchEngines.md
Last active March 17, 2024 12:22
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.

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:
/**
* Annoying.js - How to be an asshole to your users
*
* DO NOT EVER, EVER USE THIS.
*
* Copyright (c) 2011 Kilian Valkhof (kilianvalkhof.com)
* Visit https://gist.github.com/767982 for more information and changelogs.
* Visit http://kilianvalkhof.com/2011/javascript/annoying-js-how-to-be-an-asshole/ for the introduction and weblog
* Check out https://gist.github.com/942745 if you want to annoy developer instead of visitors
*

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 / 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.'''

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support

@phillipalexander
phillipalexander / GitBanish.sh
Created August 31, 2013 20:22
Banish a file or directory (and any record of it ever existing) from your git repository
#!/bin/sh
#####################################################################
# Program: git banish
#####################################################################
# Version: 1.0.0
# Date: 2013-08-31 13:08:23
# Author: Phillip Alexander (github.com/phillipalexander)
#
# Notes: See the excelent github article on this topic for more info
# https://help.github.com/articles/remove-sensitive-data