Skip to content

Instantly share code, notes, and snippets.

Phillip Alexander phillipalexander

Block or report user

Report or block phillipalexander

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
View system-design-cheatsheet.md

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

View 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:

View repoUnwatcher.js
/* 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 = [];
View makeORMClass.coffee
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 Feb 20, 2019
Source Code Search Engines You Can Use For Programming Projects
View SourceCodeSearchEngines.md

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.

MeanPath

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.

Ohloh

@phillipalexander
phillipalexander / filterFilesinCWD.js
Created Jan 27, 2014
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') {
View 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"
View TidyRefs.py
#!/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.'''
View clients.md

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 Aug 31, 2013
Banish a file or directory (and any record of it ever existing) from your git repository
View GitBanish.sh
#!/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
You can’t perform that action at this time.