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
grep "HTTP\/...\" 404" nginx-access.log | awk '{ print $16}' | sort | uniq |
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
// This is how you would use it. Pass in your collection | |
// along with an individual callback as well as a batch callback | |
Mage::getSingleton('stcore/resource_iterator_batched')->walk( | |
$collection, | |
array($this, 'batchIndividual'), | |
array($this, 'batchAfter'), | |
self::BATCH_SIZE | |
); | |
public function batchIndividual($model) |
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
# Create the directory | |
cd ~ && mkdir bin | |
cd ~/bin | |
# Install composer | |
curl -s https://getcomposer.org/installer | php | |
# Clone the repo | |
git clone [email protected]:kjordan/magerun.git magerun |
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
# Delete backup files | |
find . -name "*.bak" -exec rm {} \; | |
# Find and mass replace. It creates .bak files, but without the .bak this doesn't work in OSX | |
find . -exec sed -i.bak s/Find/Replace/g {} \; | |
# find and replace | |
ack -l 'Find' | xargs perl -pi -E 's/Find/Replace/g' |
NewerOlder