Skip to content

Instantly share code, notes, and snippets.

View artyom's full-sized avatar

Artyom Pervukhin artyom

View GitHub Profile
@artyom
artyom / result.txt
Created February 6, 2024 11:14
rate.Sometimes vs time.Ticker
goos: darwin
goarch: arm64
pkg: ids-rewrite-experiment
BenchmarkSometimes/ticker-8 387814022 2.915 ns/op
BenchmarkSometimes/sometimes-8 44387656 27.03 ns/op
Description: Tailscale SSH sessions recorder
Parameters:
VPC:
Type: AWS::EC2::VPC::Id
Description: VPC ID
Subnets:
Type: List<AWS::EC2::Subnet::Id>
Description: VPC subnets
@artyom
artyom / aws-fargate-no-internet-access.md
Created April 19, 2022 19:44
Running services on Fargate without giving them public Internet access

Running services on Fargate without giving them public Internet access

VPC Endpoints

Such setup depends on the following VPC endpoints:

  • ECR endpoints for Docker API, and ECR API;
  • S3 gateway endpoint (ECR images are backed by S3);
@artyom
artyom / goldmark-custom-header-ids.go
Last active January 14, 2022 09:37
Custom header IDs that work with headers which include formatting
package main
import (
"fmt"
"log"
"os"
"strings"
"unicode"
"github.com/yuin/goldmark"
@artyom
artyom / cdn-headers.yml
Created November 16, 2021 09:15
CloudFormation example: adding custom HTTP headers to CloudFront distribution
Description: CloudFormation custom headers test
Resources:
SiteS3Bucket:
Type: AWS::S3::Bucket
DeletionPolicy: Delete
UpdateReplacePolicy: Delete
Properties:
BucketEncryption:
@artyom
artyom / links.md
Created May 22, 2021 08:24
markdown and commonmark links
@artyom
artyom / test.md
Created May 21, 2021 09:49
markdown code block example

Here you go:

~ ¶ date -u
Fri May 21 09:48:43 UTC 2021
// Flags parsing illustration for https://www.reddit.com/r/golang/comments/il5h9g/looking_for_cli_parsing/
package main
import (
"flag"
"log"
"os"
"strings"
)
@artyom
artyom / go.mod
Created July 13, 2020 09:33
age as a library example
module age-example
go 1.15
require filippo.io/age v1.0.0-beta4
module radix-bug
go 1.14
require (
github.com/mediocregopher/radix/v3 v3.5.1
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a
)