This is a *markdown* document with a code block:
```ts
// src/example.ts
export function helloWorld(name: string): string {
return `Hello ${name}!, how are you today?`;
}
| public class ExponentialBackoff | |
| { | |
| private readonly int _delayMilliseconds; | |
| private readonly int _maxDelayMilliseconds; | |
| public int Retries => _retries; | |
| private int _retries; | |
| private int _pow; | |
| public ExponentialBackoff(int delayMilliseconds, int maxDelayMilliseconds) | |
| { |
| name: README embed-code | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| embed-code: | |
| runs-on: ubuntu-latest |
This is a *markdown* document with a code block:
```ts
// src/example.ts
export function helloWorld(name: string): string {
return `Hello ${name}!, how are you today?`;
}
This is a *markdown* document with a code block:
```ts
// src/example.ts
| bases: | |
| - ../../agones/overlays/dev | |
| - ../../configmap/overlays/dev | |
| configurations: | |
| - nameref.yaml |
| public static class TaskExtentions | |
| { | |
| public static Task<TResult[]> WhenAllFailFast<TResult>(IEnumerable<Task<TResult>> tasks) | |
| { | |
| return WhenAllFailFast(tasks.ToArray()); | |
| } | |
| public static Task<TResult[]> WhenAllFailFast<TResult>(params Task<TResult>[] tasks) | |
| { | |
| if (tasks is null) throw new ArgumentNullException(nameof(tasks)); | |
| if (tasks.Length == 0) return Task.FromResult(new TResult[0]); |
| // cancel on Source CancellationTokenSource | |
| async Task Main() | |
| { | |
| using var cts = new CancellationTokenSource(); | |
| var ct = cts.Token; | |
| var task = FooAsync(ct); | |
| await Task.Delay(TimeSpan.FromSeconds(3)); | |
| cts.Cancel(); | |
| cts.Dump("cts"); // IsCancellationRequested True | |
| } |
| # run on host... | |
| docker run -it --entrypoint /bin/bash redis | |
| # run inside docker... | |
| apt-get update | |
| apt-get install -y stunnel net-tools | |
| cat <<EOF > /etc/stunnel/redis-cli.conf | |
| fips = no | |
| setuid = root | |
| setgid = root | |
| pid = /var/run/stunnel.pid |
| $ openssl s_client -servername token.actions.githubusercontent.com -showcerts -connect token.actions.githubusercontent.com:443 < /dev/null 2>/dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sed "0,/-END CERTIFICATE-/d" > certificate.crt | |
| $ openssl x509 -in certificate.crt -fingerprint -noout | cut -f2 -d'=' | tr -d ':' | tr '[:upper:]' '[:lower:]' | |
| 6938fd4d98bab03faadb97b34396831e3780aea1 |