consumer_key
:d208adaf663a85029c33f55ce73d2705
consumer_secrect
:9faba5ec4c19aa68ca96511201b20f69
- Initiate url:
http://domain.com/oauth/initiate
- Authorize url:
http://domain.com/admin/oauth_authorize
- Token request url:
http://domain.com/oauth/token
- Callback url (for dumping returned
oauth_token
andoauth_verifier
): http://domain.com/callback.php
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
<!-- To generate Interceptor, declare a plugin for virtualType, but plugin won't be executed with this alone --> | |
<type name="\Magento\LayeredNavigation\Block\Navigation\Category"> | |
<plugin name="my-plugin" type="\MyVendor\MyModule\Plugin\BlockNavigation"/> | |
</type> | |
<!-- For plugin to be actually executed, declare the same plugin for actual class --> | |
<type name="\Magento\LayeredNavigation\Block\Navigation"> | |
<plugin name="my-plugin" type="\MyVendor\MyModule\Plugin\BlockNavigation"/> | |
</type> |
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
// Add / Update a key-value pair in the URL query parameters | |
function updateUrlParameter(uri, key, value) { | |
// remove the hash part before operating on the uri | |
var i = uri.indexOf('#'); | |
var hash = i === -1 ? '' : uri.substr(i); | |
uri = i === -1 ? uri : uri.substr(0, i); | |
var re = new RegExp("([?&])" + key + "=.*?(&|$)", "i"); | |
var separator = uri.indexOf('?') !== -1 ? "&" : "?"; | |
if (uri.match(re)) { |
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 | |
# Sets up a database with a magento2 installation. This assumes you are running from under your httpdocs/20 location and have www.localhost.com in your /etc/hosts file | |
# To run type : install_magento2 <dirname><password> | |
# password is used for the datbase user and the magento admin password | |
if [ $# -eq 0 ]; then | |
echo "No arguments supplied" | |
echo "Usage: `basename $0` <dirname><password>" | |
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
## Magento 2 | |
WEBSERVER_GROUP="www-data" | |
alias m2="bin/magento" | |
alias m2rmgen="find var/generation -maxdepth 1 -mindepth 1 -type d -not -name 'Magento' -not -name 'Composer' -not -name 'Symfony' -exec rm -rf {} \;" | |
alias m2en="m2 module:enable" | |
alias m2s="m2 module:status" | |
alias m2f="m2 cache:flush" | |
alias m2up="sudo find var -type d -exec chmod 775 {} \; && sudo find var -type f -exec chmod 664 {} \; && m2en --all && m2 setup:upgrade && m2rmgen && m2f" | |
alias m2static="sudo rm -rf var/view_preprocessed/* pub/static/frontend/* pub/static/adminhtml/* pub/static/_requirejs/*" | |
alias m2fixgroup="sudo usermod -aG $WEBSERVER_GROUP `whoami`" |
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
/.idea | |
/app/etc/env.php | |
/app/etc/redis.php | |
/pub/media/* | |
!/pub/media/.htaccess | |
/pub/media/catalog/* | |
!/pub/media/catalog/.htaccess | |
/pub/media/customer/* |
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 __die($obj) | |
{ | |
print_r($obj);die(); | |
} | |
function __debug($message) | |
{ | |
$file = __DIR__ . '/../var/log/dump.log'; | |
file_put_contents($file, $message, FILE_APPEND); | |
file_put_contents($file, "\n", FILE_APPEND); |
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 | |
# Description: show dependency tree | |
# Author: damphat | |
if [ $# != 1 ]; then | |
echo 'Usage: apt-rdepends-tree <package>' | |
echo 'Required packages: apt-rdepends' | |
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
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
Principles of Adult Behavior
- Be patient. No matter what.
- Don’t badmouth: Assign responsibility, not blame. Say nothing of another you wouldn’t say to him.
- Never assume the motives of others are, to them, less noble than yours are to you.
- Expand your sense of the possible.
- Don’t trouble yourself with matters you truly cannot change.
- Expect no more of anyone than you can deliver yourself.
- Tolerate ambiguity.
- Laugh at yourself frequently.
OlderNewer