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 php_lint | |
{ | |
for arg in $(seq $#) | |
do | |
# Use find to iterate over directories recursively | |
if [ -d "${!arg}" ]; then | |
find "${!arg}" -name '*.php' -exec php -l "{}" ";" | |
# Just run normal files and symlinks through php -l individually | |
elif [ -f "${!arg}" -o -h "${!arg}" ]; then | |
php -l "${!arg}" |
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 mysqldbs='_() { local h=""; if [ ! -z "$2" ]; then h="-h$2"; fi; echo "show databases;" | mysql -u "$1" "$h" -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
#-------------------------------------------------------- | |
# Simple search and replace utility for git repositories. | |
# @note Use w/ GNU sed. | |
# (c) Nathan Nobbe 2014 | |
# [email protected] | |
# http://quickshiftin.com | |
# $1 - Search | |
# $2 - Replace | |
# $3 - Subdirectory (optional, defaults to cwd) | |
#-------------------------------------------------------- |
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 lastd='echo ~/Downloads/$(ls -t ~/Downloads/ | head -n 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 | |
# author: Thomas Aylott SubtleGradient.com | |
# author: Nathan Nobbe quickshiftin.com | |
# Find out where HEAD is pointing | |
head_ref=$(git show-ref --head -s | head -n 1) | |
# Check to see if transmit tag exists, and get transmit tag hash | |
_transmit_ref=$(git show-ref --verify -s refs/tags/transmit) | |
# If there's not transmit tag, create it for the first time. |
NewerOlder