Adding @GrailsCompileStatic to all production grails code (not test grails code)

When coding Groovy, @CompileStatic can help to spot errors and improve performance of production code. Unfortunately, @CompileStatic is optional and hence easy to forget, but thankfully Groovy has documented a way to make @CompileStatic for all production code: http://docs.groovy-lang.org/latest/html/documentation/#_static_compilation_by_default (Test code is not affected, because it is nice with flexibility when testing.) However, with Grails […]

How to start local ActiveMQ (build from source) on Ubuntu when the ActiveMQ package has previously been installed

This is the frustration of the day. I downloaded the ActiveMQ source and compiled it with no issues – however I could not start ActiveMQ (using ./activemq start) and the console output did not really explain what was wrong: ./activemq: 344: ./activemq: “/usr/bin/java” -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=/home/MY_USER/git/activemq/assembly/target/apache-activemq-5.12.1-SNAPSHOT//conf/login.config -Dactivemq.classpath=”/home/MY_USER/git/activemq/assembly/target/apache-activemq-5.12.1-SNAPSHOT//conf:/home/MY_USER/git/activemq/assembly/target/apache-activemq-5.12.1-SNAPSHOT//lib/” -Dactivemq.home=”/home/MY_USER/git/activemq/assembly/target/apache-activemq-5.12.1-SNAPSHOT/” -Dactivemq.base=”/home/MY_USER/git/activemq/assembly/target/apache-activemq-5.12.1-SNAPSHOT/” -Dactivemq.conf=”/home/MY_USER/git/activemq/assembly/target/apache-activemq-5.12.1-SNAPSHOT//conf” -Dactivemq.data=”/home/MY_USER/git/activemq/assembly/target/apache-activemq-5.12.1-SNAPSHOT//data” -jar “/home/MY_USER/git/activemq/assembly/target/apache-activemq-5.12.1-SNAPSHOT//bin/activemq.jar” : not found […]

Add after body hook hack in wordpress (e.g. for Facebook Like button SDK) without modifying header.php

I wish to add the Facebook Like button to my wordpress – this requires that I add the following code right after <body&lt: <div id="fb-root"></div><script>(function(d, s, id) { … }(document, ‘script’, ‘facebook-jssdk’));</script> My solution Make a functions.php file in your child theme and add the following code (or append it to your main functions.php if […]

Installing Quake III Arena for Linux (especially x64 bit)

The original installer for Quake III Arena will not work on my Ubuntu 12.10 x64 – I have tried many solutions with no luck 🙁 However, Quake III Arena is opensource (except data such as music and graphics) now and some nice people have made a great installer (link) where we only need to add […]

MySQL/PHP character encoding errors (e.g. æ,ø,å) – import, connection, table encoding and html meta header

Today I’ve got four hints that usually solves the character encoding errors I encounter with MySQL and PHP (usually triggered by the special Danish vowels æ,ø,å): PhpMyAdmin import: use the official import function rather than executing crude sql inserts – because then you can specify the character encoding instead of using the default one which […]

False Science: The Comparative Anatomy of Eating by M.D. Milton R. Mills

I am not an expert on the topics “diets”, “anatomy” and “evolution” – but still I know how real science works and hence I can discard false science such as the article “The Comparative Anatomy of Eating” by M.D. Milton R. Mills. Creationists (Intelligent Design) have also created many such articles that claims to be […]

Java UML Generator plugin for Eclipse

Yet another brilliant Eclipse plugin: http://www.objectaid.com Create a Diagram and then drag the wanted files onto it. Remember to save as a JPG instead of GIF because some text is missing when using GIF. I recommend the following disabling: Disable package (for smaller projects) attribute defaults (default values) icons (remove eclipse symbols and use normal […]