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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" > | |
<head> | |
<title>Geolocation Demo</title> | |
<script src="http://ajax.microsoft.com/ajax/jQuery/jquery-1.4.2.min.js" type="text/javascript"></script> | |
<script src="http://maps.google.com/maps/api/js?sensor=false"></script> | |
<script src="Geolocation.js" type="text/javascript"></script> | |
<style type="text/css"> | |
body |
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
// run unit tests in node like this: | |
// node Suteki.TestRunner.js | |
// | |
// Unit tests should be named like this: | |
// Suteki.<name target>.Tests.js | |
// | |
// A test looks like this: | |
// | |
// (function(){ | |
// |
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.Data; | |
using FluentNHibernate.Cfg; | |
using FluentNHibernate.Cfg.Db; | |
using FluentNHibernate.Conventions; | |
using FluentNHibernate.Mapping; | |
using NHibernate; | |
using NHibernate.Cfg; | |
using NHibernate.SqlTypes; | |
using NHibernate.Tool.hbm2ddl; |
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; | |
namespace Suteki.Common.Windsor | |
{ | |
public class IoC | |
{ | |
private static Func<Type, object> resolve; | |
private static Action<object> release; | |
public static T Resolve<T>() |
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.Linq; | |
using Castle.Windsor; | |
namespace Suteki.Common.Windsor | |
{ | |
public static class WindsorExtensions | |
{ | |
public static void CheckRegistration<TService, TImplementation>(this IWindsorContainer container) | |
{ | |
var handlers = container.Kernel.GetHandlers(typeof(TService)); |
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
import List | |
import Control.Applicative | |
euler1 = sum $ nub $ [3,6..999] ++ [5,10..999] | |
fib = let fib' a b = a : fib' b (a+b) in fib' 0 1 | |
euler2 = sum . (filter even) . takeWhile (<4000000) $ fib | |
factor n = [x|x <- [2..(floor(sqrt(fromInteger n)))], n `mod` x == 0] |
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
// from the QTRecorder sample application in the MonoMac source | |
// In QTRDocument contructor .... | |
// ---- Add image capture output | |
var decompressedVideoOuput = new QTCaptureDecompressedVideoOutput(); | |
NSError error2; | |
decompressedVideoOuput.DidOutputVideoFrame += (sender, e) => | |
{ | |
// var frame = e.SampleBuffer; |
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.Linq; | |
using System.Threading.Tasks; | |
using Xunit; | |
namespace MyProject.Tests | |
{ | |
public class AsyncNamingConventionTests | |
{ | |
[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
[<Test>] | |
[<Explicit>] | |
let ``get hostname`` () = | |
ssh (print <!> hostname) | |
[<Test>] | |
[<Explicit>] | |
let ``should be able to put a file on the nginx server`` () = | |
scp (putFile testFileName content) | |
ssh (reader { |
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
// ReSharper disable InconsistentNaming | |
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using EasyNetQ.ConnectionString; | |
using EasyNetQ.Loggers; | |
using EasyNetQ.Producer; |