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
# place in ~/.bash_aliases or ~/.profile or something similar | |
alias svndiffd="svn diff | egrep '(print_r)|(die\()|(error_log)|(debug)|(DEBUG)|(todo)|(TODO)|(console.log)|(alert\()'" |
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
<snippet> | |
<content><![CDATA[ | |
echo('<pre>'); | |
print_r($1); | |
echo('</pre>'); | |
die(); | |
]]></content> | |
<tabTrigger>die</tabTrigger> | |
<scope>source.php</scope> | |
<description>Recursive Die</description> |
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
<snippet> | |
<content><![CDATA[ | |
error_log("\n\n $1 \n\n"); | |
]]></content> | |
<tabTrigger>error</tabTrigger> | |
<scope>source.php</scope> | |
<description>Err Log w Newlines</description> | |
</snippet> |
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
# place in .bash_aliases or similar shell setup file | |
alias elog="tail -f /var/log/httpd/your-error_log | sed -e 's/\\\n/\n/g'" |
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
sed 's/\(.*\)/"\1",/g' FILENAME.EXT |
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 | |
if [[ $# -ne 3 ]]; | |
then | |
echo "USAGE: sh $0 {search_string} {replace_string} {dirname}" | |
exit 1 | |
else | |
echo Searching for $1 and replacing with $2 in all files in directory $3 ... | |
ack -Q -l "$1" $3 | xargs sed -i 's/'"$1"'/'"$2"'/g' | |
echo checking 'SVN stat' of each modified file, and running a PHP lint on each... | |
echo ---------------------------------------------------------------------------- |
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
alias gdifrd="git diff | egrep -i '(puts)|(abort)|(debug)|(byebug)|(alert)|(console.log)|(TODO)'" |
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
# lame encode mp3s in directory to ~200 kbs | |
function lamev2 { for f in *.mp3; do lame -h -V 2 "$f" tmp && mv tmp "$f"; done } |
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
# view 'git diff' in vim | |
alias gdif="git diff | vim -R -" |
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
# 'ls' without ignoring dotfiles, using long list format, in human readable form, and display long ISO format for time | |
alias lsa="ls -alh --time-style=long-iso" |
OlderNewer