Skip to content

Instantly share code, notes, and snippets.

Colton Baker Southern

  • NC, USA
Block or report user

Report or block Southern

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

Keybase proof

I hereby claim:

  • I am southern on github.
  • I am sly ( on keybase.
  • I have a public key whose fingerprint is 44A5 899D 94E3 9879 75C0 3B92 725A FD11 9B01 CFC4

To claim this, I am signing this object:

View gist:5076583
~ ❱ npm show mongoose versions
[ '0.0.1',
View connectRedis.js
REDIS_URL = process.env.REDIS_URL || 'redis://localhost:6379'; // global const for redis
var connection = require("url").parse(REDIS_URL); // parse redis url
REDIS_PARAMS = {}; // global const for redis connection settings, also used by
REDIS_PARAMS.port = connection.port; = connection.hostname;
// connect to redis so we can put the express session there
var client = redis.createClient(REDIS_PARAMS.port,;
if ( connection.auth ) {
View gist:4093608
[808/895] CXX obj/deps/v8/src/
ninja: build stopped: subcommand failed.
make: *** [node] Error 1
View .bash_profile
### Random terminal colors
# Assign _PS1, _PS2, and _PS3 arrays
# Orange
'\[\e[38;5;208m\] \w $(__git_ps1 "\[\e[38;5;166m\]%s ")\[\e[38;5;202m\]❱ \[\e[0m\]'
# Blue
'\[\e[38;5;45m\] \w $(__git_ps1 "\[\e[38;5;39m\]%s ")\[\e[38;5;33m\]❱ \[\e[0m\]'
Southern / phonenumber.js
Last active Oct 11, 2015
Phone Number Validator
View phonenumber.js
// Remap `exports` to `window` if `exports` doesn't exist.
if (!exports) var exports = window;
// Regex to match numbers to.
var REGEX = /^\(?(?=\d{3})(\d{3})[).\-\s]*(\d{3})[.\-\s]*(\d{4})$/;
String.prototype.replace = (function(orig) {
return function(replace, replacement) {
// Allow arrays to be used.
if (replace instanceof Array) {
View gist:3642328
function findHandler(err, docs) {
if (!err) {
// Return Success & JSON Content-type
var length = docs.length;
// Process results from Mongo
docs.forEach(function(e,i,a) {
You can’t perform that action at this time.