Skip to content

Instantly share code, notes, and snippets.

View jschpp's full-sized avatar

Johannes Schöpp jschpp

View GitHub Profile
@jschpp
jschpp / revprox.go
Last active December 10, 2015 17:13 — forked from JalfResi/revprox.go
Simple reverse proxy in Go - Prints forwarded addresses
package main
import (
"bytes"
"log"
"net/http"
"net/http/httputil"
"net/url"
"time"
)
@jschpp
jschpp / gatling.service
Last active December 10, 2015 17:20
systemd script for gatling: https://www.fefe.de/gatling/
#!/bin/sh
[Unit]
Description=Control gatling webserver
After=network.target
Requires=revprox.service
[Service]
Type=simple
ExecStart=/usr/bin/gatling -p 81 -L -F -S -D -c /var/www/
@jschpp
jschpp / cloudflare-ip.sh
Last active April 25, 2020 03:29
script to add all cloudflare IPs to iptables
#!/bin/sh
exec > /var/log/cloudflare.log 2>&1
set -x
for ip in $(curl -s https://www.cloudflare.com/ips-v4); do /usr/sbin/iptables -I INPUT -p tcp -m multiport --dports http,https -s "$ip" -j ACCEPT; done
for ip in $(curl -s https://www.cloudflare.com/ips-v6); do /usr/sbin/ip6tables -I INPUT -p tcp -m multiport --dports http,https -s "$ip" -j ACCEPT; done
@jschpp
jschpp / genVHDLtest.py
Last active August 29, 2015 14:08
Generates VHDL Signal inputs to test components
class meh():
value = True
name = ""
def __init__(self, name):
self.name = name
def __repr__(self):
if self.value:
return "1"
else:
return "0"