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 interface IFileSaverService { | |
void SaveFile(byte[] bytes, string filename); | |
} | |
public class LocalFileSystemSaver : IFileSaverService { | |
public void SaveFile(byte[] bytes, string filename) { | |
... | |
} | |
} | |
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 ClientController : BaseController { | |
private IClientManagementService _clientManagementService = null; | |
public ClientController(IClientManagementService clientManagementService) { | |
_clientManagementService = clientManagementService; | |
} | |
// this will work both for an HTTP GET (the returned value will got into the property | |
// bag for the view to use) or for a JSON response (just like JsonReturnBinder - in fact |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Text; | |
using System.ComponentModel; | |
using WpfApplication1.Models; | |
namespace WpfApplication1.ViewModels | |
{ |
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
#light | |
let ( ||| ) p1 p2 s = | |
match p1 s with | |
| Some _ as v -> v | |
| None -> p2 s | |
let ( ++ ) p1 p2 s = | |
match p1 s with | |
| None -> None |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using Castle.MonoRail.Framework; | |
using System.Collections; | |
using System.Reflection; | |
using Newtonsoft.Json; | |
using System.IO; | |
using System.Text; |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using Castle.Windsor; | |
using Castle.Core.Resource; | |
using Castle.MonoRail.WindsorExtension; | |
using Ris.Fx.Web.Controllers; | |
using Castle.MicroKernel.Registration; | |
using Castle.MonoRail.Framework; |
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
;; | |
;; my .emacs for the linux machine I am about to repurpose... | |
;; | |
(add-to-list 'load-path "~/.emacs.d") | |
;; | |
;; Use Consolas as my default font | |
;; | |
;;(set-default-font "Consolas-11") | |
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
#light | |
open System.Web | |
open System.Collections.Generic | |
open System.Text.RegularExpressions | |
let handlers = new List<(string -> bool) * (HttpContext -> unit)>() | |
let find_handler_for (ctxt:HttpContext) = | |
handlers |> Seq.tryfind (fun h -> ctxt.Request.Path |> fst h) |
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
. .\Scripts\Startup.ps1 | |
$integrationFixture = "$env:ProjectRoot\Product\IntegrationTests\Ris.Fx.Integration.Tests\bin\Debug\Ris.Fx.Integration.Tests.dll" | |
function Start-WebDev { | |
$webdev = "$env:CommonProgramFiles\Microsoft Shared\DevServer\9.0\WebDev.WebServer.exe" | |
$webdir = "$env:ProjectRoot\Product\Production\Ris.Fx.Web" | |
$arguments = @( | |
'/port:9008', |
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
;=============================================================================== | |
; Map C-L to "cls" in console windows, like most unix-ish terminals do | |
;=============================================================================== | |
SendMode Input | |
#IfWinActive ahk_class ConsoleWindowClass | |
^L:: | |
Send cls{Enter} | |
#IfWinActive |