This file contains 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
{"name":"main","settings":"{\"settings\":\"{\\r\\n \\\"yaml.schemas\\\": {\\r\\n \\\"file:///Users/dlin/.vscode/extensions/atlassian.atlascode-3.0.1/resources/schemas/pipelines-schema.json\\\": \\\"bitbucket-pipelines.yml\\\"\\r\\n },\\r\\n \\\"typescript.updateImportsOnFileMove.enabled\\\": \\\"always\\\",\\r\\n \\\"editor.defaultFormatter\\\": \\\"esbenp.prettier-vscode\\\",\\r\\n \\\"git.confirmSync\\\": false,\\r\\n \\\"vsicons.dontShowNewVersionMessage\\\": true,\\r\\n \\\"black-formatter.args\\\": [\\\"--line-length\\\", \\\"100\\\"],\\r\\n \\\"[prisma]\\\": {\\r\\n \\\"editor.defaultFormatter\\\": \\\"Prisma.prisma\\\"\\r\\n },\\r\\n \\\"[python]\\\": {\\r\\n \\\"editor.defaultFormatter\\\": \\\"ms-python.black-formatter\\\",\\r\\n \\\"editor.formatOnPaste\\\": false,\\r\\n \\\"editor.formatOnSave\\\": true,\\r\\n \\\"editor.codeActionsOnSave\\\": {\\r\\n \\\"source.organizeImports\\\": \\\"explicit\\\"\\r\\n },\\r\\n \\\"editor.formatOnType\\\": true\\r\\n },\\r |
This file contains 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
[<Struct>] | |
type Event<'T> = Event of string | |
type ClickEvent = interface end | |
type KeyEvent = interface end | |
// Now we can create events of different types using the phantom types: | |
let createClickEvent (data: string) : Event<ClickEvent> = Event(data) | |
let createKeyEvent (data: string) : Event<KeyEvent> = Event(data) |
This file contains 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 s3List i = task { | |
return [| $"foo%d{i}"; $"bar{i}"; $"baz{i}" |] | |
} | |
let s3Download k = task { | |
return $"data%s{k}" | |
} | |
let inline flip f x y = f y x // from FSharpPlus |
This file contains 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
type System.Collections.Generic.IAsyncEnumerable<'T> with | |
member this.AsTask () = task { | |
let mutable nxt = true | |
let output = ResizeArray() | |
let enumerator = this.GetAsyncEnumerator() | |
while nxt do | |
let! next = enumerator.MoveNextAsync() | |
nxt <- next | |
if nxt then output.Add enumerator.Current | |
return output.ToArray() |
This file contains 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
--- | |
- name: Ping remote server | |
hosts: remote-server # replace it with the server address that you have ssh credentials to | |
become: yes # optional to have this line | |
tasks: | |
- name: Ping the remote server | |
ping: |