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 | |
clear | |
git fetch | |
git reset --hard | |
git checkout master | |
git checkout -- . | |
git clean -fd . | |
rm -rf media | |
git pull |
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
git diff --stat HEAD |
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
git config --list | |
git remote -v | |
git remote set-url origin https://[email protected]/_PATH/TO/REPOSITORY_.git |
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
$ git remote -v | |
$ git remote set-url origin https://[email protected]/organization/repository |
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
User@DESKTOP-QSKO7HF MINGW64 /c/useful-scripts (master) | |
$ echo "alias gch=/c/useful-scripts/git/commit_helper.sh" >> ~/.bashrc | |
$ echo "alias gbu=/c/useful-scripts/git/branch_update.sh" >> ~/.bashrc | |
$ echo "alias gbc=/c/useful-scripts/git/branch_create.sh" >> ~/.bashrc | |
$ echo "alias gcb=/c/useful-scripts/git/branch_create.sh" >> ~/.bashrc | |
User@DESKTOP-QSKO7HF MINGW64 /c/useful-scripts (master) | |
$ cat ~/.bashrc | |
alias gch=/c/useful-scripts/git/commit_helper.sh | |
alias gbu=/c/useful-scripts/git/branch_update.sh |
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
find . -type f | xargs cat | wc -l |
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
tail -n0 -f ../logs/error.log | sed 's/\\n/\n/g' |
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
var sumAdd = 0; | |
var sumRemoved = 0; | |
jQuery('.lines-added').each(function() { | |
sumAdd += parseInt((jQuery(this).html()), 10); | |
}); | |
jQuery('.lines-removed').each(function() { | |
sumRemoved += parseInt((jQuery(this).html()), 10); | |
}); | |
console.log(sumAdd); | |
console.log(sumRemoved); |
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
$allStores = Mage::getModel('core/store') | |
->getCollection() | |
->addFieldToFilter('is_active', ['eq' => 1]) | |
->getAllIds(); | |
var_dump(implode(',', $allStores)); |
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
<?php | |
require_once __DIR__ . '/../abstract.php'; | |
/** | |
* @see https://gist.github.com/werdan/5827225 | |
*/ | |
class Mage_Shell_CronLister extends Mage_Shell_Abstract | |
{ | |
public function run() |
OlderNewer