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
<html> | |
<head> | |
<script src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script> | |
<style> | |
ul { | |
list-style-type: none; | |
} | |
</style> | |
</head> | |
<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
using Castle.Windsor; | |
using NUnit.Framework; | |
namespace WindsorInitConfig { | |
[TestFixture] | |
public class NoResolutionTests { | |
public interface IServiceA {} | |
public class ServiceA: IServiceA {} |
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
[TestFixture] | |
public class IIRFTests { | |
[Test] | |
[Factory("IIRFTestFactory")] | |
public void IIRFTest(string orig, string dest) { | |
File.WriteAllText(@"SampleUrls.txt", string.Format("{0}\t{1}", orig, dest)); | |
var r = RunProcess(@"TestDriver.exe", @"-d ."); | |
if (r.ErrorLevel != 0) { | |
var actual = Regex.Replace(r.Output.Replace("\r\n", " "), @".*actual\((.*)\).*", "$1"); | |
Assert.AreEqual(dest, actual); |
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
open System | |
open System.IO | |
let enumFiles = Seq.collect (fun p -> Directory.EnumerateFiles(".", p, SearchOption.AllDirectories)) | |
let procFile f = | |
printfn "%s" f | |
let lines = File.ReadLines f | |
|> Seq.map (fun l -> System.Text.RegularExpressions.Regex.Replace(l, "\r?\n", "\r\n")) | |
|> Seq.toArray | |
File.WriteAllLines(f, lines) |
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
module SQL | |
open System | |
open System.Data | |
open System.Data.SqlClient | |
open System.Text.RegularExpressions | |
open Microsoft.FSharp.Reflection | |
open Xunit | |
let connectionString = "data source=.;user id=sa;password=a;initial catalog=SomeDatabase" |
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
#r "CLSIClient.dll" | |
open CLSI | |
let token = "your_CLSI_token" | |
let compile = compile "http://clsi.scribtex.com/clsi/compile" | |
let req = Request.make(token = token, root = "tesis.tex", resources = [ | |
R("tesis.bib", fromFile "tesis.bib") | |
R("tesis.tex", fromFile "tesis.tex") | |
R("logo_fiuba_alta.jpg", fromUrl "http://github.com/mausch/Figment/raw/master/logo_fiuba_alta.jpg") |
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
module FSharp.Nullable | |
open System | |
open Microsoft.FSharp.Math | |
module Option = | |
let fromNullable (n: _ Nullable) = | |
if n.HasValue | |
then Some n.Value | |
else 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
#r "FSharp.PowerPack" | |
open System | |
open System.IO | |
open System.Security.Cryptography | |
let hashFile f = | |
use fs = new FileStream(f, FileMode.Open) | |
use hashFunction = new SHA512Managed() |
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
open System | |
open System.Net | |
open System.Net.Mail | |
open System.Threading | |
/// from http://msdn.microsoft.com/en-us/magazine/cc163467.aspx | |
type internal AsyncResultNoResult(callback: AsyncCallback, state: obj) = | |
let statePending = 0 | |
let stateCompletedSync = 1 | |
let stateCompletedAsync = 2 |
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
#!/bin/bash | |
# Idea from http://stackoverflow.com/questions/2144406/git-shallow-submodules | |
git submodule init | |
for i in $(git submodule | sed -e 's/.* //'); do | |
spath=$(git config -f .gitmodules --get submodule.$i.path) | |
surl=$(git config -f .gitmodules --get submodule.$i.url) | |
git clone --depth 1 $surl $spath | |
done | |
git submodule update |
OlderNewer