Skip to content

Instantly share code, notes, and snippets.

$ sudo apt-get install erlang
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
@grahamrhay
grahamrhay / workrave.ini
Created October 18, 2013 17:33
workrave.ini
[timers]
micro_pause.limit=180
micro_pause.auto_reset=30
micro_pause.reset_pred=
micro_pause.snooze=150
micro_pause.monitor=
micro_pause.activity_sensitive=true
rest_break.limit=2700
rest_break.auto_reset=600
rest_break.reset_pred=
@grahamrhay
grahamrhay / .vimrc
Last active December 25, 2015 19:19
.vimrc
execute pathogen#infect()
syntax on
filetype plugin indent on
set expandtab
set tabstop=4
set shiftwidth=4
set ruler
set number
@grahamrhay
grahamrhay / Enable_fusion_log.reg
Created October 31, 2012 16:58
Enable fusion log
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion]
"LogPath"="C:\\fusionlogs\\"
"LogFailures"=dword:00000001
@grahamrhay
grahamrhay / bootstrap.ps1
Created February 12, 2012 10:41
Bootstrap a clean VM, using Chocolatey
$ErrorActionPreference = "Stop";
Set-StrictMode -Version Latest
$webClient = new-object net.webclient
$destination = "$env:Temp\dotNetFx40_Full_setup.exe"
Write-Host "Downloading .net 4"
$webClient.DownloadFile('http://download.microsoft.com/download/1/B/E/1BE39E79-7E39-46A3-96FF-047F95396215/dotNetFx40_Full_setup.exe', $destination)
iex start /wait $destination /q
@grahamrhay
grahamrhay / SurroundTemplates.xml
Created November 24, 2011 17:21
ReSharper (6.0) Surround Templates
<TemplatesExport family="Surround Templates">
<Template uid="9571820d-6367-4e51-92bd-3de6947e45cd" shortcut="" description="Assert.Throws" text="Assert.Throws&lt;$EXCEPTION_TYPE$&gt;(() =&gt; $SELECTION$)" reformat="True" shortenQualifiedReferences="True">
<Scopes>
<Scope type="InCSharpFile" minimumLanguageVersion="2.0" />
<Scope type="InCSharpExpression" minimumLanguageVersion="2.0" />
</Scopes>
<Categories />
<Variables>
<Variable name="EXCEPTION_TYPE" expression="completeType()" initialRange="0" />
</Variables>
@grahamrhay
grahamrhay / LiveTemplates.xml
Created November 24, 2011 11:14
ReSharper (6.0) Live Templates
<TemplatesExport family="Live Templates">
<Template uid="bb381613-09ac-4d93-8ead-6950c152d62e" shortcut="t" description="Test" text="[NUnit.Framework.Test]&#xD;&#xA;public void $TEST_NAME$()&#xD;&#xA;{&#xD;&#xA; &#xD;&#xA;}" reformat="True" shortenQualifiedReferences="True">
<Scopes>
<Scope type="Everywhere" />
</Scopes>
<Categories />
<Variables>
<Variable name="TEST_NAME" expression="" initialRange="0" />
</Variables>
<CustomProperties />
public static class StructureMapAssert
{
public static void AssertSingleton<T>(this IContainer container)
{
var instance1 = AssertResolvable<T>(container);
var instance2 = AssertResolvable<T>(container);
Assert.That(instance1, Is.SameAs(instance2));
}
public static void AssertTransient<T>(this IContainer container)