This file contains hidden or 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; | |
using System.Collections.Generic; | |
using System.Web.Mvc; | |
using System.Web.WebPages; | |
namespace Web.Extensions { | |
public static class JavascriptIncludeExtensions { | |
private const string JscriptIncludeViewdata = "__jsrq"; | |
private const string JscriptDeferViewdata = "__jsdf"; |
This file contains hidden or 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; | |
using System.Collections.Generic; | |
using System.Web; | |
using System.Web.Mvc; | |
using System.Web.WebPages; | |
namespace Web.Extensions { | |
public static class JavascriptIncludeExtensions { | |
private const string JscriptIncludeViewdata = "__jsrq"; | |
private const string JscriptDeferRazorViewdata = "__jsdfrz"; |
This file contains hidden or 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-PSReadlineOption -BellStyle None | |
# Clone `https://github.com/dahlbyk/posh-git.git` to C:\Gits | |
Import-Module 'C:\Gits\posh-git\src\posh-git.psd1' | |
set-executionpolicy Unrestricted process | |
$baseDir = Split-Path -parent $MyInvocation.MyCommand.Definition | |
#. "$baseDir\hand.ps1" | |
# General actions | |
function edit ($file) { & "${env:ProgramFiles(x86)}\Notepad++\notepad++.exe" $file } |
This file contains hidden or 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; | |
using System.Reflection; | |
using System.Web; | |
namespace Host | |
{ | |
public class Global : HttpApplication | |
{ | |
protected void Application_BeginRequest (object sender, EventArgs e) { | |
if (HttpContext.Current.Request.RawUrl.StartsWith(RestHandler.RestPrefix)) { |
This file contains hidden or 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; | |
namespace Common { | |
public sealed class Extract<I> { | |
internal sealed class StaticWrapper<Ti, Tt> { | |
private static readonly WrapperBase Prototype; | |
static StaticWrapper () { | |
Prototype = WrapperGenerator.GenerateWrapperPrototype(typeof(Ti), typeof(Tt)); | |
} | |
public static Ti Cast (Tt src) { |
This file contains hidden or 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
#!/bin/bash | |
pushd ~/.gvfs/work\ on\ iain-2003svrvm | |
folders=( */ ) | |
for location in "${folders[@]%*/}"; do | |
pushd $location | |
git pull origin master | |
popd | |
done |
This file contains hidden or 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
SELECT | |
CAST(MIN(CAST(myGuid AS BINARY(16))) AS UNIQUEIDENTIFIER) AS [TheGuid], | |
COUNT(myGuid) AS [ItsCount] | |
FROM MyTable | |
GROUP BY myGuid |
This file contains hidden or 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 static IEnumerable<T> SelectAs<T> (this IEnumerable<dynamic> source, Func<dynamic, T> selector){ | |
return source.Select(selector); | |
} |
This file contains hidden or 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
#pragma warning disable 169 // ReSharper disable StaticFieldInGenericType, InconsistentNaming | |
using System; | |
using System.Transactions; | |
namespace Machine.Specifications { | |
public abstract class ContextAndResult<TSubject, TResult> { | |
protected static Exception the_exception; | |
protected static TSubject subject; | |
protected static TResult result; |
This file contains hidden or 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
=()=> |
OlderNewer