Skip to content

Instantly share code, notes, and snippets.

View Nav-Appaiya's full-sized avatar
🏠
Available

Nav Appaiya Nav-Appaiya

🏠
Available
View GitHub Profile
@Nav-Appaiya
Nav-Appaiya / magento2
Created March 14, 2022 12:37
magento 2 permissions
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
find var pub/static pub/media generated/ app/etc -type f -exec chmod g+w {} \;
find var pub/static pub/media generated/ app/etc -type d -exec chmod g+ws {} \;
chown -R :<web server group> .
chmod u+x bin/magento
@Nav-Appaiya
Nav-Appaiya / console-at-fields-select-m2-export.txt
Created February 17, 2022 00:29
Hack for M2 exports: Check all to exclude at export, so you can selective check the ones you want (instead of having to check everything that you dont need)
Execute the below in console while your at the fields selection screen in the Mage 2 export module. This will check all to be excluded, and once run you can untick the fields you do want to export.
jQuery('[name="skip_attr[]"]').click()
@Nav-Appaiya
Nav-Appaiya / gist:249c74d0bc0930f1d5bc726b8af02fb5
Created February 15, 2022 23:28
Search for newly created files of the last 3 days
3) Search for newly created files in your hosting account
If you have multiple sites residing in the same account, you better search the whole account instead just your hacked website directory.
You could try searching with find for files added in the last few days:
# This will search for files modified in the last 3 days.
find . -type f -mtime +3
@Nav-Appaiya
Nav-Appaiya / index.html
Created January 25, 2022 21:24
typeit Codonist logo
<div id="loader" class="loader">
<h1 id="codeit"></h1>
</div>
# Disallow Ahref
User-agent: AhrefsBot
Disallow: /
User-agent: AhrefsSiteAudit
Disallow: /
# Block MJ12bot as it is just noise
User-agent: MJ12bot
@Nav-Appaiya
Nav-Appaiya / run.sh
Created January 22, 2022 14:38
n98 magerun installer oneline
wget https://files.magerun.net/n98-magerun2.phar
@Nav-Appaiya
Nav-Appaiya / gist:34587229db255c3169967f6affa0cb8a
Created January 13, 2022 14:10
WP shortcodes for Porto theme
https://rivcofm.org/Shortcodes/Shortcodes-3/call-to-action
https://rivcofm.org/Shortcodes/Shortcodes-3/Type-Writer
https://rivcofm.org/Shortcodes/Shortcodes-3/tooltips-popovers
https://rivcofm.org/Shortcodes/Shortcodes-4/Forms
https://rivcofm.org/Shortcodes/Shortcodes-2/lists
https://rivcofm.org/Shortcodes/Shortcodes-1/modals
https://rivcofm.org/Shortcodes/Shortcodes-1/Lightbox
https://rivcofm.org/Shortcodes/Shortcodes-4/maps
https://rivcofm.org/Shortcodes/Shortcodes-2/buttons
https://rivcofm.org/Shortcodes/Shortcodes-2/Image-Gallery
https://github.com/magento/composer-root-update-plugin/blob/develop/src/Magento/ComposerRootUpdatePlugin/README.md
composer require magento/composer-root-update-plugin ~2.0 --no-update
composer require magento/composer-root-update-plugin ~1.1 --no-update
@Nav-Appaiya
Nav-Appaiya / gist:c01261b21455e1236c816cac0abe1398
Created January 12, 2022 12:54
speed up composer with prestissimo
$ composer global require hirak/prestissimo
@Nav-Appaiya
Nav-Appaiya / gist:2397191bc21bd6c482760bb47bf25996
Created January 12, 2022 12:54
If you have installed composer v2, and want to install composer v1 in addition you can do:
wget https://getcomposer.org/composer-1.phar
chmod a+x composer-1.phar
sudo mv composer-1.phar /usr/local/bin/composer1
And use composer1 on old projects:
cd <OLD-PROJECT>
composer1 install