Local Caching Maven Proxy

So, here’s the drill. Your company has mandated a specific maven config to use that routes everything (including central) via their (often flaky, and often sonotype nexus - not related) servers. Which makes sense for a build machine for sure, but less so when you’re trying to iterate quickly in development. Combine this with mavens tendency to re-check absolutely everything, and throw in working remotely over a VPN that was fitted by a ‘lowest estimate’ outfit, and building can be a bit of a pain in the arse. So, what do you do? You install a local caching maven proxy!

Read More

Parsing dates in .NET

Had to parse a time stamp today that DateTime.Parse() laughed at. Thought about writing an IFormatProvider (one of the overloads of the .Parse method) which looked complicated, but instead stumbled on this:

DateTime.ParseExact(String, String, IFormatProvider)

You know how you can custom output DateTimes based on a string (e.g. ‘dd/MMM/yy’)? It works in reverse too.

Read More

Reading from the windows event log

Dead simple this, you create an instance of System.Diagnostics.EventLog, and you can iterate over the entries of any log you want, provided your account has access. There is an overload to the constructor that will allow you to read the logs of other machines, though I’ll admit, I haven’t tried it yet!

Read More