emb-shebshe@emb-ban-297 /var/www/html/bfl-magento/htdocs $ n98-magerun2.phar dev:module:create --help
Usage:
dev:module:create [-m|--minimal] [--add-blocks] [--add-helpers] [--add-models] [--add-setup] [--add-all] [-e|--enable] [--modman] [--add-readme] [--add-composer] [--author-name [AUTHOR-NAME]] [--author-email [AUTHOR-EMAIL]] [--description [DESCRIPTION]] [--] <vendorNamespace> <moduleName>
Arguments:
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
#!/usr/bin/env bash | |
LANGUAGES="en_US pt_BR" | |
# production or developer | |
ENVIRONMENT="production" | |
COMPOSER=$(which composer) | |
PHP=$(which php) | |
ROOT=$(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
function myip() { | |
curl http://icanhazip.com | |
ip addr | grep inet$IP | \ | |
cut -d"/" -f 1 | \ | |
grep -v 127\.0 | \ | |
grep -v \:\:1 | \ | |
awk '{$1=$1};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
#!/usr/bin/env bash | |
# https://opensource.com/article/18/5/bash-tricks | |
# History related | |
ctrl + r (reverse search) | |
!! (rerun last command) | |
!* (reuse arguments from previous command) | |
!$ (use last argument of last command) | |
shopt -s histappend (allow multiple terminals to write to the history file) | |
history | awk 'BEGIN {FS="[ \t]+|\\|"} {print $3}' | sort | uniq -c | sort -nr | head (list the most used history commands) |
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
curl -I -X OPTIONS \ | |
-H "Origin: http://EXAMPLE.COM" \ | |
-H 'Access-Control-Request-Method: GET' \ | |
http://EXAMPLE.COM/SOMETHING 2>&1 | grep -i 'Access-Control-Allow-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
source ./sendEmailCurl-v1.1.sh # OR ./sendEmailCurl-v1.0.sh | |
EMAILTO='user1@example.com,user2@test1.com' \ | |
EMAILSUBJECT="Test EMAIL $(date +%F)" \ | |
EMAILBODY="This is a test email from $(HOSTNAME)\n USER $(USER)" \ | |
sendEmail "$@" | |
exit 0 |
svn st |grep "^M"|awk '{print $2}'|while read line; do svn diff $line;done
svn st |grep "^M"|awk '{print $2}'|while read line; do echo $line;done
svn st |grep "^M"|awk '{print $2}'|while read line; do echo -n $line, ;done //without trailing new line and comma seperated
svn st |grep "^M"|awk '{print $2}'|while read line; do echo -n $line" " ;done //without trailing new line and single space (" ") seperated
svn ci `svn st |grep "^M"|awk '{print $2}'|while read line; do echo -n $line" ";done` //svn commit all the modified files
WELCOME
grep -i -e"diff --git" PATCH_SUPEE-*|awk '{print $3}'|while read line;do meld /var/www/html/magento1911/$line /var/www/html/puma/$line ;done
tar -zcvf evoke_live.tgz htdocs/ --exclude=media --exclude=var --exclude="*.tgz" --exclude="*.gz" --exclude="*.tar" --exclude=blog --exclude=media_bck --exclude=.svn --exclude=blog_old --exclude=media_orig
grep -i -e"diff --git" PATCH_SUPEE-*|awk '{print $3}'|while read line;do meld /var/www/html/magento1911/$line /var/www/html/puma/$line ;done
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 | |
//Get Attribute sets | |
$attribute_sets = Mage::getModel('catalog/product_attribute_set_api')->items(); | |
print_r($attribute_sets); | |
//get Attributes for a an attibute set | |
$attributes = Mage::getModel('catalog/product_attribute_api')->items($attributeSetId); | |
print_r($attributes); |
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
<html> | |
<body> | |
<?php | |
/** | |
* Code to fetch Products in collection and useing SKU's and display the products | |
* | |
*/ | |
$pCollection = Mage::getModel('catalog/product') | |
->getCollection() | |
->addAttributeToFilter( |
NewerOlder