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
(** | |
## References | |
As they aren't part of a project, fsx files need | |
to reference all of their dependencies within the | |
file. | |
You'll always want to reference FakeLib. VersionUpdater | |
is an inhouse tool we use for handling feature branch |
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
(defun cps-foreach-bg (proc l cont &optional command-args) | |
"Call PROC with each element of L, in the background. | |
When there are no more elements of L call CONT with L. | |
Optionally use the COMMAND-ARGS as the command to run in the | |
operating system to do the queueing." | |
(let* ((process-args (or command-args '("sleep" "1"))) | |
(qproc (apply | |
'start-process |
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
/// <summary> | |
/// The local package repository (used for reading packages from the file system) is broken in NuGet.Core because | |
/// when a package is being written, it refuses to read the packages. This implementation wraps it by ignoring packages | |
/// that can't be written (either because they are locked or only partially written). | |
/// </summary> | |
public class FastLocalPackageRepository : LocalPackageRepository | |
{ | |
readonly ILog log; | |
public FastLocalPackageRepository(string physicalPath, ILog log) |
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 IEnumerable<string> GetAssemblyNames(List<string> packageids, string version) | |
{ | |
var packageDir = _fileSystem.CurrentDirectory + @"\" + "packages"; | |
if (!Directory.Exists(packageDir)) | |
return Enumerable.Empty<string>(); | |
var items = new List<string>(); | |
var repository = new LocalPackageRepository(packageDir); |
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 FluentAutomation; | |
using FluentAutomation.Interfaces; | |
using System; | |
using System.IO; | |
using System.Reflection; | |
private static INativeActionSyntaxProvider I = null; | |
public static void Bootstrap<T>(string browserName) | |
{ |
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
;; generic Emacs utility | |
;;; ------------------------------------------------------------------ | |
(defun add-subdirs-to-load-path (dir) | |
(let ((default-directory (concat dir "/"))) | |
(normal-top-level-add-subdirs-to-load-path))) | |
;;; basic load-path setup | |
;;; ------------------------------------------------------------------ |
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
/* http://www.haskell.org/ghc/docs/latest/html/users_guide/data-type-extensions.html#gadt | |
Generalized Algebraic Datatypes in Scala */ | |
trait Term[A] | |
case class Lit(x: Int) extends Term[Int] | |
case class Succ(x: Term[Int]) extends Term[Int] | |
case class IsZero(x: Term[Int]) extends Term[Boolean] | |
case class If[A](guard: Term[Boolean], t: Term[A], y: Term[A]) extends Term[A] | |
case class Pair[A, B](x: Term[A], y: Term[B]) extends Term[(A,B)] | |
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
def readVersion(filepath="AssemblyInfo.cs") | |
File.open(filepath).each_line{ |line| | |
if line.start_with?("[assembly: AssemblyVersion(\"") | |
return line.gsub("[assembly: AssemblyVersion(\"", "").gsub("\")]","").gsub(/\s+/, "") | |
end | |
} | |
end |
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
(* | |
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 |