Named anchors with Posterous

Luke Sampson
January 17, 2011

Posterous automatically strips out id or name attributes that you apply to divs when you edit the HTML source of a post. One way around it is to add an empty anchor with a name attribute just before the section you want to name, like so:

<a name=”anchor_name”></a>

Then a #anchor_name fragment in the URL will work, . . .

Read More

Generating a settings class from XML with T4

Luke Sampson
March 25, 2010

I’ve just posted a couple of T4 templates on CodePlex which you can use to generate a Settings class from XML. You get a compiled class which handles type checking, thread safety and loading and saving the settings to your database. You’ll never again have to worry about unloading your application when settings are updated.

A note . . .

Read More

Entering and exiting HTTPS with ASP.NET MVC

Luke Sampson
March 24, 2010

I think I’ve found a relatively painless and DRY way to apply SSL/HTTPS selectively to certain actions in an ASP.NET MVC application.

I’ve looked into several approaches including Steve Sanderson’s self-admittedly hack-ish approach which I won’t go into here because it’s an excellent article revealing why this is a difficult problem . . .

Read More

Random Word Generator

Luke Sampson
January 11, 2010

I wanted to auto-generate passwords that were random but not the sort of unreadable gibberish that comes from just combining letters and numbers (you know, stuff like 8ajOga64asiHip). Something close enough to language that a human can read it and remember it.

I couldn’t find anything like this, so I came up with my own random word . . .

Read More

CAS on Windows: localhost setup in 5 mins

Luke Sampson
January 03, 2010

CAS (Central Authentication System) is a simple, secure single sign-on system. In my experience connecting CareerHub to university login systems, I love it when unis use CAS because it’s so elegantly simple to integrate with.

If you need to test CAS authentication in a Windows development environment, these step-by-step instructions . . .

Read More

2 More Reasons Why You Might Get A Blank Page in IIS7

Luke Sampson
October 28, 2009

I’m still fairly new to IIS 7 and getting used to the blank pages it serves up when it’s not happy with the way you’ve configured a website. It reminds me a bit of the kind of error handling you used to see sometimes in VB6 with

on error resume next

I think the philosophy that this sort of error-handling follows is along the . . .

Read More

Ruby on Rails editors for Windows

Luke Sampson
August 22, 2009

I’ve recently started learning Ruby and naturally one of the first things I needed to do was to find a good development environment. Notepad2 is great for Hello World applications but for anything more complex it becomes a bit painful. So I began my search for the best Ruby (and Rails) development environment I could find on Windows.

. . .

Read More

Archive
   Subscribe by email and never miss a post.

This update link alerts you to new Silvrback admin blog posts. A green bubble beside the link indicates a new post. Click the link to the admin blog and the bubble disappears.

Got It!