Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
| %%% Run with 'escript app_deps.erl' | |
| %%% Change the path in filelib:wildcard/1 as required to capture all | |
| %%% your dependencies. | |
| %%% | |
| %%% Rectangular nodes will represent library apps (no processes involved) | |
| %%% and the circular nodes will represent regular apps. An arrow going from | |
| %%% 'A -> B' means 'A depends on B'. | |
| %%% | |
| %%% This script depends on graphviz being present on the system. | |
| -module(app_deps). |
| <#@ template debug="true" hostspecific="true" language="C#" #> | |
| <#@ output extension=".d.ts" #> | |
| <# /* Update this line to match your version of SignalR */ #> | |
| <#@ assembly name="$(SolutionDir)\packages\Microsoft.AspNet.SignalR.Core.1.0.0-rc1\lib\net40\Microsoft.AspNet.SignalR.Core.dll" #> | |
| <# /* Load the current project's DLL to make sure the DefaultHubManager can find things */ #> | |
| <#@ assembly name="$(TargetPath)" #> | |
| <#@ assembly name="System.Core" #> | |
| <#@ assembly name="System.Web" #> | |
| <#@ assembly name="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" #> | |
| <#@ assembly name="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" #> |
| <#@ template debug="true" hostspecific="true" language="C#" #> | |
| <#@ output extension=".d.ts" #> | |
| <# /* Update this line to match your version of SignalR */ #> | |
| <#@ assembly name="$(SolutionDir)\packages\Microsoft.AspNet.SignalR.Core.1.0.1\lib\net40\Microsoft.AspNet.SignalR.Core.dll" #> | |
| <# /* Load the current project's DLL to make sure the DefaultHubManager can find things */ #> | |
| <#@ assembly name="$(TargetPath)" #> | |
| <#@ assembly name="System.Core" #> | |
| <#@ assembly name="System.Web" #> | |
| <#@ assembly name="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" #> | |
| <#@ assembly name="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" #> |
| (* | |
| This script analyzes the dependencies between top level types in a .NET Assembly. | |
| It is then used to compare the dependency relationships in some F# projects with those in some C# projects. | |
| Note that no attempt has been made to optimize the code yet! | |
| REQUIRES: | |
| * Mono.Cecil for code analysis | |
| From http://www.mono-project.com/Cecil#Download |
| {-# LANGUAGE ParallelArrays #-} | |
| {-# OPTIONS -fvectorise #-} | |
| module SMVMVectorised (smvmPA) where | |
| import Data.Array.Parallel.Prelude | |
| import Data.Array.Parallel.Prelude.Double as D | |
| import Data.Array.Parallel.Prelude.Int as I | |
| import qualified Prelude as P |
| import com.twitter.util.{Future => TwFuture} | |
| import scala.concurrent.{Future => ScFuture, promise => ScPromise} | |
| implicit def twFutureToScala[T](twFuture: TwFuture[T]): ScFuture[T] = { | |
| val prom = ScPromise[T] | |
| twFuture.onSuccess { res: T => | |
| prom.success(res) | |
| } | |
| twFuture.onFailure { t: Throwable => | |
| prom.failure(t) | |
| } |
Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
| // add reference: Newtonsoft.Json | |
| using System.Globalization; | |
| using System.IO; | |
| using System.Linq; | |
| using Newtonsoft.Json; | |
| namespace Rules.Transformation.Json | |
| { | |
| internal class Program | |
| { |
| using System; | |
| namespace MaybeMonad | |
| { | |
| internal class Program | |
| { | |
| private static void Main() | |
| { | |
| var result = from a in "Hello ".ToMaybe() | |
| from b in Nothing<string>.Instance |
| {-# LANGUAGE OverloadedStrings #-} | |
| {-# LANGUAGE TupleSections #-} | |
| module Main where | |
| import qualified Data.ByteString.Lazy as S | |
| import qualified Data.ByteString.Lazy.Builder as SB | |
| import qualified Data.ByteString.Lazy.Char8 as C | |
| import Data.Foldable (foldMap) | |
| import qualified Data.HashMap.Strict as HM | |
| import Data.List (sortBy) |