Skip to content

Instantly share code, notes, and snippets.

@WizzApp
WizzApp / boxstarter.txt
Last active August 29, 2015 14:10
Boxstarter Skript
Set-StartScreenOptions -EnableBootToDesktop -EnableDesktopBackgroundOnStart -EnableShowStartOnActiveScreen -EnableSearchEverywhereInAppsView -EnableListDesktopAppsFirst
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar
choco install putty
choco install SublimeText3
choco install 7zip
choco install ruby
choco install TortoiseGit
choco install Cmder
choco install git.install
@WizzApp
WizzApp / WcfMessageLogger.cs
Created May 22, 2013 13:18
How to log the raw xml messages in WCF
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.ServiceModel.Configuration;
using System.ServiceModel.Description;
using System.ServiceModel.Dispatcher;
using System.Text;
using log4net;
@WizzApp
WizzApp / CodeOfTheDay20130319.cs
Created March 19, 2013 13:53
Code of the day
try {
dbContext.SaveChanges();
return true;
}
catch (Exception e) {
// TODO: send mail
return false;
}
@WizzApp
WizzApp / script.sql
Created January 2, 2013 12:17
Delete all data from all tables ignoring foreign keys
-- Taken from http://stackoverflow.com/a/1899881/278708
EXEC sp_MSForEachTable 'ALTER TABLE ? NOCHECK CONSTRAINT ALL'
GO
EXEC sp_MSForEachTable 'DELETE FROM ?'
GO
EXEC sp_MSForEachTable 'ALTER TABLE ? CHECK CONSTRAINT ALL'
GO
@WizzApp
WizzApp / EFDatabaseTest.cs
Created September 5, 2012 11:39
Base class for db integration tests with EF and xUnit
using System;
using System.Configuration;
using System.Data.Objects;
using System.Data.SqlClient;
namespace Varta.VartaGuide.Tests.Integration
{
public class EFDatabaseTest<CONTEXTTYPE> where CONTEXTTYPE:ObjectContext, new()
{
public DbContext DbContext { private set; get; }
@WizzApp
WizzApp / KayakStarter.cs
Created March 23, 2012 18:17
Nancy with Kayak
using System;
using System.Net;
using Kayak;
namespace HelloWorld
{
public class KayakStarter : ISchedulerDelegate
{
public static void Start(int port, bool debug)
{
@WizzApp
WizzApp / ClientApplication.cs
Created November 24, 2011 12:09
Automatic updates for windows client applications (Winforms/WPF)
var updateServer = new UpdateServer("https://updateserver.com/updates");
var versionInfo = s.GetVersionInfo("TestApplication");
if (versionInfo.Version > ApplicationVersion)
{
MessageBox.Show("An update for your application is available");
}