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
//http://www.r0k.org/enabling-ftpd-in-osx-lion | |
sudo /usr/libexec/ftpd -D | |
//to turn off again | |
sudo killall ftpd |
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
//In site root | |
find . -name 'lock' -exec rm -v {} \; |
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
# backup database | |
mysqldump --opt --user=user --password=password --host=host.com database > file-dd-mm-yy.sql |
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
## -z, --gzip, --gunzip --ungzip | |
## -x extract | |
tar -zxvf filename.tar.gz |
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
#http://stackoverflow.com/questions/6348289/download-a-working-local-copy-of-a-webpage | |
#http://stackoverflow.com/questions/8755229/how-to-download-all-file-from-website-using-wget | |
#http://stackoverflow.com/questions/4272770/wget-with-authentication?rq=1 | |
#add browser headers: | |
#--header="Accept: text/html" --user-agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/30.0" | |
#add .htaccess authentication details: | |
#--password=password --user=user | |
wget -m -p -E -k -K -np http://site/path/ | |
wget -p -k http://ExampleSite.com | |
# and another via Quora https://www.quora.com/How-do-you-export-a-WordPress-site-to-a-static-HTML |
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 | |
NOW=$(date +"%Y-%m-%d-%H%M") | |
BACKUP_DIR_PREFIX="/home/user/backups/backup"; | |
DAYS_TO_LIVE=1 #File should be removed after this period | |
DB_USER="database-user" | |
DB_PASS="database-password" | |
DB_NAME="database-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
//http://www.magentocommerce.com/boards/viewthread/84053/ | |
//Renamed the errors/local.xml.sample file to local.xml | |
// Add to .htaccess | |
SetEnv MAGE_IS_DEVELOPER_MODE "true" |
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
/app/code/core/Mage/Catalog/Model/Product/Flat/Indexer.php | |
/app/code/core/Mage/Catalog/Model/Resource/Helper/Mysql4.php | |
/app/code/core/Mage/Core/Controller/Varien/Router/Default.php | |
/app/code/core/Mage/Core/Helper/File/Storage/Database.php | |
/app/code/core/Mage/Core/Model/Config.php | |
/app/code/core/Mage/Core/Model/Config/Base.php | |
/app/code/core/Mage/Core/Model/Resource/Config.php | |
/app/code/core/Mage/Core/Model/Resource/Helper/Mysql4.php | |
/app/code/core/Mage/Eav/Model/Config.php | |
/app/code/core/Mage/Eav/Model/Resource/Helper/Mysql4.php |
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
// http://unix.stackexchange.com/questions/9247/how-to-list-files-sorted-by-modification-date-recursively-no-stat-command-avail?rq=1 | |
find . -printf '%T@ %c %p\n' | sort -k 1n,1 -k 7 | cut -d' ' -f2- |
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
diff -qr firstupdate/ secondupdate/ | sort | |
diff -a --suppress-common-lines -y #neat to compare them side by side and remove common lines |