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
[alias] | |
tracking = "!f() { git for-each-ref --format '%(refname:short):%(upstream:short)' 'refs/heads' | egrep -v ':$'; }; f" | |
is-clean-workdir = "!f() { git diff --stat --exit-code || { echo \"Workdir dirty\"; exit 1; }; }; f" | |
is-clean-index = "!f() { git diff --stat --cached --exit-code || { echo \"Index dirty\"; exit 2; }; }; f" | |
is-clean = "!f() { git is-clean-workdir && git is-clean-index; }; f" | |
co-merge = "!f() { local=\"$1\"; remote=\"$2\"; git checkout \"$local\"; git merge --ff-only \"$remote\"; }; f" | |
current-branch = rev-parse --abbrev-ref HEAD | |
sync = "!f() { git is-clean || { echo Aborting sync.; exit 1; }; current=$(git current-branch); git fetch --all; git tracking | while IFS=: read local remote; do echo \"Merging $local with $remote\"; git co-merge \"$local\" \"$remote\"; done 3>&1 1>&2 2>&3 | egrep -i --color 'fatal|$' 3>&1 1>&2 2>&3; git checkout \"$current\"; }; f" |
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 | |
# spotify_platform_oauth.sh | |
# | |
# A script to quickly and easily generate Spotify oauth tokens given a client | |
# id, secret, and scope. Will authenticate a user via the browser. | |
# The app must have "http://localhost:8082/' as a redirect_uri | |
# spotify_client_creds.json should contain a spotify client id and secret pair |
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
<label for="country">Country</label><span style="color: red !important; display: inline; float: none;">*</span> | |
<select id="country" name="country" class="form-control"> | |
<option value="Afghanistan">Afghanistan</option> | |
<option value="Åland Islands">Åland Islands</option> | |
<option value="Albania">Albania</option> | |
<option value="Algeria">Algeria</option> | |
<option value="American Samoa">American Samoa</option> | |
<option value="Andorra">Andorra</option> | |
<option value="Angola">Angola</option> |
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
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |