Building Android NDK projects with Gradle and Travis CI

I’ve migrated all of my Android projects over to Gradle now as that seems to be the direction that Android development is taking, but if you use the Android NDK in your projects then you’ll discover that NDK support is severely lacking in Gradle. There’s undocumented support for the NDK which can be found if you dive into the samples, but it doesn’t look to be too developed at the moment. Until there’s an official solution for this, I’ve taken my own approach to this, inspired by countless StackOverflow questions and answers.

I also use Gradle in combination with GitHub and Travis CI in order to build and test the latest commits automatically, so I’ll share the .travis.yml build script that I use to do this.

This may not be the best way of doing this, and it will probably be made obsolete when an official solution is documented. However, it works for me. If you know of a better solution then please leave a comment.

(more…)

CorsairLINK doesn’t work when resuming from sleep

I love my Corsair H100i liquid cooler and the CorsairLINK software is quite nice, but I’ve noticed a bug where it doesn’t work correctly when it resumes from standby. The fan RPM doesn’t update and CorsairLINK won’t change the fan speed in accordance with temperature. Obviously, this could have disastrous consequences if unnoticed.

Until Corsair fix this bug, I’ve produced a little workaround which simply restarts CorsairLINK when the computer resumes from sleep.

(more…)

Monitoring Alternative PHP Cache (APC) Using Cacti Graphs

Cacti Logo

Despite Zend’s OPcache being available in PHP 5.5, a lot of people – myself included – still use the tried and tested Alternative PHP Cache (APC) on older versions of PHP. Although APC tries its best to have a ‘set it and forget it’ approach with very sensible and effective defaults, if you want to get the best performance out of it then you should consider monitoring the status of the cache.

I use Cacti almost exclusively on my linux machines to monitor the status of various system processes. Despite usually having no problem finding scripts to monitor just about everything, I’ve been relatively disappointed in the availability of APC monitoring scripts for Cacti so I’ve created my own. Only requirements are wget on the server hosting Cacti (you likely already have this) and the ability for said server to access a webpage on the PHP server being monitored. (more…)