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 https://www.shiftedup.com/2014/11/13/how-to-bulk-remove-files-from-slack | |
# | |
import requests | |
import json | |
import calendar | |
from datetime import datetime, timedelta | |
### Input vars ### |
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/sh | |
# | |
# The command should be run in the git repository root. | |
# It adds all symlinks to a .gitignore file that aren't in there already. | |
for f in $(git status --porcelain | grep '^??' | sed 's/^?? //'); do | |
if test -L "$f" | |
then | |
test -L "$f" && echo $f >> .gitignore; | |
elif test -d "$f" |
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/sh | |
# Create a directory structure and some files | |
# for an ansible role | |
# Defaults | |
DEFAULT_ROLE_PATH=. | |
# Check input params | |
if [ -z "$1" ]; then | |
echo "Missing argument role name" |
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
### QUOTE ### | |
DELETE FROM `quote`; | |
DELETE a1 | |
FROM `quote_id_mask` a1 | |
LEFT JOIN quote a2 ON a1.quote_id = a2.entity_id | |
WHERE a2.entity_id IS NULL ; | |
DELETE a1 | |
FROM `quote_address` a1 |
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
<virtualType name="VirtualDebug" type="Magento\Framework\Logger\Handler\Base"> | |
<arguments> | |
<argument name="fileName" xsi:type="string">/var/log/custom_error.log</argument> | |
</arguments> | |
</virtualType> | |
<virtualType name="VirtualLogger" type="Magento\Framework\Logger\Monolog"> | |
<arguments> | |
<argument name="handlers" xsi:type="array"> | |
<item name="debug" xsi:type="object">VirtualDebug</item> | |
</argument> |
cd <magento_root>
mkdir -p m2-hotfixes/tmp
- Copy original files
cp --parents <path/to/yout/file1> <path/to/yout/file2> ... m2-hotfixes/tmp
OR
rsync -R <path/to/yout/file1> <path/to/yout/file2> ... m2-hotfixes/tmp
cd m2-hotfixes/tmp
git init && git add . && git commit -m "Initial commit"
- Make changes in files in m2-hotfixes/tmp directory
git add . && git commit -m "Fix something"
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
I have just discovered a great feature of composer: | |
composer update --lock | |
It saves a lot of time when you merge branches with composer.lock file changes in both branches. | |
Just resolve conflict by applying --ours version of the file (or --theirs, it really doesn't matter) and then run | |
`composer update --lock `. | |
Composer will do all the dirty work for you and update composer.lock file according to composer.json changes | |
and install new packages. The rest of packages in composer are not changed. |
- initial widget
Magento_Theme/js/view/breadcrumbs
(vendor/magento/module-theme/view/frontend/web/js/view/breadcrumbs.js
) - native mixin that extends this widget:
Magento_Catalog/js/product/breadcrumbs
(vendor/magento/module-catalog/view/frontend/web/js/product/breadcrumbs.js
)
Extend methods of the mixin Magento_Catalog/js/product/breadcrumbs
- Declare your mixin in custom theme
app/design/frontend/[Vendor]/[theme]/Magento_Catalog/requirejs-config.js
file and associate it with the initial widget