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
// url for | |
export const client = createClient({ | |
projectId: process.env.NEXT_PUBLIC_SANITY_PROJECT_ID, | |
dataset: process.env.NEXT_PUBLIC_SANITY_DATASET, | |
apiVersion: process.env.NEXT_PUBLIC_SANITY_API_VERSION | |
}) | |
const builder = imageUrlBuilder(client) | |
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
#!/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 |
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
#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]' |
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
{ | |
// 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", |
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
# 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 |
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
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 |
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
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 ./ |
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
namespace ChironB.Benchmarks | |
open Chiron | |
open BenchmarkDotNet.Attributes | |
open Newtonsoft.Json | |
open Newtonsoft.Json.Linq | |
module Bench = | |
open System.IO | |
open System.Text |
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
Events.events | |
|> Pipe.filter (Message.tryGetContext "service" >> (=) "web.api") | |
|> Pipe.filter (Message.getExns >> List.isEmpty >> not) | |
|> Pipe.bufferTime (TimeSpan.FromSeconds 3600) | |
|> Events.sink [ "email" ] |

NewerOlder