Skip to content

Instantly share code, notes, and snippets.

View queil's full-sized avatar

queil queil

View GitHub Profile
@queil
queil / posh-k8s.ps1
Last active November 3, 2021 13:05
posh k8s
function k8s() {
$Cache = @{Names=@{}}
function makectx {
@{
Namespace = "default"
Ctx = $(kubectl config current-context)
Current = @{Name = $null; TypeAlias=$null}
}
@devhawk
devhawk / colorconsole.fs
Created August 4, 2016 17:19
F# Color Console Functions
open System
// helper function to set the console collor and automatically set it back when disposed
let consoleColor (fc : ConsoleColor) =
let current = Console.ForegroundColor
Console.ForegroundColor <- fc
{ new IDisposable with
member x.Dispose() = Console.ForegroundColor <- current }
// printf statements that allow user to specify output color