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
#!/usr/bin/env bash | |
# Does a git pull for every git repository in a directory and tracks the results | |
# Resolves a relative directory | |
# source: https://stackoverflow.com/questions/7126580/expand-a-possible-relative-path-in-bash | |
function dir_resolve() | |
{ | |
cd "$1" 2>/dev/null || return $? | |
pwd -P |
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
#!/usr/bin/env bash | |
# Creates a new branch locally and links it to the upstream in a remote (defaults to origin) | |
BRANCH="$1" | |
REMOTE="origin" # default value...can be overridden with $2 | |
# make sure a branch name was specified | |
if [ "$1" == "" ]; then | |
echo "Error: the branch name was not specified." |
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
#!/usr/bin/env bash | |
# Checks out the latest hotfix branch based on semver tagging | |
# Output function | |
output () { | |
echo -e "\033[36m\033[1m* $1 \033[0m" | |
return 0; | |
} |
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
#!/usr/bin/env bash | |
# Merges the latest release into the current Git branch (based on semver | |
# tagging). | |
# Get up to date with origin | |
git fetch origin &> /dev/null | |
# Find the latest release tag | |
release=$(git tag --sort=v:refname | grep "^\\d\{1,2\}\.\\d\{1,2\}\.\\d\{1,4\}\$" | tail -1) |
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
#!/usr/bin/env bash | |
# Parses semantic tags from Git and displays the most recent release and the | |
# most recent release candidate | |
# Get up to date with origin | |
git fetch origin &> /dev/null | |
# Find the latest release tag and the latest RC tag | |
release=$(git tag --sort=v:refname | grep "^\\d\{1,4\}\.\\d\{1,4\}\.\\d\{1,4\}\$" | tail -1) |
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
/** | |
* A userscript for Fluid. This script updates the dock badge for a Gmail SSB | |
* to the number of unread messages in the Inbox. | |
* | |
* NOTE: For best results, make sure the User Agent is set to a Safari agent. | |
*/ | |
initialize(); | |
function initialize() { |
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
/** | |
* A userscript for Fluid. This script updates the dock badge for a Google Inbox | |
* SSB to the number of unread messages in the current view. Note that the user | |
* must be navigated to the Inbox, and it will only count unread messages | |
* that are currently displayed on the screen. | |
*/ | |
initialization(); | |
function initialization() { |
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
<?php | |
function renderTemplate($template, $data) { | |
$pad_keys = create_function('$key', 'return "%" . $key . "%";'); | |
$data_keys = array_map($pad_keys, array_keys($data)); | |
$data_values = array_values($data); | |
return str_replace($data_keys, $data_values, $template); | |
} | |
/* |