This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: gh-rename-master <newbranch> [<remote>] | |
# | |
# Renames the "master" branch of the current repository both locally and on GitHub. | |
# | |
# dependencies: GitHub CLI v0.10 | |
set -e | |
newbranch="${1?}" | |
remote="${2:-origin}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to uninstall Razer Synapse 2 ( https://www.razerzone.com/synapse-2 ) | |
# on OS X (10.11-10.13) (El Capitan, Sierra, High Sierra) | |
# without using Razer's official uninstall tool. | |
# Tested on OS X 10.11.5 in July 2016. | |
# Edited with additional steps for later OS X versions, | |
# contributed by commenters on this gist. | |
# Step 1: In your terminal: stop and remove launch agents | |
launchctl remove com.razer.rzupdater |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Depends on AWK, SED, and OSX's open command. | |
function github() { | |
local github_url | |
if ! git remote -v >/dev/null; then | |
return 1 | |
fi | |
# get remotes for fetch | |
github_url="`git remote -v | grep github\.com | grep \(fetch\)$`" |