Skip to content

Instantly share code, notes, and snippets.

alert(1);

ScumDB

ScumDB is a tool for managing database changes through your source code version control system.

It's a bit like a migration frame work, however:

  • changes are SQL based - you dont need to learn a new syntax
  • Database Version numbers are the same as mercurial (or git) revision Ids
  • SProc and UDF definitions are checked in just like regular source code functions

Usage

Unit testing, Integration testing & Dependency Injection with Microsoft .NET Core

We'll walk through the basics of setting up a test projects using dotnet test, and take you through including Microsoft's dependency injection framework and writing Integration test.

Project setup

You'll want to set up three projects - a class library and two test projects like so:

mkdir WeatherConverter
cd WeatherConverter
  • White-faced heron
  • Kingfisher
  • Welcome swallow
  • Pied stilt
@rdsimes
rdsimes / gitdeployment.md
Last active August 9, 2016 05:12
Setting up git deployment on windows

Continuous deployment with git on Windows

These are some notes to accompany my talk on continuous deployment for ASP.NET with git. Here you'll find all the tools, commands & setup that I mentioned.

I've tried a bunch of different methods of deploying, and find this to be the simplest, easiest way to set up continuous deploy for ASP.NET while still being powerfull and flexible.

Firstly, I like to ensure I have the following tools installed, to make life on windows a bit less painful:

@rdsimes
rdsimes / restart-visual-studio.ps1
Last active July 23, 2017 03:51
Super useful powershell scripts for stopping and starting Visual Studio for the solution in your working directory
function Stop-Vs {
$currentApp = Split-Path $pwd -leaf
Get-Process -Name devenv | where {$_.mainWindowTitle -like "*$currentApp*"} | Stop-Process
}
function Start-Vs {
$currentApp = Split-Path $pwd -leaf
& .\$currentApp.sln
}
@rdsimes
rdsimes / test.html
Last active December 10, 2015 05:08
<html>
<head></head>
<body>
Hello
</body>
</html>
@rdsimes
rdsimes / unix-timestamp.ps1
Created December 19, 2012 00:46
converts a PowerShell/.NET DateTime to a unix timestamp (Milliseconds since 1 Jan, 1970) Useful for creating JSON that can be understood by the .NET JavaScriptSerializer
function ConvertTo-UnixTimestamp {
$epoch = Get-Date -Year 1970 -Month 1 -Day 1 -Hour 0 -Minute 0 -Second 0
$input | % {
$milliSeconds = [math]::truncate($_.ToUniversalTime().Subtract($epoch).TotalMilliSeconds)
Write-Output $milliSeconds
}
}
Get-Date | ConvertTo-UnixTimestamp
// testing out gists
(function(){
var i = 9;
i += 3;
console.log(i);
}());