Skip to content

Instantly share code, notes, and snippets.

View heyman's full-sized avatar

Jonatan Heyman heyman

View GitHub Profile
@heyman
heyman / keybase.md
Last active October 18, 2017 12:45
keybase.md

Keybase proof

I hereby claim:

  • I am heyman on github.
  • I am heyman (https://keybase.io/heyman) on keybase.
  • I have a public key ASBayfWFGjb5lwUu5Y1eSdD8lp8qOa57aH8Ei0NfyhmOtQo

To claim this, I am signing this object:

@heyman
heyman / iptables-docker-ufw.sh
Created September 6, 2018 13:11 — forked from rubot/docker_ufw_setup.sh
easy fix for DOCKER-USER and ufw
# Solves the problem with open ports with docker and ufw
# As Docker uses the nat table, the filter table FORWARD chain is used and does not touch ufw-input chains as expected.
# Even for ufw-forward chains it would not work, as DOCKER chains are inserted in front.
# This is a simple fix that worked for me.
INTERFACE_NAME=eth0
__clear(){
sed -i '/^# dockerfix start/,/^# dockerfix end/d' $1
@heyman
heyman / locust_manual_report.py
Last active May 4, 2020 21:38
Context manager / Decorator for adding manual Locust stats entries
"""
Usage examples:
# As context manager:
with manual_report("stats_entry_name"):
# do stuff
# As a decorator for tasks:
@task
@manual_report