Skip to content

Instantly share code, notes, and snippets.

View jostmart's full-sized avatar

jostmart

View GitHub Profile
@jostmart
jostmart / README.md
Created May 10, 2021 13:17 — forked from dims/README.md
Kubernetes Resources
#!/usr/bin/env ansible-playbook
- name: Docker cluster wide tasks
hosts: docker
become: yes
handlers:
# reload config
- name: reload alertmanager1 configuration
uri:
| 3 x SSD i RAID5
|--------------------------------------------------------------------------------------------------------|
Command Line: C:\diskspd\amd64\diskspd.exe -c2G -w100 -b4K -F8 -r -o32 -W60 -d60 -Sh testfile.dat
Input parameters:
timespan: 1
-------------
duration: 60s
@jostmart
jostmart / haproxy-reqrep.md
Created April 25, 2023 15:50 — forked from kamleshchandnani/haproxy-reqrep.md
Understanding "reqrep" in HA Proxy config

Let's assume we have following line in our HA proxy file:
reqrep ^([^\ :]*)\ /api/v1/api-name/(.*) \1\ /staging/path-name/\2
Here is our sample domain:
https://example.com/api/v1/api-name/

The goal here is to rewrite /api/v1/api-name/ to /staging/path-name/ leaving anything else unchanged.

Breaking the Regex and understanding in parts:
There are basically 3 parts in the regex:

package main
import (
"fmt"
"io/ioutil"
"net/http"
"sync"
"time"
"github.com/go-yaml/yaml"