Skip to content

Instantly share code, notes, and snippets.

@lshearer
lshearer / git-new
Last active August 29, 2015 14:02
Git custom commands
#!/bin/sh
# v0.1.0
# Copyright 2014, Lyle Shearer
# MIT License
# https://gist.github.com/lshearer/0d6a8c665a3b075af150
#
# Using http://blog.santosvelasco.com/2012/06/14/extending-git-add-a-custom-command/ as a guideline
#
# Creates a new branch based on a freshly fetched origin/master
@lshearer
lshearer / git-mm
Last active August 29, 2015 14:04
git-mm
#!/bin/sh
# v0.1.0
# Copyright 2014, Lyle Shearer
# MIT License
# https://gist.github.com/lshearer/ebb8a55a7406637cb523
#
# Using http://blog.santosvelasco.com/2012/06/14/extending-git-add-a-custom-command/ as a guideline
#
# Convenience method to fetch and then merge in origin/master to current HEAD
@lshearer
lshearer / update-npm.bat
Last active August 29, 2015 14:16
Update to latest npm on Windows
@echo off
:: Update npm on Windows.
:: Instructions: download this .bat file (location shouldn't matter, but make sure
:: it saves with the .bat extension) and run as administrator.
:: This is essentially solution #3 of https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows,
:: just simplified by complicating things with a batch file :)
:: This approach requires re-running this script for each npm upgrade, but it keeps the