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
# mage.dev - name of your VM (from cli it can be retrieve by: VBoxManage list vms) | |
# halt VM if running | |
# run the folloving commands | |
# run VM | |
VBoxManage setextradata "mage.dev" VBoxInternal/TM/TSCMode RealTSCOffset | |
VBoxManage setextradata "mage.dev" VBoxInternal/CPUM/SSE4.1 1 | |
VBoxManage setextradata "mage.dev" VBoxInternal/CPUM/SSE4.2 1 |
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
### | |
# | |
# Make magento CLI tool usage with autocomplete | |
# Based on https://github.com/bamarni/symfony-console-autocomplete | |
# | |
## | |
# Step 1 | |
composer global require bamarni/symfony-console-autocomplete |
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 | |
/** | |
* Enable sql profiling for each page. | |
* | |
* Put code to index file in two parts | |
*/ | |
// place it BEFORE application run | |
$profiler = \Magento\Framework\App\ObjectManager::getInstance() | |
->get('Magento\Framework\App\ResourceConnection') |
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
by @kandy | |
git branch -a --merged mainline/develop|grep 'remotes/origin/'|grep -v 'master'|grep -v 'develop'|sed 's/ remotes\/origin\///' |xargs -n1 -I % git push origin :% |
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
class Enum(object): | |
"""Unmodifiable enumeration class supports both sequential and named | |
creation: | |
>>> e = Enum('ZERO', 'ONE', TWO=2, FIVE=5) | |
>>> e.ZERO | |
0 | |
>>> e.ONE | |
1 | |
>>> e.FIVE |