All Blog Posts

Reduce UUID memory consumption in pandas

I was working with a dataset of tens of millions of rows of data, which is using UUIDs as identifiers. UUID is not supported natively in Pandas. One option is to convert these to 128-bit integers, but those caused problems as they are not supported ...

PowerPoint: Embedding Fonts

"This presentation cannot be edited because it contains one or more read-only embedded (restricted) fonts. To edit the presentation you must remove the restricted fonts, or you can open the presentation as read-only."...

Migrating from WordPress to Astro with OpenAI

I finally got around to move this blog from Wordpress to more modern solution. This has been a long time in making. I ended up using Astro as the framework. With little bit of help from bolt.new, the framework for the blog was ready in no time....

Site-to-site VPN with Meraki and Azure

After setting up point-to-site VPNs on Azure, I thought I'd just throw in quickly also a site-to-site connection between the office Meraki MX device and the Azure VPN gateway....

Ping with timestamps

Sometimes it is handy to run ping on the background to monitor network connectivity. Combine Microsoft PowerShell and the [PsPing utility from Microsoft](https://technet.microsoft.com/en-us/sysinternals/psping.aspx) and you get a nice logging soluti...

QC35, Windows, Bluetooth audio

I started investigating pairing problems with my Bose QC35 headphone/headset and Windows. At first, I was wondering why I actually see two separate QC35 devices with different icons in the pairing list. Soon I figured out the other one was "headphon...

Azure, add IP address to cloud service

Azure now supports multiple IP addresses per cloud service. This means you can, for example, host multiple websites, each running on a different IP address within one cloud service (1..n virtual machines)....

Linux

Check if SELinux is enabled:...

IntellijJ IDEA: Maven home directory is invalid

When creating a new project based on Maven archetype, IntelliJ IDEA wants to know certain Maven-related directories. It took a few minutes to figure out what IDEA actually wants here, and answering incorrectly gives the not very informative "Maven h...

Convert SPSS .SAV file to CSV (for Excel)

SPSS alternative, GNU PSPP includes a very easy-to-use tool that can convert the SPSS SAV file to CSV. This can be further read into Excel. Just open the CSV file in Excel. If Excel does not automatically split data, choose the first column, go to t...

Disable Tomcat thread pool

I recently ran into issues with a third party application that had certain issues with threadlocals. Namely certain parts of the application were using threadlocal to store information, but did not clean up the stored information. This information t...

Hotkeys for moving windows around screens

I'm using multiple monitors and sometimes it would be useful to have hotkeys that would position the active window to certain place on certain screen. I took a quick look at ready made software but those did not seem to solve my specific problem....

SSD encryption - How does it work?

Quite many vendors brag about the AES-256 encryption capabilities of their SSD drives. This sounds good, everybody likes to keep their data safe and secure. But how does this encryption really work, and what does it protect you from? Easy questions,...

Debugging Orbeon XPL programs

Orbeon XPL is a way of describing processing flows using XML syntax. Since there is no debugger, the debugging mostly happens by putting something in and looking at what comes out....

Orbeon XPL copy values from request

Quite often I end up in situations where I need to use a value from an HTTP request (either parameter or header) inside a configuration element for another Orbeon XPL processor....

Customizing Liferay service builder templates

Liferay service builder code generation is based on Freemarker templates. The default templates come packaged inside the portal jar files. You can take a look at them for example in [Github](https://github.com/liferay/liferay-portal/tree/master/port...

Liferay service builder, class loader issues

When you create a new service with Liferay service builder, the system generates a whole lot of boilerplate code based on the few lines you put into the service.xml. Part of the code deals with the problem related to passing objects between differen...

Debugging ClassCastExceptions in Eclipse

Working with application servers, it is not uncommon to encounter strange ClassCastExceptions that seem to have no reason. You are trying to cast an instance of MyModel to MyModel, yet the JVM is having issues with it....

Using git to deploy new versions

Simple instructions for setting up git so that you can push new versions to server from the comfort of your workstation. This is based on [article](http://toroid.org/ams/git-website-howto) by Abhijit Menon-Sen. If you need more details, take a look ...

D-Link routers and ZoneEdit dynamic dns

Some D-Link models support updating selected dynamic DNS services. The support is, however, limited, and it seems that, for example, you can't configure it to push updates to ZoneEdit....

Install latest MongoDB in Ubuntu

The MongoDB version available from the default Ubuntu/Debian repositories can be fairly old. Luckily it is easy to get a newer version directly from 10gen repository...

Replacing multiple occurences of character in bash

I wanted to replace multiple occurrences of underscore with single in one bash shell script. With regular expressions this is pretty simple, but by default they are not available directly in bash (using awk, sed and other tools would have obviously ...

Transfer MongoDB collection to Windows

A quick'n'dirty<sup>1</sup> way for transferring MongoDB collection from Linux to Windows, using [plink](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) as the ssh client....

Ubuntu quick firewall configuration

Quick instructions for enabling firewall on Ubuntu using Uncomplicated Firewall (ufw). The resulting rules are quite obvious. Incoming traffic is denied, except for ssh, http and https (these refer to /etc/services) and outgoing is allowed....

MongoDB as service on Windows

Quick install script for installing MongoDB as a service on Windows. Further instructions are available in official MongoDB [docs](http://www.mongodb.org/display/DOCS/Windows+Service)....

Nokia's smart future

Resent news tell that Nokia has already in November acquired Smarterphone, a Norwegian company that makes a lightweight platform that turns feature phone hardware into smartphone user experience. There's not that much information available about the...

Logging to Loggly from JBoss 5.1.0

[Loggly](http://loggly.com/) is a fairly new cloud-based log management service. You can think about it as a lightweight and hosted version of Splunk. I find it pretty interesting, especially because it provides a pay-as-you-go licensing model which...

Nokia still loving Linux?

Job postings are always the best way to glance to a future of company, aren't they? Maybe this reads as further evidence about the Linux future of Series 40....

Red Hat OpenShift

Red Hat is the latest company to join the big happy cloud provider family and they have interesting stuff to bring. OpenShift is a "portfolio of cloud services for deploying and managing applications in the cloud". Basically with OpenShift tools you...

Work 2.0

Think about how the cloud changed the way startups were run when we went from 20th century Web 1.0 to Web 2.0. During the dot-com boom it was all about money and big hardware. Success started with $1M set of Sun hardware. Then came the cloud and cha...

Cross-domain HTTP with Python

For security and other reasons, browsers put limitations on what sites you can access from JavaScript. The basic rule is: if the web page containing the script originates from mysite.com, then the script is only allowed to access mysite.com....

Amazon Beanstalk

This is exactly what the world was waiting for! Amazon published [Beanstalk](http://aws.amazon.com/elasticbeanstalk), their first PaaS offering. Beanstalk allows customers to easily deploy standard Java web apps to the AWS cloud....

Grouping and null values in Jasper reports

Nulls are not created equal - except in Jasper. In some cases, you want to do grouping on the report based on some field that might also contain null values. Jasper treats these null values as equal, meaning that they go to the same group. This mean...

Stretching band in Jasper

Making a band stretch according to the height of its contents is simple. First, you need to have some content that is stretching, for example, a text field with "stretch with overflow" property set to true....