rblog

Last day of summer?

Not that it has been a lot of summer at all this year, it has been very wet, but yesterday I guess it might have been last day of summer this year. When heading home from work it was clear blue sky and pretty hot actually. I only needed to wear short/short. Pretty different from last weeks spring flood.

Short/short

Spring tide in Oslofjorden yesterday

Pictures are kinda bad, taken with the Nokia N81 I borrow while my phone is being fixed (they have spent almost three weeks now), but still you get the point. The first picture is taken at Skøyen, or to be more accurate along Bestumkilen. As you see people had to walk and cycle on the lawn due to sea water flooding the walkway.

Alongside Frognerstranda, care for some Coca Cola?

Stomperudrittet 2011

Last Sunday I attended in Stomperudrittet. 37 kilometers with plenty of mud, mud and more mud. Due to heavy rain the last month in fact it was really heavy conditions, tires where sucked down into the mud in a way I had never experienced before. Even going downhill on the fields were really heavy and I was not able to gain any speed at all, in fact running was almost as easy. But – very much fun also.

My plan was to film before start and afterwards, since my friends Anders and Lars also attended, but I did not bother. Only thing I had in my mind when I had passed the finish line was to clean my bike and then myself. And when at home I even had to flush them using the garden hose.

Hoping for better conditions next year.

Oh what a beautiful morning

OBS-varsel for Vestfold, Østfold og Buskerud, Oslo og Akershus:I natt og fram til søndag formiddag lokalt kraftige byger med store nedbørverdier.

Google translate translates this into:

OBS alert for Vestfold, Østfold and Buskerud, Oslo and Akershus: Last night until Sunday morning locally heavy showers with heavy rain values.

And I’m about to participate in Stomperudrittet…looking forward to it…not really sure

Regex in Groovy: Match characters and some special ones

I’m writing a script that validates a file with key/value-pairs. One type of a valid value is a JNDI-name. Before the actual name it is also a whitespace. So my if-statement with the regex validating ended up like this

currentLine ==~ /^.*=\s+[A-Za-z0-9\/-]+/

To explain it:

  • ==~ means validate true/false, see http://groovy.codehaus.org/Tutorial+4+-+Regular+expressions+basics
  • Then the regex starts and ends with a forward slash
  • ^.*= means match lines with text containing any type of character ending with an equal sign (the keys)
  • \s+ means match one or more whitespaces. Should really just need to verify one and only one, but what the heck…
  • [A-Za-z0-9\/-]+ is a character class saying match all uppercase letters, all lowercase, all numbers and also forward slashes and hyphens. Some of the names have hyphens so I needed that one to. The + sign at the end says “one or more occurences”, see the heading “Regular Expression Operators” found on the above mentioned link

Hjem