Tore Lervik

Welcome to my personal homepage where I write mostly about technical stuff that matters (to me) and what I have on my mind. I'm a C# .NET person with a range of interests from jQuery and snowboarding to Mvc and Windows Phone.

Kollektivt for Windows Phone

Kollektivt er en trafikanten-app for Windows phone. Applikasjonen er designet fra bunnen av for at du skal nå ønsket informasjon med færrest mulig steg.

Applikasjonen er tilgjengelig på marketplace

Windows Phone 7 - Snippets for databinding

When I work on applications for Windows Phone I always use view models to store data. I'm generally using two snippets to avoid writing the same markup over and over.

I got asked if I could share the snippets, so here they are :)

Minifier.Mvc on NuGet

I have designed this package to work on the usual whitespaces created when building ASP.NET applications. The idea is for it to be lightweight and fast, while still removing as much as possible.

Minifier.Mvc is a small library for minifying html in ASP.NET Mvc applications. The package allows for compression while maintaining speed.

Microsoft.Web.Optimization + development

Microsoft has released a tool called ASP.NET Optimization - Bundling on NuGet. The package allows for easy minification and bundling of css and js files.

While bundling and minification are great, under development it can be pain to debug minified files. Today I'm looking at how to disable the minification process while in development.

Optimizing without drawbacks

There are a lot of ways to optimize your website for faster delivery and smaller footprint. I'm looking at some optimization's in ASP.NET that doesn't cost in terms of being dynamic or locking down content because of caching issues.

Oslo Bysykkel now on the marketplace

My Windows Phone app for viewing rental bikes in Oslo is now live on the marketplace! The application will help you find available bikes or racks easy and quickly.

Oslo Bysykkel for Windows Phone

Oslo bysykkel is a service in Oslo, Norway for renting bikes in the city. The racks are located all over the city making it an easy service to use.

I've created a Windows Phone applicaton to view status of the racks and to easily find a free bike or empty lock to return it to. You can see racks close to you, pan around on the map, search for addresses or select a rack from your favorites.

Hyper-V Monitor Gadget

The latest version of the gadget is now available on CodePlex! The project has been moved to CodePlex to allow more people to participate. Version 5.2.5 comes with changes regarding Hyper-V SP1 and some other tweaks.

The gadget can list multiple servers at once and also support vmconnect when double clicking on a VM.

CacheMode and why it matters

CacheMode is a property found on most controls you use in your Windows Phone applications. Caching can give a big performance boost to your application, but it can be hard to know where you should use it.

Theme Resources for Windows Phone

I've put together a useful template that uses the Theme Resources built into the Windows Phone. The template displays the result of the theme resources available on Msdn. The source code is included.

How to regex anything except a given word

One feature i wanted for my blog was a bbcode system where I can wrap [tag]tags[/tag] around text to format it according to my presets. However, the regex to match this proved to be somewhat a challenge.

List virtual machines in Hyper-V with PowerShell

Ben Armstrong made a post on how you should retrive a list of your virtual machines and their operation system. With this script as a base I started on making a Get-VmInfo function that should retrive a list of VM's with some usefull information.

PowerShell profile and a sample script

PowerShell has a profile feature that is a .ps1 script that loads when you open PowerShell. This script is neat for storing custom functions that come in handy. The script is not there by default so you have to create it yourself.