A no nonsense notebook for nerds
-
Remove new duplicates from any sql table
If you want to remove older rows, use the following:
-
How to fix Invalid template file error in Magento2 after version upgrade?
This is a very common issue you will face if you using windows machine for development. Usual error message is: So whats the solution? In case of windows, just replace this function isPathInDirectories in vendor/magento/framework/view/element/template/file/validator.php Reference: https://magento.stackexchange.com/a/255585/32283
-
How to update customer password in Magento 2 database?
Please note that if SPJ9WIp7 is the salt and User’s password is 7qLzX33ETxYE, the following will be your query: 7615 is the customer id
-
How to export multiple selected tables in PMA phpmyadmin (but not all tables)
Click on export, and choose “custom” export method. Lets say you want to export first 20 tables only. Open chrome or browser console [ctrl+shift+j], enter the following: For next 20, use 20,50 as arguments in slice function used above.
-
Where are customizer settings stored in db for wordpress theme?
How to clone customizer settings in child theme from parent theme? The customizer data is stored in table wp_options under option_name theme_mods_THEME-NAME you can view all such settings via the following query: In some cases, you just want to use parent theme’s settings in newly added child theme. If that is your case too, use…
-
prevent sticky header jumping in css or js
-
Installing a testing instance for Magento CLI only
Prerequisite: Magento repo access keys Mysql Database, username and password a domain name pointing to a server if you dont have access key, get a pair here : https://marketplace.magento.com/customer/accessKeys/ In the above command, you can change version/subversion of magento repo. You can also change the install directory After the successful run of above command: YOu…
-
Basic Authentication with Nginx with proxy port (react/node app etc)
Reference: https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/ Requirements: apache2-utils or httpd-tools Use htpasswd utility and create a .htpasswd file, see reference After that, just add lines in nginx conf Restart nginx now or test first using “nginx -t”
-
Fixing broken “screen options” in wordpress site
So probably you chose “Number of items per page” as 1000 or 200 and now the page doesnt load anymore because your database ran out of memory. If that is the case, run the above query on phpmysql or any other way, edit the numbers and fixed!
-
How to limit ajax apis for your origins (Access-Control-Allow-Origin headers)
Got any book recommendations?