Skip to content

Instantly share code, notes, and snippets.

# SSH Agent Functions
# Mark Embling (http://www.markembling.info/)
#
# How to use:
# - Place this file into %USERPROFILE%\Documents\WindowsPowershell (or location of choice)
# - Import into your profile.ps1:
# e.g. ". (Resolve-Path ~/Documents/WindowsPowershell/ssh-agent-utils.ps1)" [without quotes]
# - Enjoy
#
# Note: ensure you have ssh and ssh-agent available on your path, from Git's Unix tools or Cygwin.
@ninjarobot
ninjarobot / strace-netcore.md
Last active May 24, 2022 19:22
Trace .NET Core Applications on Linux with `strace`

Trace .NET Core Applications on Linux with strace

Troubleshooting a running application can be difficult, usually it starts around checking log output and then following through the likely code paths to get an idea of where a failure may occur. In a development environment, you might attach a debugger a step through source, but troubleshooting isn't always that convenient. There are several helpful tools that can assist, but one that gives the most comprehensive view of a running application is strace. With strace you are able to see all of the system calls an application makes to get a detailed understanding of what is going on "under the hood" in order to troubleshoot an issue.

Take a simple "hello world" F# application, the kind you get from dotnet new console -lang F# -n strace-sample". Build it with dotnet build and then launch it with strace to get a trace of all the system calls in a file called trace.log(adjusting for your build output path if on a different framework vers

[<Erase>]
type IProp<'comp when 'comp : not struct> = | Prop of string * obj
with
static member inline Create (value: string * obj) = Prop value
static member inline Build(props: IProp<'comp> seq) = props |> unbox<(string * obj) seq> |> createObj |> unbox<'comp>
let inline (!<) x = IProp.Build x
module Interop =
let inline mkProperty<'Component when 'Component : not struct> (key:string) (value:obj) : IProp<'Component> =
module Operators
open Feliz
let inline (+@) (tag: IReactProperty list -> ReactElement) (className: string) (props: IReactProperty list) =
tag (props @ [ prop.className className ])
let inline (++) (tag: IReactProperty list -> ReactElement) (prop: IReactProperty) (props: IReactProperty list) =
tag [prop; yield! props ]
[<Interface>]
type HTMLAttributes<'element when 'element :> Element and 'element :> EventTarget> =
inherit AriaAttributes
inherit DOMAttributes<'element>
abstract member defaultChecked: bool option with get, set
[<Interface>]
type HTMLAttributesFactory<'Property, 'element when
'Property :> HTMLAttributes<'element> and