Skip to content

Instantly share code, notes, and snippets.


Daniel Chambers daniel-chambers

View GitHub Profile
daniel-chambers / monokai-theme.json
Last active Jun 1, 2020
Monokai Theme for Windows Terminal
View monokai-theme.json
"name": "Monokai",
"background": "#272822",
"black": "#272822",
"blue": "#01549E",
"brightBlack": "#7C7C7C",
"brightBlue": "#0383F5",
"brightCyan": "#58C2E5",
"brightGreen": "#8DD006",
"brightPurple": "#A87DB8",

Keybase proof

I hereby claim:

  • I am daniel-chambers on github.
  • I am danielchmbrs ( on keybase.
  • I have a public key ASATFq9oxibAcdM_Ifl_6C1OA2QDvXBP0VQrVPrGuqbl6go

To claim this, I am signing this object:

View FizzBuzz.fs
let fizzDiv ys str x =
if ys |> List.forall (fun y -> x % y = 0)
then Some str
else None
let fizzBuzzChecks x =
(fizzDiv [3;5] "FizzBuzz" x)
|> Option.orElse (fizzDiv [5] "Buzz" x)
|> Option.orElse (fizzDiv [3] "Fizz" x)
|> Option.defaultValue (string x)
daniel-chambers / FreeAp.hs
Last active Aug 30, 2016 — forked from adbrowne/FreeAp.hs
Free Applicative Example
View FreeAp.hs
module Main where
import Lib
import Data.Monoid
import Data.Map (Map)
import Data.Maybe
import qualified Data.Map as Map
import Control.Concurrent (threadDelay)
import Control.Concurrent.Async
import Control.Applicative.Free
daniel-chambers / AadExtensions.cs
Last active May 29, 2018
Get All Users in AppRole in Azure Active Directory
View AadExtensions.cs
public static class AadExtensions
public static async Task<IEnumerable<IUser>> GetAllUsersInAppRoleAsync(
this IActiveDirectoryClient client,
string servicePrincipalObjectId,
string appRoleId)
var guidAppRoleId = Guid.Parse(appRoleId);
var appRoleAssignmentsPaged = await client.ServicePrincipals
View run-jasmine.js
var system = require('system'),
env = system.env;
* Wait until the test condition is true or a timeout occurs. Useful for waiting
* on a server response or for a ui change (fadeIn, etc.) to occur.
* @param testFx javascript condition that evaluates to a boolean,
* it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or
* as a callback function.
View mine.fs
type Building = {
left : int
right : int
height : int
let buildings : Building[] = [| (* ... *) |]
let getHeight building = building.height
let getWidth building = building.right - building.left