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 / magento cli set the search engine for catalog
Created April 8, 2022 21:24
m2 cli config set catalog search engine magento 2.4.3 upgrade
php bin/magento config:set catalog/search/engine elasticsearch7
@Nav-Appaiya
Nav-Appaiya / gist:c88354aec7361057a04e068b230e79f7
Created March 22, 2022 17:22
Kali 2022.1 live boot for apple Mackbook Pros with Apples M1 chip
https://ftp1.nluug.nl/os/Linux/distr/kali-images/kali-2022.1/kali-linux-2022.1-live-arm64.iso
@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