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:
""" | |
Usage examples: | |
# As context manager: | |
with manual_report("stats_entry_name"): | |
# do stuff | |
# As a decorator for tasks: | |
@task | |
@manual_report |
# 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 |
I hereby claim:
To claim this, I am signing this object:
// jonatans superconfig | |
net_graph 1 | |
//muzzleflash_light 0 | |
cl_forcepreload 1 | |
rate "128000" | |
cl_updaterate 128 | |
cl_cmdrate 128 | |
// crosshair |
#!/bin/bash | |
touch /tmp/Recent.xyz | |
while true | |
do | |
echo "Checking again..." | |
wget -q https://apt.dockerproject.org/repo/dists/ubuntu-xenial/main/binary-amd64/InRelease -O /tmp/InRelease.xyz | |
if test /tmp/InRelease.xyz -nt Recent.xyz; then | |
say Docker timestamp updated! |
{ | |
"type": "MultiPolygon", | |
"coordinates": [ | |
[ | |
[ | |
[ | |
23.699980096133004, | |
35.70500438083553 | |
], | |
[ |
from django.http import HttpResponse | |
from django.views import generic | |
class TemplateView(generic.TemplateView): | |
""" | |
Exactly like Django's TemplateView, but adds support for returning an | |
HttpResponse in get_context_data | |
""" | |
def get(self, request, *args, **kwargs): | |
context_or_response = self.get_context_data(**kwargs) |
sudo apt-get update | |
sudo apt-get install -y python-pip | |
sudo apt-get install -y python-dev | |
sudo apt-get install -y libzmq-dev | |
sudo pip install virtualenv | |
virtualenv venv | |
source venv/bin/activate | |
pip install locustio | |
pip install pyzmq |
from locust import Locust, TaskSet, task | |
import old_client | |
old_client.patch() | |
class MyTasks(TaskSet): | |
@task | |
def index(self): | |
self.client.get("/") |
#!/usr/bin/env bash | |
# set terminal to UTF8 (otherwise `gem install foreman` fails) | |
export LANG=en_CA.UTF-8 | |
# set up ruby env | |
mkdir ruby-gems | |
echo $HOME | |
echo `pwd` | |
export GEM_HOME=$HOME/.ruby-gems |