Posts
Combining Docker and Maven
When you’re building Java or JVM-based software, chances are these days you’ll be deploying it inside Docker. Chances also are you’re building it with Maven. Now how do you combine the two? Of course, you could plumb together some scripts for the platform of your choice, but there’s a few disadvantages to that. First of all, it makes you platform-dependant: your build may not work - or behave differently - depending on the platform where you’re building. Secondly, it’s not very elegant, since it does not easily facilitate re-use. And in these days of microservices, we don’t want to be copying the same scripts over and over again. Thirdly, it requires the Docker binaries to be present on the system where you perform your build.
— Read more... →Timing in Protractor tests
Ever noticed that annoying error while running your Protractor tests:
Error while waiting for Protractor to sync with the page: {}.
Especially the two brackets are annoying, because they suggest more information might be available but it is just hidden for you.
The good news is, the fix is rather easy. It turns out that Protractor expects your application to have an data-ng-app
attribute on the HTML body
element.
My application does not have that, since the Angular application is just a part of my page. So in my Protractor config, I have to add an option to tell Protractor where to find the Angular application:
— Read more... →Mobile emulation in Google Chrome
Building a web site or web application that should also be useable on other devices than ‘regular’ desktops or laptops? You don’t always have your mobile device at hand, or might not even own one. Yet, you want to see how your new gem looks on such devices. Worry no more!
Google Chrome to the rescue. We all know the ‘Developer Tools’, accessible using F12. If you press ESC while inside the ‘Developer Tools’, the ‘DevTools console drawer’ appears. Next to a ‘Console’ and ‘Search’ tab, it has an ‘Emulation’ tab.
— Read more... →This method is likely to yield significantly better performance
This week, I came across an interesting difference between the Java API documentation and its current implementation. A difference? Or is it just a matter of thorough reading?
If you look at the Javadoc for Double.valueOf()
, you’ll find that it is likely to outperform the use of new Double()
.
Sounds good!
And don’t we all ove it when we get a free performance boost?
However, examining the source code to see what causes this “significantly better space and time performance”, we find….
— Read more... →Checking logfiles with logcheck
If you own a private server, like me, you’ll probably know the feeling you need to check your logfiles every now and then. It’s not a lot of work, it’s not difficult, but it needs to be done, and it needs to be done regularly.
As for me, the solution is simple. I installed the logcheck tool. This nice little tool will send you a daily email with all logging information on your system. That sounds like an awful lot of spam on a daily basis, but thankfully that is not the case.
— Read more... →IPv6 on Raspbian
A default Raspbian installation does not have IPv6 enabled. That’s quite a pity in 2013, where IPv4 addresses will be running out shortly.
Have no fear, it’s not too hard to enable it.
Just add ipv6
to the file /etc/modules
(it should be on a separate line) and reboot your Pi.
If you don’t want to reboot, enable it immediately by issuing sudo insmod /lib/modules/`uname -r`/kernel/net/ipv6/ipv6.ko
. Note that after a reboot, you’ll have to re-enable it again, so just change /etc/modules
either way…