Skip to content

Instantly share code, notes, and snippets.

View BennieCopeland's full-sized avatar

Bennie Copeland BennieCopeland

View GitHub Profile
open System
type private DataGridHelper =
static member inline IsValidRow (this: DataGrid<_,_,_>) row = row < this.rowInfo.Length && row >= 0
static member inline IsValidCol (this: DataGrid<_,_,_>) col = col < this.colInfo.Length && col >= 0
static member inline EnsureValidRow (this: DataGrid<_,_,_>) row = if not (DataGridHelper.IsValidRow this row) then raise (new IndexOutOfRangeException("row")) // TODO: F# vNext nameof(row)
static member inline EnsureValidCol (this: DataGrid<_,_,_>) col = if not (DataGridHelper.IsValidCol this col) then raise (new IndexOutOfRangeException("col")) // TODO: F# vNext nameof(col)
and DataGrid<'TRowInfo, 'TColInfo, 'TElement> =
private { rowInfo: 'TRowInfo[]; colInfo: 'TColInfo[]; elements: Map<int*int, 'TElement> }
@BennieCopeland
BennieCopeland / improving-as-a-software-developer.md
Created October 20, 2020 09:15 — forked from Kavignon/improving-as-a-software-developer.md
Always hungry for more. This is a list of resources I've used or that I plan to use as a way to improve my knowledge and technical skills as a software developer.

Some of the books I'll be recommending are based on .NET. Do not be discouraged. We shouldn't strive to stick to a specific technology stack. Your ambitions and goals will evolve over time and that might lead you a completely new space. Moreover, there are lessons to be learned from an environment that's different from what you're used to.

Software Development

@BennieCopeland
BennieCopeland / gist:a69253779bd5b09a088d14a149822b0e
Last active August 26, 2021 13:48 — forked from theburningmonk/gist:3363893
F# - converting a C# dictionary to a Map
let inline toMap kvps =
kvps
|> Seq.map (|KeyValue|)
|> Map.ofSeq
@BennieCopeland
BennieCopeland / add-dod-certs.sh
Last active July 13, 2023 06:48 — forked from AfroThundr3007730/add-dod-certs.sh
Import DoD root certificates into linux CA store
#!/bin/bash
# Import DoD root certificates into linux CA store
main() {
# Location of bundle from DISA site
url='https://public.cyber.mil/pki-pke/pkipke-document-library/'
bundle=$(curl -s $url | awk -F '"' 'tolower($2) ~ /dod.zip/ {print $2}')
#bundle=https://dl.dod.cyber.mil/wp-content/uploads/pki-pke/zip/certificates_pkcs7_v5-6_dod.zip
# Set cert directory and update command based on OS