Skip to content

Instantly share code, notes, and snippets.

View jeroldhaas's full-sized avatar

Jerold Haas jeroldhaas

View GitHub Profile
@jeroldhaas
jeroldhaas / Assert.fs
Created July 12, 2016 16:38 — forked from bryanedds/Assert.fs
There, screw nunit.
exception AssertionException of string
module Assert =
let isTrue value =
if not value then
raise (AssertionException "Expected true but got false.")
let isFalse value =
if value then
(*
* A pizza chain wants to know which topping combinations are most popular for Build Your Own pizzas.
*
* Given the sample of orders at http://files.olo.com/pizzas.json, write an application (in C#, F# or JavaScript)
* to output the top 20 most frequently ordered pizza configurations, listing the toppings for each along with the
* number of times that pizza configuration has been ordered.
*)
// nuget FSharp.Data
@jeroldhaas
jeroldhaas / Discord.Example.fsx
Created April 20, 2016 03:05
Use DiscordExample as "Inspriration" to F# Example
#load "Scripts/load-references-debug.fsx"
open System
open System.Collections.Generic
open FSharp.Core
open FSharp.Collections
open System.Linq
open FSharp.Linq // probably won't use, but...
open System.Text
open System.Threading.Tasks
@jeroldhaas
jeroldhaas / cVimrc
Last active October 23, 2015 02:30
cVim Configuration
let blacklists = ["https://mail.google.com/*"]
let defaultengine = "duckduckgo"
let completionengines = [ "duckduckgo", "google", "wikipedia", "amazon" ]
set autoupdategist
@jeroldhaas
jeroldhaas / LinuxMac.sh
Last active November 12, 2015 19:05
Node Maintenance
npm install -g flatten-packages
cd ~/.atom/packages
find . -type d -exec flatten-packages {} \;
@jeroldhaas
jeroldhaas / beef_sausage.md
Created February 21, 2015 22:37
Home-Made Beef Sausage (Base-line Configuration Profile)

Home-Made Beef Sausage (Base-line Configuration Profile)

This is the baseline configuration for beef sausage. I'm sure experimentation with cinnamon, sage, and other spices will yield a more interesting product. Your mileage may vary, etc.

Ingredients:

  • Coarse-ground fresh black pepper
  • Ground beef
  • Seriously, that's it as a simple base-lilne recipe

Keybase proof

I hereby claim:

  • I am jeroldhaas on github.
  • I am jeroldhaas (https://keybase.io/jeroldhaas) on keybase.
  • I have a public key whose fingerprint is 075A 613A 9BE1 20DF C6E3 367A 105B F9FA D127 FAA1

To claim this, I am signing this object:

@jeroldhaas
jeroldhaas / Git.md
Last active October 3, 2015 06:58
Git Repository Notes / Cheats

Git Repository Notes / Cheats

Notes / command line snippets for Git

@jeroldhaas
jeroldhaas / Objectives.md
Last active August 29, 2015 14:07
F# Hangout - 2014-10-17

#Objectives / Uses / Possibilities#

F# Hangout Group Ideas.

##Tutorials and Talks##

  • Andrea Magnorsky @silverSpoon wanted to do a presentation on "Game Development in FSharp," and thought that using the hangouts would be a good venue for ad hoc, or informal presentation.
@jeroldhaas
jeroldhaas / GreedyDistinctTrap
Last active December 19, 2015 22:08
Torture-testing Seq.distinct by intentionally taking more than the generator's distinct set size.
open System
let randGen low high =
Seq.initInfinite( fun i -> (new Random()).Next(low, high))
|> Seq.distinct
[<EntryPoint>]
let main argv =
let impossibleSeq = Seq.take 10000 (randGen 0 1000)
Seq.map (fun x -> Console.WriteLine(x.ToString())) impossibleSeq