[Suave.Testing][st] for net461:
- [FSharp.Core][fs] >= 4.0.0.1
Suave.Testing for netstandard2.0:
- FSharp.Core >= 4.2.3
#!/usr/bin/env sh | |
curl --head -X GET \ | |
--retry 20 --retry-connrefused --retry-delay 1 \ | |
-s -o /dev/null \ | |
-w \"%{http_code}\" \ | |
http://localhost:9000/health \ | |
| grep -q 200 \ | |
|| exit 1 |
#compdef wait-for-url.sh | |
_wait_for_url() { | |
local -a options | |
options=( | |
'--silent[Suppress all output]' | |
'--timeout[Set timeout in seconds]:timeout (seconds):' | |
'--expect-status-code[Expected HTTP status code]:status code:' | |
'--path[Append this path to the URL]:path:' | |
'--help[Show help message and exit]' |
{ | |
// Place your snippets for yaml here. Each snippet is defined under a snippet name and has a prefix, body and | |
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
// same ids are connected. | |
// Example: | |
"kind: PodDisruptionBudget": { | |
"prefix": "poddisruptionbudget", | |
"body": [ | |
"apiVersion: policy/v1beta1", |
# Similar to https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/profiles/profiles.plugin.zsh | |
# but adapted to suit my needs; basically, source the profile or dotfile if it exists: | |
# cd ~/dev/qv2 | |
# => /Users/h/.oh-my-zsh/custom/profiles/qv2 | |
# => /Users/h/.oh-my-zsh/custom/profiles/dev.qv2 | |
# => /Users/h/.oh-my-zsh/custom/profiles/h.dev.qv2 | |
# => /Users/h/.oh-my-zsh/custom/profiles/Users.h.dev.qv2 | |
# cd ~/dev/qv2 |
import { List } from "immutable"; | |
export default class CircularBuffer { | |
constructor(capacity) { | |
if (capacity < 1) { | |
throw new Error("Invalid argument: capacity; must ≥1") | |
} | |
this.len = 0 // tracks current size | |
this.pos = 0 // points to most recent value | |
this.capacity = capacity |
FROM microsoft/dotnet:2.2-sdk as build | |
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ | |
DEBIAN_FRONTEND=noninteractive apt-get install -y locales && \ | |
locale-gen C C.UTF-8 && \ | |
DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales && \ | |
DEBIAN_FRONTEND=noninteractive apt-get install -y git vim libczmq4 libprotobuf-c-dev libprotobuf-dev libprotobuf10 ca-certificates | |
ENV LC_ALL=C.UTF-8 | |
WORKDIR /build/ | |
COPY paket.dependencies paket.lock ./ |
namespace ChironB.Benchmarks | |
open Chiron | |
open BenchmarkDotNet.Attributes | |
open Newtonsoft.Json | |
open Newtonsoft.Json.Linq | |
module Bench = | |
open System.IO | |
open System.Text |
Events.events | |
|> Pipe.filter (Message.tryGetContext "service" >> (=) "web.api") | |
|> Pipe.filter (Message.getExns >> List.isEmpty >> not) | |
|> Pipe.bufferTime (TimeSpan.FromSeconds 3600) | |
|> Events.sink [ "email" ] |