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 | |
CURRENT_DIR="$(pwd)" | |
HAS_ERROR="" | |
for file in $(git status -s | grep -E '^[AMU].*\.php$' | awk '{print $2}' | sort | uniq); do | |
if [ "$(php -l $(pwd)/$file 2>&1 | grep 'Parse error')" != "" ]; then | |
HAS_ERROR="1" | |
echo "Syntax errors found: $file" >&2 | |
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
<?php | |
// validate client ip address | |
$allow_ips = [ | |
'::1', | |
'10.0.2.2', | |
'127.0.0.1', | |
'192.168.33.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
<?php | |
$key = 0; | |
switch($key) { | |
case 'one': echo 'one'; break; | |
case 'two': echo 'two'; break; | |
case 'three': echo 'tree'; break; | |
default: echo 'other'; break; | |
} |
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
LANG=en_US.UTF-8 | |
LC_CTYPE=en_US.UTF-8 | |
USER=vagrant | |
LOGNAME=vagrant | |
HOME=/home/vagrant | |
PATH=/usr/local/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games | |
MAIL=/var/mail/vagrant | |
SHELL=/usr/bin/zsh | |
SSH_CLIENT=10.0.2.2 50247 22 | |
SSH_CONNECTION=10.0.2.2 50247 10.0.2.15 22 |
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
noaliases off | |
allexport off | |
noalwayslastprompt off | |
alwaystoend on | |
noappendhistory off | |
autocd on | |
autocontinue off | |
noautolist off | |
noautomenu off | |
autonamedirs on |
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
1='cd +1' | |
2='cd +2' | |
3='cd +3' | |
4='cd +4' | |
5='cd +5' | |
6='cd +6' | |
7='cd +7' | |
8='cd +8' | |
9='cd +9' | |
_=sudo |
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
function import_setting() | |
{ | |
[ -f $1 ] && . $1 | |
} | |
for f in $HOME/.zsh.d/* ; do | |
import_setting $f | |
done | |
if [ $commands[brew] ]; then |
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 | |
function git_clone() | |
{ | |
[ -z "$ZSH" ] && return | |
url=https://gist.github.com/$1.git | |
name=$2 | |
path=$ZSH/custom/plugins/$name |
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
## | |
# bash completion support for tig | |
# | |
# Copyright (C) 2007-2010 Jonas fonseca | |
# Copyright (C) 2006,2007 Shawn Pearce | |
# | |
# Based git's git-completion.sh: http://repo.or.cz/w/git/fastimport.git | |
# | |
# The contained completion routines provide support for completing: | |
# |
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
# vim: ft=sh | |
# https://github.com/m4i/cdd | |
if [ -z "$CDD_FILE" ]; then | |
CDD_FILE=~/.cdd | |
fi | |
export CDD_FILE | |
if [ -z "$CDD_AUTO" ]; then | |
CDD_AUTO=1 |