Skip to content

Instantly share code, notes, and snippets.

View hunt3ri's full-sized avatar

Iain Hunter hunt3ri

View GitHub Profile
@hunt3ri
hunt3ri / nedit.ps1
Created July 2, 2012 22:46
Powershell command to open Notepad++ from the commandline for the given filename
C:\"Program Files (x86)"\Notepad++\notepad++.exe $args[0]
@hunt3ri
hunt3ri / GetVersion
Created July 3, 2012 22:23
Get version number of executing assembly
Assembly.GetExecutingAssembly().GetName().Version.ToString()
@hunt3ri
hunt3ri / gzipIIS.xml
Created July 12, 2012 15:15
IIS Gzip Compression sample
<system.webServer>
<httpCompression
directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files"
dynamicCompressionDisableCpuUsage="90"
dynamicCompressionEnableCpuUsage="80"
maxDiskSpaceUsage="100" minFileSizeForComp="2700"
noCompressionForRange="true"
sendCacheHeaders="false"
staticCompressionDisableCpuUsage="100"
staticCompressionEnableCpuUsage="80"
@hunt3ri
hunt3ri / log4net-adoappender-config.xml
Created July 25, 2012 10:30
Log4Net AdoNetAppender sample config
<!--Configuration for log4net logging-->
<log4net>
<appender name="AdoNetAppender" type="Huzutech.Services.Application.Logging.HuzutechAdoNetAppender">
<bufferSize value="1" />
<threshold value="DEBUG" />
<connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<connectionString value="" />
<commandText value="INSERT INTO Log4NetLog ([Date],[Thread],[Level],[Logger],[Message],[Exception]) VALUES (@log_date, @thread, @log_level, @logger, @message, @exception)" />
<parameter>
<parameterName value="@log_date" />
@hunt3ri
hunt3ri / ccnet.xml
Created July 30, 2012 14:16
CCNET Sample Config
<project name="HuzuSocial-2">
<!--Create a label template that will create our tags as v2.0.buildnumber -->
<labeller type="defaultlabeller">
<prefix>2.0.25.</prefix>
<incrementOnFailure>false</incrementOnFailure>
<labelFormat>0000</labelFormat>
</labeller>
<!--Check for modifications every 60 seconds -->
<triggers>
@hunt3ri
hunt3ri / SampleMigration.cs
Created August 2, 2012 15:47
Sample FluentMigrator migration
using FluentMigrator;
namespace Nant.Builder.Sample.Migrations
{
[Migration(3)]
public class Mig003_CreateUserRoleTable : Migration
{
private const string TableName = "UserRole";
public override void Up()
@hunt3ri
hunt3ri / migration-config.xml
Created August 2, 2012 16:56
Nant.Builder sample migration config
<!-- Database Migration Settings - expects FluentMigrator-->
<property name="run.db.migrations" value="true" />
<!--The name of the project containing your FluentMigrator tests-->
<property name="migrations.project.name" value="Nant.Builder.Sample.Migrations" />
<!--Database type, eg sqlserver2008, sqlite -->
<property name="database.type" value="sqlite" />
<!--The connection string you for the db you want to migrate-->
<property name="connection.string" value="Data Source=C:\dev\tools\sqlite\nant-builder-sample.sqlite;Version=3;" />
<!-- Set flag to true if you wish to rollback a db migration, you need to specify a migration number also-->
<property name="rollback.db.migrations" value="false" />
@hunt3ri
hunt3ri / CopyAzureDb.sql
Created August 3, 2012 10:09
Copy Azure Database
CREATE DATABASE Iain_TEST_Copy
AS COPY OF Iain_TEST
@hunt3ri
hunt3ri / azureconsole.ps1
Created August 6, 2012 14:08
Setup Azure commands for Powershell
Import-Module "C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Azure.psd1"
Set-ExecutionPolicy RemoteSigned
@hunt3ri
hunt3ri / ImportAzureSettings.ps1
Created August 6, 2012 14:56
How to import your azure settings
Import-AzurePublishSettingsFile -PublishSettingsFile 'c:\users\<username>\downloads\your-credentials.publishsettings' -SubscriptionDataFile 'c:\dev\tools\windowsazure\subscriptions\your-sub.xml'