• Error starting Grails: com/springsource/loaded/ri/ReflectiveInterceptor

    If you are getting this error when trying to start a Grails Project in Intellij: Error starting Grails: com/springsource/loaded/ri/ReflectiveInterceptor try deleting the ./.slcache folder at the top level of your project: projectname/.slcache This problem came when I was trying to update an app to a newer version of Grails.  The above solved the problem for more

  • 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 /opt/bitnami/ctlscript.sh restart nginx   Redirect all subdomains to the top level domain ie: http://www.mydomain.com -> http://mydomain.com In your DNS management system, you’ll more

  • Linux Commands Cheat Sheet

    This outputs your stuff in a folder called ‘packageName’: tar -xvzf packageName.tar.gz   This can help tell you what version of linux or at least linux kernel you are running: uname -a   Find a process and kill it: Run this ‘ps’ command to find the process, in this case the MySQL Daemon “mysqld”. ps more

  • 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 index() { Thread.sleep(5000) … do some work… render … some response } where 5000 is more

  • Insert HTML after every Nth comment: use the “end-callback” argument

    I did not find any examples of using WordPress’s “end-callback” argument for “wp_list_comments”. It is documented by WordPress here. Here is an example of how to use it in child-theme code to add custom HTML after each top level comment. This example preserves comment hierarchy, ie: nested replies. In your child theme directory, create a more