Skip to content

Instantly share code, notes, and snippets.

John Mercer jfmercer

Block or report user

Report or block jfmercer

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
@jfmercer
jfmercer / set-os-vars.zsh
Created Sep 14, 2017
sets ENV vars for various operating systems
View set-os-vars.zsh
# Adapted from https://github.com/coto/server-easy-install/blob/master/lib/core.sh
lowercase(){
echo "$1" | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/"
}
####################################################################
# Get System Info
####################################################################
OS=`lowercase \`uname\``
@jfmercer
jfmercer / # mu - 2017-03-22_12-24-20.txt
Created Mar 22, 2017
mu on macOS 10.12.3 - Homebrew build logs
View # mu - 2017-03-22_12-24-20.txt
Homebrew build logs for mu on macOS 10.12.3
Build date: 2017-03-22 12:24:20
@jfmercer
jfmercer / angularjs-providers-explained.md
Created May 4, 2016 — forked from demisx/angularjs-providers-explained.md
AngularJS Providers: Constant/Value/Service/Factory/Decorator/Provider
View angularjs-providers-explained.md
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes

Constant

@jfmercer
jfmercer / Gulpfile.babel.js
Last active Sep 15, 2015 — forked from nateabele/Gulpfile.babel.js
In Search of the One True Gulpfile
View Gulpfile.babel.js
import gulp from 'gulp';
import gif from 'gulp-if';
import smaps from 'gulp-sourcemaps';
import babel from 'gulp-babel';
import concat from 'gulp-concat';
import uglify from 'gulp-uglify';
import jas from 'gulp-jasmine';
import conn from 'gulp-connect';
import yargs from 'yargs';
import config from './package.json';
@jfmercer
jfmercer / Gulpfile.js
Last active Aug 29, 2015 — forked from laracasts/Gulpfile.js
Automated PHPSpec tests with Gulp
View Gulpfile.js
var gulp = require('gulp');
var phpspec = require('gulp-phpspec');
var run = require('gulp-run');
var notify = require('gulp-notify');
var plumber = require('gulp-plumber');
gulp.task('test', function() {
gulp.src('spec/**/*.php')
.pipe(plumber())
.pipe(run('clear').exec())
@jfmercer
jfmercer / brew-install-phps.sh
Created May 2, 2015
Homebrew: Install All the PHPs
View brew-install-phps.sh
brew install php53 --with-mssql && brew unlink php53 && brew install php54 --with-mssql --with-phpdebug && brew unlink php54 && brew install php55 --with-mssql --with-phpdebug && brew unlink php55 && brew install php56 --with-mssql --with-phpdebug && brew unlink php56 && brew link php53 && brew install php53-mcrypt php53-oauth php53-pdo-dblib php53-xdebug && brew unlink php53 && brew link php54 && brew install php54-mcrypt php54-oauth php54-pdo-dblib php54-xdebug && brew unlink php54 && brew link php55 && brew install php55-mcrypt php55-oauth php55-xdebug && brew unlink php55 && brew link php56 && brew install php56-mcrypt php56-oauth php56-xdebug
View keybase.md

Keybase proof

I hereby claim:

  • I am jfmercer on github.
  • I am jfmercer (https://keybase.io/jfmercer) on keybase.
  • I have a public key ASBFTvdiUZyoFayCO3rblfiEBb7fk99XzywK_PwSij8dpgo

To claim this, I am signing this object:

View tmux_local_install.sh
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=1.8
@jfmercer
jfmercer / prime_numbers.js
Created Dec 6, 2011
Simple Prime Number Test in node.js and express
View prime_numbers.js
//
// Created by John F. Mercer on Monday, December 5, 2011
// john.f.mercer@gmail.com
//
// tested on node 0.6.4 and express 2.5.1
//
var express = require('express'),
app = express.createServer();
app.use(express.logger());
You can’t perform that action at this time.