Differently from the blog posts, these are smaller posts which are usually more direct; not a lot of plain-text explanation - more code.
Gists
List of snippets around Linux, Bash, Shell Scripting, Golang and the cloud-native landscape.
-
A bpftrace Ansible role
Check out how to fetch and install bpftrace using Ansible
-
Measuring HTTP response times with cURL
Without getting out of your current shell and installing other utilities, give cURL a try to measure response times - it can do it.
-
Shell: replacing a variable with the contents of a file
How to create a poor man's templating engine using AWK
-
How to set up a Private Docker Registry using AWS S3
Go through the process of creating a Terraform configuration for deploying a Docker registry to an instance making use of IAM roles.
-
Retrieving Docker Registry metrics using Prometheus
Docker registry used not to have a Prometheus exporter by default. Check out how to make use of it in the development branch.
-
Navigating the Linux Kernel source tree with YouCompleteMe
Check out how to configure YouCompleteMe to have auto completion and source code navigation capabilities for the Linux source code.
-
A minimal TCP Client in C
Go through the steps and syscalls involved in creating a TCP client using C.
-
Shell: how to add a prefix to the output of multiple commands
Executing multiple shell commands in continuous integration might become hard to read. Check out how to prefix command executions using bash.
-
Using HAProxy maps with Access control lists (acl)
HAProxy frontends can have their logic simplified by using maps. Check out how to tie maps with ACLs to improve routing.
-
Making HAProxy respond 200 OK to health checks
Sometimes you need HAProxy to have a special frontend to return 200 OK when a request is made for health-checking purposes. Check out three ways of doing it.
-
Using C to inspect Linux syscalls
A deep dive into how to make use of ptrace to inspect syscalls made by a tracee while they occur.
-
How to set up AWS EFS across multiple availability zones using Terraform
Having an AWS EFS file system over multiple availability zones using Terraform is not complicated. Check out one way of doing it.
-
How to collect Docker Daemon Metrics
Docker ships with native Prometheus integration - the docker daemon can generate metrics about it and let you scrape that. Check out how to gather Docker daemon metrics in Linux and MacOS.
-
An Example of Go RPC Client and Server
Having jump straight to gRPC, I got surprised by how easy is to set up Go RPC using net/rpc package. Check out a simple example exploring this package.
-
Replacing HAProxy ACLs by HAProxy Maps
HAProxy maps can reduce the complexity of haproxy configurations by allowing you to define map lookup logic. Check out how to remove ACLs in favor of maps.
-
Forcing (from inside) the redirection of all outputs of a bash script to a file
Using exec to redirect force redirection from within a bash script.
-
HAProxy Docker Container Logs
HAProxy doesn't naturally log to standard out - you need to pick rsyslog and make it do so. Check out how to have HAProxy logs going to stdout using Docker containers.