View original-code-for-review.fs
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
// Code for review posted here: http://codereview.stackexchange.com/questions/55554/parsing-sections-from-a-log-file-using-f | |
// Here are the "lines" from my "log file". | |
let lines = [1 .. 25] |> List.map (fun x -> x.ToString()) | |
// For this exercise, section criteria is divisibility by 5. | |
// val DivisibleByFive : s:string -> bool | |
let DivisibleByFive (s:string) = | |
System.Int32.Parse(s) % 5 = 0 | |
View get-script-folder.ps1
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
# Get the script's folder | |
function get_script_directory # http://blogs.msdn.com/b/powershell/archive/2007/06/19/get-scriptdirectory.aspx | |
{ | |
$Invocation = (Get-Variable MyInvocation -Scope 1).Value | |
Split-Path $Invocation.MyCommand.Path | |
} | |
$scriptpath = get_script_directory | |
cd $scriptpath | |
# Pause for user to press a key |
View Typescript Jasmine Knockout Setup
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
Install-Package knockoutjs | |
Install-Package knockout.typescript.DefinitelyTyped | |
Install-Package JasmineTest | |
Install-Package jasmine.typescript.DefinitelyTyped |
View 0_reuse_code.js
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
View gist:2638423
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
// Based on original by Tobi: https://gist.github.com/617852830394aaaa7160 | |
public class RavenDBDumper | |
{ | |
#region Static Methods | |
private static void Read(JsonReader jsonReader, string arrayName, Action<RavenJToken> process) | |
{ | |
if (jsonReader.Read() == false) | |
return; | |
if (jsonReader.TokenType != JsonToken.PropertyName) |
View gist:6572130
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
void Main() | |
{ | |
var file = @"C:\Users\Me\Desktop\Certificates.txt"; | |
var a = JObject.Parse(File.ReadAllText(file)); | |
var cert = a["Certificates"][0]; | |
// Get the UIDs for the existing boards and circuits. | |
var boards = cert["Boards"].Select (x => (Guid)x["UniqueId"]).ToArray(); | |
var circuits = cert["Boards"].SelectMany (x => x["Circuits"]).Select (x => (Guid)x["UniqueId"]).ToArray(); | |
View CreateAndQuery.cs
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.Collections.Generic; | |
using System.Linq; | |
using Marten; | |
using Xunit; | |
namespace marten_test | |
{ | |
public class CreateAndQuery | |
{ |
View SB Choco
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
# PLUS: npm install --global --production windows-build-tools | |
choco install spotify -y | |
choco install visualstudiocode -y | |
choco install microsoftazurestorageexplorer -y | |
choco install sourcetree --version 1.9.10.0 -y | |
choco install webstorm -y | |
choco install jetbrainstoolbox -y | |
# not updated choco install jetbrains-rider -y | |
choco install balsamiqmockups3 -y |
View gist:de261ac578de1a735b26f23b0ce78155
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
namespace MyNamespace | |
type IMyInterface = | |
abstract GetValue: unit -> string | |
type MyRecord = | |
{ MyField1: int | |
MyField2: string } | |
interface IMyInterface with | |
member x.GetValue() = x.MyField2 |
View Installing a Topshelf Service in OctopusDeploy
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
Deployment steps for this blog post: | |
http://kearon.blogspot.co.uk/2015/01/installing-service-using-topshelf-with.html |
OlderNewer