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 | |
// app/etc/env.php | |
return [ | |
// ... | |
'system' => [ | |
'default' => [ | |
'admin' => [ | |
'security' => [ | |
'session_lifetime' => 31536000, | |
'password_reset_protection_type' => 0, |
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::getConfig()->saveConfig(Bitbull_Multiwarehouse_Helper_Data::XML_PATH_GENERAL_ACTIVE, 1); | |
Mage::getConfig()->cleanCache(); |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 | |
ip addr show eno1 | grep -oPi 'inet \K[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' |
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 | |
# use --no-ansi to avoid color characters | |
message=$(bin/magento setup:db:status --no-ansi) | |
if [[ ${message:0:3} == "All" ]]; | |
then | |
exit 0 # 0 not required being default exit code; used for clarity | |
else | |
exit 1 | |
fi |
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 | |
try { | |
require __DIR__ . '/app/bootstrap.php'; | |
} catch (\Exception $e) { | |
echo $e->getMessage() . PHP_EOL; | |
exit(1); | |
} | |
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER); | |
/** @var \Magento\Framework\App\Http $app */ |
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 | |
function help { | |
echo "Arguments:" | |
echo " package name" | |
echo " package description" | |
} | |
dir=$(pwd) |
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 -name 'config.xml' -exec xmllint --noout {} \; |
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
alias xdebugon='export XDEBUG_CONFIG="idekey=phpstorm-xdebug" && sudo mv /etc/php5/mods-available/xdebug.ini.no /etc/php5/mods-available/xdebug.ini && sudo service apache2 restart' | |
alias xdebugoff='sudo mv /etc/php5/mods-available/xdebug.ini /etc/php5/mods-available/xdebug.ini.no && sudo service apache2 restart' |
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 | |
# Requirements: patchutils - Utilities to work with patches | |
# Credits: http://inchoo.net/magento/quickly-check-if-magento-core-files-are-modified/ | |
if [ $# -ne 2 ]; then | |
echo "Usage:" | |
echo "heydidyoujusteditthecore.sh <default_sacred_core_folder> <clients_core_folder>" | |
exit 1 | |
fi | |
default_sacred_core_folder="$1" |
NewerOlder