This file contains hidden or 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 | |
$ip = (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; | |
if($ip === '###IP###') { | |
dump(__FUNCTION__ .' / '. __FILE__ .' / '. __LINE__); | |
} |
This file contains hidden or 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 | |
git diff --cached --name-status --diff-filter=ACMR | while read STATUS FILE; do | |
if [[ "$FILE" =~ ^.+(php|inc)$ ]]; then | |
php -l "$FILE" 1> /dev/null | |
if [ $? -ne 0 ]; then | |
echo "Aborting commit due to files with syntax errors" >&2 | |
exit 1 | |
fi | |
fi |
This file contains hidden or 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
# Configure colors, if available. | |
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then | |
c_reset='\[\e[0m\]' | |
c_user='\[\e[1;33m\]' | |
c_path='\[\e[0;33m\]' | |
c_git_cleancleann='\[\e[0;36m\]' | |
c_git_dirty='\[\e[0;35m\]' | |
else | |
c_reset= | |
c_user= |
NewerOlder