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
$ErrorActionPreference = "Stop" | |
$dict_type = "system.collections.generic.dictionary" | |
$set_type = "system.collections.generic.hashset" | |
# project -> package id -> version | |
$projectToPackageVersion = @{} | |
# package id -> version -> project |
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
// Turns nice amount per time interval phrases to costs per month | |
// Fully typed and reusable parsers for all parts of the process | |
// Ex: $5.10 per day -> $155.227850 per month | |
// Ex: $20.50 per 8 hours -> $1871.865250 per month | |
module TimeInterval | |
open System |
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
# pk: pk - Azure Table Storage Log Partition Key Generator | |
# by Brandon Browning | |
# | |
# Usage: pk [time-expression]... | |
# Time expression examples: +5s, -1h15s, 30m | |
# Examples: | |
# pk # Gets current time keys | |
# pk -30s # Gets time keys 30 seconds ago | |
# pk 0s -1h5s # Gets time keys now, and 1 hour 5 seconds ago | |
# Example output: |
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
// Transforms a function to throw away calls that occur within a timeframe after being called. | |
// ms: number - milliseconds to throw away /result/ calls after calling /f/ | |
// f: function - wrapped with throttling behaivor as /result/ | |
// result: function - throttled version of /f/ | |
function throttle(ms, f) { | |
return function inner() { | |
if (!inner.throttle) { | |
f(); | |
inner.throttle = setTimeout(function() { |
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
// TODO: Fixme | |
open System | |
open FParsec | |
type Css = CssDefinition list | |
and CssDefinition = CssSelector * CssRule list | |
and CssSelector = CssSelectorPart list | |
and CssSelectorPart = CssTag * CssModifier list |
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
open System | |
open FParsec | |
type Json = | |
| JsonObject of (string * Json) list | |
| JsonArray of Json list | |
| JsonNumber of double | |
| JsonString of string | |