Delay a Grails controller’s response

Sometimes, for testing or development, you need to slow down an ajax response from the server. In the Grails framework, to delay a controller’s response, do the following: In the action you want to delay, insert: Thread.sleep(5000) as in: def…

Nginx Cheat Sheet

Test and restart an nginx configuration change The reload will not happen if the test fails. sudo nginx -t && service nginx reload or, on a bitnami image: sudo nginx -t && sudo restart nginx   Redirect all subdomains…