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
#Sample circle.yml for deploying a rails app to deis | |
machine: | |
pre: | |
# install the deis cli | |
- curl -sSL http://deis.io/deis-cli/install-v2.sh | bash | |
- sudo mv $PWD/deis /usr/local/bin/deis | |
deployment: | |
staging: | |
branch: master | |
commands: |
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
while true; do | |
git commit --allow-empty | |
git push | |
done |
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 | |
/** | |
* Class DateTimeComparator | |
* | |
* Custom Comparator for PHPUnit to compare two DateTime objects | |
* The default object comparator will report some DateTime object pairs | |
* as not equal even if they are canonically equal because the object | |
* comparator looks a exact object field values. A DateTime object | |
* can have multiple timezone values that represent the same timezone | |
* however. This comparator compares the object's UTC timestamps |
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 | |
/** | |
* Class Enum | |
* | |
* Encapsulates (as best as PHP can, Enums as a type) | |
* Extend the class and define constants for the valid values | |
* | |
* This class basically mimics SPLEnum from the SPL-Types PECL |
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 | |
/** | |
* Trait OptionTrait | |
* | |
* A trait that will apply option configuration functionality to a class. | |
* Typical use would be to define a constructor which takes in an array | |
* of options and sets them with defaults like so: | |
* |
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
#Install git-core +bash_completion | |
#sudo port install git-core +bash_completion | |
#paste this into your .bash_profile | |
#customize the PS1 variable as desired | |
GIT_PS1_SHOWUPSTREAM="verbose" | |
if [ -f /opt/local/etc/profile.d/bash_completion.sh ]; then | |
. /opt/local/etc/profile.d/bash_completion.sh | |
fi |
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
#Add git information to the bash prompt | |
function parse_git_branch { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
branch=$(git status -sb 2> /dev/null | head -1) | |
echo "($branch)" | |
} | |
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\[\033[0;32m\]" |