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
1. git rebase --interactive HEAD~10 | |
2. pick commit and replace `pick` for "child" commits to `s` (it means squash) | |
3. save & force push |
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
[mysql] | |
host= | |
port= | |
user= | |
password= | |
database= |
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
# check if upstream is configured | |
git remote -v | |
git fetch # pull ahead commits from remote | |
git fetch upstream | |
git merge upstream/branch_name | |
git push | |
git log -n 5 |
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 --global alias.cm 'commit -m' | |
git config --global alias.st status |
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
protected function _websiteFilter($collection, $column) | |
{ | |
if (!$value = $column->getFilter()->getValue()) { | |
return $this; | |
} | |
$stores = Mage::app()->getWebsite($value)->getStores(); | |
foreach ($stores as $store) { | |
$collection->addStoreFilter($store); | |
} |
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
env=~/.ssh/agent.env | |
agent_load_env () { test -f "$env" && . "$env" >| /dev/null ; } | |
agent_start () { | |
echo "Starting new SSH agent" | |
(umask 077; ssh-agent >| "$env") | |
. "$env" >| /dev/null ; | |
} |
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() |
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
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
tail -n0 -f ../logs/error.log | sed 's/\\n/\n/g' |