Skip to content

Instantly share code, notes, and snippets.

@gshutler
gshutler / EntityMap.cs
Created April 2, 2010 21:31
Demonstration of how to back a GUID with a string column with Fluent NHibernate
using FluentNHibernate.Mapping;
using Custom.Domain;
using Custom.Mappings.UserTypes;
namespace Custom.Mappings
{
public abstract class EntityMap<T> : ClassMap<T> where T : Entity
{
protected EntityMap()
{
@markembling
markembling / hosts.ps1
Created August 24, 2009 13:38
Powershell script for adding/removing/viewing entries to the hosts file.
#
# Powershell script for adding/removing/showing entries to the hosts file.
#
# Known limitations:
# - does not handle entries with comments afterwards ("<ip> <host> # comment")
#
$file = "C:\Windows\System32\drivers\etc\hosts"
function add-host([string]$filename, [string]$ip, [string]$hostname) {