This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Requirements: Hg, Hg-Git, Git Bash | |
#!/bin/sh | |
hg clone $2 $1 | |
cd $1 | |
hg bookmark -r default master | |
hg gexport | |
mv .hg/git .git | |
rm -rf .hg | |
git init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write-Host "Remember to run in an x86 Powershell" | |
Import-Module WebAdministration | |
$start_dir = Get-Location | |
CD IIS:\ | |
New-Item AppPools\test.pool | |
Set-ItemProperty IIS:\AppPools\test.pool -name "enable32BitAppOnWin64" -Value "true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UriHelpers | |
parseUri: (url) -> | |
k = window.Common.UrlHelpers.UriParseModes | |
a || (a = window.document.createElement('a')) | |
#Let browser do the work | |
a.href = url | |
r = {} | |
r[k[i]] = a[k[i]] for i in [0..8] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected bool Equals(MyClass other) | |
{ | |
return Equals(Id, other.Id) && Equals(Name, other.Name) && Equals(Desc, other.Desc); | |
} | |
public override bool Equals(object obj) | |
{ | |
if (ReferenceEquals(null, obj)) | |
{ | |
return false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# <reference path="jquery-1.8.0.min.js" /> | |
# from: https:#gist.github.com/1039247 | |
### | |
* jQuery.ajaxQueue - A queue for ajax requests | |
* | |
* (c) 2011 Corey Frang | |
* Dual licensed under the MIT and GPL licenses. | |
* | |
* Requires jQuery 1.5+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET @rows = 5 --default | |
IF @purgeDate is NULL SET @purgeDate=getdate() | |
-- Only execute if there is work to do and continue | |
-- until all records with a PurgeDate <= now are deleted | |
WHILE EXISTS(SELECT * FROM WorkItemStatus WHERE PurgeDate <= @purgeDate) | |
BEGIN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FSharpOptionConverter : JsonConverter | |
{ | |
private static MethodInfo _getInnerValue = typeof (FSharpOptionConverter).GetMethod("GetInnerValue", | |
BindingFlags.Instance | | |
BindingFlags.NonPublic); | |
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) | |
{ | |
if (value != null) | |
{ | |
var optionValueType = value.GetType().GetGenericArguments().Single(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Select-Folder($message='Select a folder', $path = 0) { | |
$object = New-Object -comObject Shell.Application | |
$folder = $object.BrowseForFolder(0, $message, 0, $path) | |
if ($folder -ne $null) { | |
$folder.self.Path | |
} | |
} | |
function Add-Zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Net; | |
public class Input | |
{ | |
public string Guid {get;set;} | |
public string UsedBy { get;set;} | |
} | |
public static async Task<HttpResponseMessage> | |
Run(HttpRequestMessage req, TraceWriter log) |