Skip to content

Instantly share code, notes, and snippets.

View 1eyewonder's full-sized avatar
💭
🌮

Bronson Bata 1eyewonder

💭
🌮
View GitHub Profile
@1eyewonder
1eyewonder / dotnet-why.fsx
Created February 18, 2025 21:36
Script to detect why something is rebuilding
#r "nuget: MSBuild.StructuredLogger"
open Microsoft.Build.Logging.StructuredLogger
let build = Serialization.Read @"C:\Users\path-here\msbuild-editorconfig.binlog"
let (|Message|_|) (b : BaseNode) =
match b with
@1eyewonder
1eyewonder / workstation.md
Last active February 7, 2025 17:52
My Workstation Setup

My Workstation Setup

flowchart LR

subgraph c35a8f86-9068-45fb-835e-cf3391d776df[Work Stations]
  subgraph ddd1cd09-3443-41c8-a91d-4604e4d648c8[Personal Computer]
    5c418615-313e-449b-8406-ec420a153f03[Output - USB A Port 1]
    47901f40-b00d-45a0-8f5c-4b0078b4b4d1[Output - USB A Port 2]
    629f84f9-b570-40fd-a3d4-a6dfa3bd4756[Output - USB A Port 3]
@1eyewonder
1eyewonder / dapper-stuff.fsx
Last active January 3, 2025 15:03
Dapper Queries F#
#r "nuget: IcedTasks"
#r "nuget: FSharp.Control.TaskSeq"
#r "nuget: Dapper"
#r "nuget: Microsoft.Data.SqlClient"
open Microsoft.Data.SqlClient
open IcedTasks
open FSharp.Control
open System
open Dapper
@1eyewonder
1eyewonder / safestring.fsx
Last active April 9, 2025 19:14
F# String Active Patterns
open System
open System.Text.RegularExpressions
let (|Lower|) (s: string) = s.ToLower()
let (|LowerInvariant|) (s: string) = s.ToLowerInvariant()
let (|Upper|) (s: string) = s.ToUpper()
let (|UpperInvariant|) (s: string) = s.ToUpperInvariant()
let (|Trim|) (s: string) = s.Trim()
let (|TrimChars|) (chars: char array) (s: string) = s.Trim(chars)