Skip to content

Instantly share code, notes, and snippets.

View b0urb4k1's full-sized avatar
🐮
Shaving Yaks

Nicolas Bourbaki b0urb4k1

🐮
Shaving Yaks
View GitHub Profile
@b0urb4k1
b0urb4k1 / gist:9110817
Created February 20, 2014 10:30
TaskQueue
We couldn’t find that file to show.
@b0urb4k1
b0urb4k1 / config.rs
Created March 27, 2014 08:27
config
use std::hashmap::HashMap;
pub enum Value {
Single(~str),
Object(~[Value]),
List(~[Value])
}
pub struct Config {
map : HashMap<~str, Value>
using System.Reactive.Subjects;
using System.Reactive.Linq;
using System;
using LanguageExt;
using static LanguageExt.Prelude;
using static Shock.Strategies;
using System.Collections.Generic;
using static Shock.BusinessLogic;
using System.Linq;
using System.Reactive.Subjects;
using System.Reactive.Linq;
using System;
using LanguageExt;
using static LanguageExt.Prelude;
using static Shock.Strategies;
using System.Collections.Generic;
using static Shock.BusinessLogic;
using System.Linq;
using System.Reactive.Disposables;
// Also note LDR_MODULE info here: http://stackoverflow.com/questions/4242469/detect-when-a-module-dll-is-unloaded
class LoaderNotification : IDisposable
{
public enum Reason : uint
{
Loaded = 1,
Unloaded = 2
}
public class NotificationEventArgs : EventArgs
public static void RedirectAssembly(string shortName, Version targetVersion, string publicKeyToken) {
ResolveEventHandler handler = null;
handler = (sender, args) => {
// Use latest strong name & version when trying to load SDK assemblies
var requestedAssembly = new AssemblyName(args.Name);
if (requestedAssembly.Name != shortName)
return null;
Debug.WriteLine("Redirecting assembly load of " + args.Name
#r "../packages/FAKE/tools/FakeLib.dll"
open Fake
let configuration = getBuildParamOrDefault "configuration" "Release"
let platform = getBuildParamOrDefault "platform" "x64"
let testMode = getBuildParamOrDefault "testMode" ""
let targett = getBuildParamOrDefault "targett" "Build"
let verbosity = getBuildParamOrDefault "verbosity" "Quiet"
let project = getBuildParamOrDefault "project" ""
import Html exposing (div, button, text, span, table, tr, td, br, tbody, img)
import Html.App exposing (beginnerProgram)
import Html.Events exposing (onClick)
import Html.Attributes exposing (hidden, style, src)
import List exposing (member, filter, map, concat)
type alias Entry =
{ text : String
, errorText : String
, index : Int
open System.Text.RegularExpressions
open System.IO
open System.Collections.Generic
type Project =
{ name : string
; location : string
; guid : string
; dependencies : string list
}
// helper method to create channels
private static IObservable<string> CreateChannelStream(
string name, CompositeDisposable disposables)
{
// this hacks together a demo channel stream -
// a stream of "frames" for the channel
// for simplicity rather than using images, I use a string
// message for each frame
// how it works isn't important, just know you'll get a
// message event every second