Tag Archives: Code Snippets

Tempus library for programmatic thread dumps

Turns out doing a CTRL+Break (or equivalent kill <signal> <pid> on *nix) programmatically is a bit harder than I thought.  This thread talks about ways to do it, but the easiest was to use the Tempus library which has a … Continue reading

Posted in Java | Tagged , | Leave a comment

CamelCaseString to Space Separated String

groovy> print ‘CamelCaseString’.replaceAll(/([A-Z][a-z]*)/, ‘$1 ‘).trim()Camel Case String There is probably a better regex approach that does not a space to the final word, and thus remove the need for a trim, but this is quick and easily embeddable anywhere, for … Continue reading

Posted in Code Snippets, Groovy | Tagged , , , | Leave a comment