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
| ## Terminal :: Retrieve a Postgresql dump from a remote server | |
| ssh user@host "pg_dump db_name | gzip" | gunzip > db_name.sql |
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
| ## Terminal :: Replace deprecated concat-binding with concat | |
| grep -Rl "concat\(.*binding\)" * --exclude=*.{svn,log,svn-base} | \ | |
| xargs sed -e 's/concat(\(.*\),binding)/concat \1/g' -i .tmp |
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
| ## Subversion :: Remove unversioned files from working copy | |
| svn status --no-ignore | grep '^\?' | sed 's/^\? //' | xargs rm -rf |
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
| ## Terminal :: Recursively remove tmp files | |
| find . -name "*.tmp" -exec rm -rf {} \; |
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
| ## Terminal :: Search for and replace text in a file | |
| grep -Rl "locals\[" * --exclude=*.{svn,log,svn-base} | \ | |
| xargs sed -e 's/locals\[/local_assigns\[/g' -i .tmp |