simple ways to optimise wordpress
No you don’t have to use w3tc or wp super cache. wordpress becomes slow when db queries grow. a quick way is to find the expensive queries and speed them up by caching them. for example, transient is...
View ArticleOpening and controlling a new popup window
we can assign a var to the window.open method and control the popup. but in order for it to work, remember to use to “opener” method or else it will fail in firefox. for example, var d =...
View Articleexport custom mysql query to csv
Sometimes it is useful to export custom query and then import it as a csv into another table mysql -uroot -p your_db -e “select_query INTO OUTFILE ‘/tmp/query.csv’ FIELDS TERMINATED BY ‘,’ ENCLOSED BY...
View ArticleCpanel unblock IP
sometimes your IP gets blocked if you have done something funny on the server. Best way is to ssh into the server csf -r (Restart CSF) csf -d (quick deny an ip: csf -d xxx.xxx.xxx.xxx) csf -a (quick...
View ArticleWhy Symfony?
Choosing the best framework for rapid development has been a topic that has been debated to death. Today, there is no longer “the best framework” because all modern day framework is scalable and...
View ArticleInstall drush in cpanel
* you will need root access to the server If composer fails, it is most likely you dont have some extensions. If using cpanel, If all is working “drush core-status” should be working
View ArticleUseful tools in chrome
chrome can be a really cool tool, not just a browser. Some cools extensions are: qsnap – for capturing and annotating screenshots. markdown viewer – for viewing markdown and auto refreshing if there...
View ArticleRegnerating bootstrap cache in symfony 2
if you accidentally delete the bootstrap cache ./vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php
View ArticleDelaying until condition is fulfilled
In javascript, we can use setTimeout to do call itself recursively until a condition is met. Here, we want to check the html content with an interval of 300ms until it is populated, then we will do...
View ArticleDocker Cheatsheet
Docker helps a lot in the dev process. If using windows or mac, need to use a vagrant vm that allows nfs. https://github.com/blinkreaction/boot2docker-vagrant this will help u setup the vagrant. Once...
View ArticleDrupal 8 quickstart using composer
There are benefits of using installing drupal via composer. Forget about drush, let us use the drupal console to install the site. This is the symfony way. # let us configure the drupal command line ln...
View Articlephpstorm useful plugins and shortcuts
Useful Shortcuts 1. to open up preferences, “command + ,” 2. show file in project tree or anywhere, “fn + shift + f1” 3. code completion, “ctrl + space” 4. search everything, “shift + shift” 5. search...
View ArticleSample Test for Backend Developer
This is a question that I came up with based on real hands-on project and experience. The question is not really testing on someone’s ability to know the code syntax. but rather the approach to solving...
View ArticleHow to check if ssl is installed correctly
To check ssl is installed correctly, run in command line or https://cryptoreport.rapidssl.com/checker/ If you are getting any errors, ssl installation is wrong. Normally you would get the crt from the...
View ArticleDrop all mysql tables without permission to delete and create new database
In mysql, the simplest way to flush all tables is to delete the db and create a new one. However, one might not have permission to do that. So we need a script to list all tables and delete it.
View ArticleGetting A+ SSL on ssllabs.com
Just follow this tutorial https://stackoverflow.com/questions/41930060/how-do-you-score-a-with-100-on-all-categories-on-ssl-labs-test-with-lets-encry If having problems creating ssl, refer to...
View ArticleRemove U+FEFF from text files
U+FEFF (https://en.wikipedia.org/wiki/Byte_order_mark) are irritating especially when you are parsing files. To remove them, open up vim
View ArticleYou have received a new debit
This is a multi-part message in MIME format. ——=_Part_28912_5539550947.1890791253740 Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit You have received a...
View Article
More Pages to Explore .....