Skip to content

Instantly share code, notes, and snippets.

@maxheadroom
maxheadroom / docker.yaml
Last active January 28, 2024 20:04
Traefik Reverse Proxy docker.yaml
---
version: "3.0"
networks:
web:
external: true
bridge:
services:
traefik:
container_name: traefik
image: "traefik:2.8.8"
@maxheadroom
maxheadroom / video-workstation.toml
Created January 28, 2024 19:57
Traffic Config file for reverse proxy to ext. host
[http]
[http.routers.video-workstation-rtr]
entrypoints = ["websecure"]
rule = "Host(`video-workstation.example.com`)"
service = "video-workstation-svc"
[http.routers.video-workstation-rtr.tls]
certResolver = "letsencrypt"
[http.services]
[http.services.video-workstation-svc.loadbalancer]
@maxheadroom
maxheadroom / netcat-performancetest.md
Created September 28, 2020 12:29
pure network performance test with netcat

destination side (listening and receiving traffic):

while true; do sudo nc -v -l 8888 > /dev/null; done

source side (sending traffic to destination):

while true;do dd if=/dev/zero bs=512 count=1000000 2>> ./transfer.log | nc -v 10.90.7.3 8888; time >> ./transfer.log; done
@maxheadroom
maxheadroom / gist:ab4c455776887bccccc6809c59b054f5
Created November 6, 2016 03:43
Fix RoundCube DB issue for new users
ALTER TABLE users MODIFY COLUMN preferences text NULL;
ALTER TABLE user MODIFY COLUMN alias VARCHAR(128) NOT NULL DEFAULT '{no alias}';
@maxheadroom
maxheadroom / find_process_count.awk
Last active August 29, 2015 14:11
Find processes with more than X instances
# usage: ps -e | awf -f find_process_count.awk
# output
{
limit = 5
# turn the process names into lowercase
$4 = tolower($4) # remove case distinctions
# count occurances of $4
freq[$4]++
}
@maxheadroom
maxheadroom / cUrl documentation
Last active August 29, 2015 14:11
How to gather network timing data with cUrl
Write the following lines into a text file and save as "ctemplate.txt"
\n
time_namelookup: %{time_namelookup}\n
time_connect: %{time_connect}\n
time_appconnect: %{time_appconnect}\n
time_pretransfer: %{time_pretransfer\}n
time_redirect: %{time_redirect}\n
time_starttransfer: %{time_starttransfer}\n
----------\n
@maxheadroom
maxheadroom / maintenance.sh
Last active August 29, 2015 14:06
check for AWS maintenance
#!/bin/bash
#
REGIONS="us-east-1 ap-southeast-2 eu-west-1 ap-southeast-1 us-west-2 us-west-1"
JQ=~/Downloads/jq
OPTS="--profile mspprod"
# check for maintenance in above AWS regions
for region in $REGIONS; do
#check for instance in the regions that need maintenance
echo "==================================================="
@maxheadroom
maxheadroom / Mosh Shell settings
Created August 23, 2014 08:16
MacOS X Bash shell environment settings to make mosh work
# settings for AWS CLI tools
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
function _update_ps1() {
export PS1="$(~/powerline-shell.py $? 2> /dev/null)"
}
export PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
@maxheadroom
maxheadroom / JIRA-subtickets
Created July 7, 2014 10:04
JIRA find tickets and all their sub-tickets
You need to have a free plugin installed to enable the sub-ticket filter function: https://marketplace.atlassian.com/plugins/com.onresolve.jira.groovy.groovyrunner
Assuming you have a list of tickets that you want to monitor this JQL will find all the sub-tickets as well:
issueFunction in subtasksOf("key in (PKEY-5747, PKEY-5699, PKEY-5404)") OR key in (PKEY-5747, PKEY-5699, PKEY-5404)
### Keybase proof
I hereby claim:
* I am maxheadroom on github.
* I am maxheadroom (https://keybase.io/maxheadroom) on keybase.
* I have a public key whose fingerprint is C746 F84D E9E0 3926 B88B 2DC6 7F2C E31C D9C2 C107
To claim this, I am signing this object: