Category Archives: Uncategorized

Groovy: cloning nodes in an XML document

It’s pretty easy to clone nodes in a XML document using Groovy once XmlParser is used instead of XmlSlurper: The result is:   Advertisements

Posted in Uncategorized | Leave a comment

VMWare Fusion: the path “” is not valid path to the gcc binary.

A common error installing the VMWare tools in a Ubuntu guest is: In some cases, like when using an older version of Fusion with newer version of Ubuntu, an easy workaround is to use the opensource version of the VMWare … Continue reading

Posted in Uncategorized | Leave a comment

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