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.
mysqldump -u$USER -p$PASS -h$HOST --no-data --add-drop-table $DB | grep ^DROP | mysql -v -u$USER -p$PASS -h$HOST $DB
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 intermediate CA. convert it to pem remember to nginx -t before restarting.
Let’s face it, debugging gtm in devices other than desktop is hard. Debugging in IOS is harder because gtm debugger toolbar doesn’t work on it. The tip to help debugging IOS is to be able to debug it from desktop Let us use the ios webkit proxy debugger https://github.com/google/ios-webkit-debug-proxy Follow the installation instructions. However this … Continue reading
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 a common day-to-day technical problem. The questions do require backend knowledge and the open ended questions will allow candidates … Continue reading
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 class, “command + o” 6. navigate to line, “command + l” 7. generate getters and setters, “command + … Continue reading
sometimes you want to manipulate images uploaded. A good way to do it is to resize the image to the max width or height, fill the background with transparency and yet keeping the same original width to height ratio. lets say we want a 300 x 300 pixel image.
let’s say you want to constraint what people are uploading and you don’t want to use assert statements in the entity. you can do it in the formbuilder
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 -s /path_to_myproj/vendor/drupal/console/bin/drupal /usr/local/bin/drupal cd web drupal site:install [/php]
imagine setting up a vagrant and playing around with the vagrant config file. boots up and some libraries are not working, dependencies not working…etc. thanks to scotch box, a vagrant lamp stack that just works https://box.scotch.io/
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 vagrant is up, shell in and run docker commands. Remember to port follow all the relevant application port in virtualbox. Here are some commonly … Continue reading