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 System.Diagnostics | |
| type PageConfig = | |
| { Text: string } | |
| static member Default = { Text = "" } | |
| type PageConfigOutput = PageConfigOutput of string |
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
| // based on awesome https://www.fssnip.net/7OG/title/Quotation-Printer | |
| module QuotationPrinter = | |
| open System | |
| open Microsoft.FSharp.Quotations | |
| let private indent = 1 | |
| let rec print depth (expr:Expr) = | |
| match expr with |
This file has been truncated, but you can view the full file.
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
| {"data":[{"traceID":"4a083e01f38c07f44b13012340e7f83a","spans":[{"traceID":"4a083e01f38c07f44b13012340e7f83a","spanID":"207e37a0c8824798","duration":22446,"references":[{"refType":"CHILD_OF","spanID":"d7157f07558b442f","traceID":"4a083e01f38c07f44b13012340e7f83a"}],"flags":0,"logs":[],"operationName":"FsAutoComplete.Lsp.AdaptiveState.parseAndCheckFile","processID":"p1","startTime":1704391550355951,"tags":[{"key":"otel.library.name","type":"string","value":"FsAutoComplete"},{"key":"otel.library.version","type":"string","value":"0.68.0"},{"key":"code.filepath","type":"string","value":"/home/vince/src/github/mrluje/FsAutoComplete/src/FsAutoComplete/LspServers/AdaptiveServerState.fs"},{"key":"code.lineno","type":"int64","value":1262},{"key":"code.namespace","type":"string","value":"FsAutoComplete.Lsp.AdaptiveState"},{"key":"code.function","type":"string","value":"parseAndCheckFile"},{"key":"fsac.sourceCodePath","type":"string","value":"/home/vince/src/github/mrluje/FsAutoComplete/src/FsAutoComplete.Core/Commands. |
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
| #r "nuget: Spectre.Console" | |
| open Spectre.Console | |
| let f = SelectionPrompt<string>() | |
| SelectionPromptExtensions.Title(f, "hello") // works fine by using the non-extension syntax | |
| // extension defined at https://github.com/spectreconsole/spectre.console/blob/0d19ccd8a6236d464f1cb397df7f55554d30e0d7/src/Spectre.Console/Prompts/SelectionPromptExtensions.cs#L130 | |
| f.Title("hello") // fails with error FS0003: This value is not a function and cannot be applied. |
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
| #!/usr/bin/env bash | |
| [[ -n $DEBUG ]] && set -x | |
| set -eou pipefail | |
| IFS=$'\n\t' | |
| SELF_CMD="$0" | |
| AZACC_DIR="${XDG_CACHE_HOME:-$HOME/.azure}/azacc" | |
| AZ="$(which az)" |
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
| # Setup Windows Defender common exclusion | |
| Write-Host "Excluding paths..." | |
| Add-MpPreference -ExclusionPath "$env:appdata\npm" | |
| Add-MpPreference -ExclusionPath "$env:appdata\nvm" | |
| # These folders contains most of my repo, you may want to change it to your owns | |
| Add-MpPreference -ExclusionPath "C:\Temp" | |
| Add-MpPreference -ExclusionPath "C:\Vincent" |
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
| let createTimerAndObservable timerInterval = | |
| // setup a timer | |
| let timer = new System.Timers.Timer(float timerInterval) | |
| timer.AutoReset <- true | |
| // events are automatically IObservable | |
| let observable = timer.Elapsed | |
| // return an async task | |
| let task = async { |
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
| npx prettier --config .\.prettierrc --write src/**/*.js* |