Skip to content

Instantly share code, notes, and snippets.

View lelandcope's full-sized avatar

Leland Cope lelandcope

  • Los Angeles, Ca
View GitHub Profile
@lelandcope
lelandcope / .git-commit-template.txt
Last active October 12, 2018 18:56 — forked from adeekshith/.git-commit-template.txt
This commit message template helps you write great commit messages and enforce it across teams.
# <type>(<feature>): <subject> (Max 50 char)
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
# --- COMMIT END ---
# Type can be
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 14,
// font family with optional fallbacks
@lelandcope
lelandcope / gist:74ca06ac6cad89ce28b3
Last active August 29, 2015 14:24
Connect Mongo Shell to MongoDB Replica Set
mongo --host replicaSetName/host1[:porthost1],host2[:porthost1],host3[:porthost3] databaseToConnect
@lelandcope
lelandcope / gist:50cb1f98d02472f5c0dc
Created July 3, 2015 00:36
AngularJS Lowercase Directive that will force the input to be lowercased
_module.directive('lowercase', function () {
return {
require: 'ngModel',
link: function ($scope, elem, attrs, ngModelCtrl) {
var lowercase = function (inputValue) {
if(inputValue == undefined) inputValue = '';
var lowercased = inputValue.toLowerCase();
if(lowercased !== inputValue) {
@lelandcope
lelandcope / gulp+browserify
Last active August 29, 2015 14:13
Gulp Browserify Recipe
/*
Credit goes to Hafiz Ismail
https://medium.com/@sogko/gulp-browserify-the-gulp-y-way-bb359b3f9623
*/
var gulp = require('gulp');
var browserify = require('browserify');
var transform = require('vinyl-transform');
var uglify = require('gulp-uglify');
# Node Modules
cluster = require 'cluster'
os = require 'os'
###
Vars
###
stopping = false
cpus = os.cpus().length