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.Data; | |
using System.Data.SqlClient; | |
namespace DbSlim | |
{ | |
public class Insert | |
{ | |
private string connectionString; |
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
#------------------------------------------------------------------------------- | |
# Downloads photos from National Geographic's Photo Contest | |
#------------------------------------------------------------------------------- | |
param($res = '1280', $year = '2008') | |
$client = New-Object System.Net.WebClient | |
$client.Headers.Add('User-agent', 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)') | |
$prefixes = @{ | |
'2008' = @('1107', '1103', '1027', '1020', '1014', '1006', '0929', '0922', |
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 class when_a_benchmark_has_more_than_3_percent_assets_more_than_5_percent_change_in_weight | |
{ | |
Establish context = () => | |
{ | |
Input input; | |
given.input.for_account("XYZ123").called(out input) | |
.with_position().on(Clock.Today) | |
.with_an_asset_valued_at(10).cusip("1") | |
.with_an_asset_valued_at(90).cusip("2") |
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
namespace StupidExample { | |
public class CustomerGateway { | |
IUnitOfWorkManager work; | |
public CustomerGateway(IUnitOfWorkManager work) { this.work = work; } | |
public IEnumerable<Customer> GetNewCustomersSince(DateTime time) { | |
work.On("CustomerDB", session => | |
session.CreateCriteria<Customer>() |
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
function Hello($name) { | |
"Hello, $name, from included 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
;=============================================================================== | |
; 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 |
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
. .\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 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
#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 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
;; | |
;; 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 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.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; |