Converting Unix Timestamps to and from C# DateTime

To my surprise it turns out the .NET framework doesn't have built in conversion to and from UNIX timestamps. Here's two helper functions I should try to remember:

static double ConvertToUnixTimestamp(DateTime date)
{
        DateTime origin = new DateTime(1970, 1, 1, 0, 0, 0, 0);
        TimeSpan delta = date - origin ...
more ...

Cracking SecureW2 hashes

This is a C function to crack SecureW2 hashes, which are stored in the windows registry in the "SoftwareSecureW2MethodsDefaultProfilesDEFAULTCredentialsUserPassword" key. Change the last DEFAULT with the username, if you need to. The hash looks like this:

4C4626383636374644375043514458344D...(truncated)

Two characters make one character and every other combined character is added ...

more ...

The story of the most annoying Windows peculiarity ever

Once upon a time there was an operating system that decided to do lengthy updates when you were just about to run and catch a train. It sucked big time.

updates

... Couldn't it at least be "Please do not turn off your computer."? This message alone makes me want to ...

more ...

Mpd Alarm Clock

Another script I regularly use. It sets an alarm that slowly raises the volume of mpd to wake me up nicely to my own music. For power saving and noise considerations it can put the PC in sleep mode to be woken up just before the alarm goes off.

more ...

Random wallpaper with random fortune

I hacked together a small script which rotates my wallpaper and overlays a fortune quote. Why? I have no idea. Just thought I should share my scripts more often, so here it is.

more ...