Category Archives: Uncategorized

PHP not working in Apache virtual hosts

I just had the situation where PHP worked fine from the default/main site configured in Apache, but not in a virtual host. Instead of parsing/executing the PHP script, Apache would rather send its source code back to the browser, which … Continue reading

Posted in Uncategorized | Leave a comment

Uploading a file with HTTP PUT in Groovy with Basic Auth

Dependencies: Code:

Posted in Uncategorized | Leave a comment

Gerrit: robust regular expression to create links from text automatically (commentlink)

When there is a link to a bug tracking ticket in a commit message, and Gerrit is already be configured to make automatically links out of ticket numbers, it results in a mess. There is a bug report about this … Continue reading

Posted in Uncategorized | Leave a comment

Notepad++: automatic configuration of tabs vs. spaces

Notepad++ is a great text editor with lots of features out of the box, but I miss particularly one: the ability to use automatically tabs or spaces for indentation according to the content of an existing file when opening it. … Continue reading

Posted in Uncategorized | 1 Comment

Msys2/pacman: list dependencies with versions

Here is a one-liner to list all the dependencies for an Msys2 package, or for any pacman based system for that matter: Note: on my system, it works only for installed packages, even using the “-s” option: I don’t know … Continue reading

Posted in Uncategorized | Leave a comment

Groovy: StreamException: Cannot create XmlPullParser

If you get this error message, you might want to remove “xmlpull-1.1.3.1.jar” and “xstream-1.4.7.jar” from GROOVY_HOME/lib as a workaround. These libraries provided with Groovy seem to conflict with the ones used by the application. I didn’t notice any side effect … Continue reading

Posted in Uncategorized | Leave a comment

Perl’s “quote word” in Groovy

When it comes to embedding a long list of simple text strings in the code, Perl’s “quote word” is very handy: This is the closest equivalent I could find in Groovy: You can also use a multiline string : The … Continue reading

Posted in Uncategorized | Leave a comment

How to identify the end of lines used in a text file

ˆˆ It’s pretty easy to find files that have Windows end of lines (CRLF) with the GNU grep: And if you need to find files with Unix end of lines: But you may need more, for instance to find out … Continue reading

Posted in Uncategorized | 1 Comment

What you should know before choosing JIRA

At my current work place, 2 years ago, we needed an application to track the bugs, features and other todo items for several of our projects. We chose JIRA for various reasons: Large feature set Pretty good end user interface … Continue reading

Posted in Uncategorized | 12 Comments

Converting unsigned to signed integers (using Powershell or Excel)

Let’s assume you got unsigned 32 bit integers, that actually represent 32 bit signed integers (using 2’s complement). How to get back the original (negative) values? The formula is pretty easy: signed = (raw+2^31) % 2^32 – 2^31 In Excel: … Continue reading

Posted in Uncategorized | Leave a comment