Skip to content

Instantly share code, notes, and snippets.

@cato-
cato- / nginx.conf
Last active March 6, 2018 19:28
Install pypiserver
server {
server_name build.example.com;
listen 10.10.10.10:443;
ssl_certificate /etc/nginx/ssl/build.example.com.crt;
ssl_certificate_key /etc/nginx/ssl/build.example.com.key;
location /pypi {
proxy_pass http://127.0.0.1:4046;
border: yes
@cato-
cato- / backup_github.sh
Created November 16, 2014 17:18
Backup all public repositories of specified user, designed to run from daily cron
#!/bin/bash
USER=$1
if [ -n "$2" ]; then
VERBOSE=echo
else
VERBOSE=:
fi
@cato-
cato- / verify_cert.py
Last active May 21, 2019 16:00
Python script to check the status of ssl certificates
#!/usr/bin/env python
#
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# <dev@robertweidlich.de> wrote this file. As long as you retain this notice you
# can do whatever you want with this stuff. If we meet some day, and you think
# this stuff is worth it, you can buy me a beer in return.
# ----------------------------------------------------------------------------
#
@cato-
cato- / html_md-parser
Created July 11, 2013 11:29
Online Markdown Parser
#!/bin/bash
. ../venv/bin/activate
python ../md-parser.py
@cato-
cato- / heise-feed-cleaner.py
Last active December 15, 2015 04:39
Fetches the feed from heise.de and modifies each link to the shorturl
import requests
import re
from lxml import etree
from StringIO import StringIO
r=requests.get("http://www.heise.de/newsticker/heise.rdf")
parser=etree.XMLParser(encoding="utf8")
tree = etree.parse(StringIO(r.text.encode("utf8")), parser)
@cato-
cato- / _etc_lighttpd_sites_cal.conf
Created March 15, 2013 10:44
Generate iCal Feed from AHA Hannover website
$HTTP["host"] == "cal.wgchaos.info" {
server.name = "cal.wgchaos.info"
var.dir = "info/wgchaos/cal"
server.document-root = "/var/www/info/wgchaos/cal/html"
accesslog.filename = "/var/log/lighttpd/access-cal.wgchaos.info.log"
$HTTP["host"] != "cal.wgchaos.info" {
$HTTP["host"] =~ "^(.*)$" {
url.redirect = (
@cato-
cato- / netstat_graph.py
Created March 26, 2012 13:31
Visualize netstat -l output as tables
#!/usr/bin/env python
# Reads output of "netstat -tulpenW" out of "netstat.txt" and writes
# tables with ips as columns and ports as rows to "netstat_tcp.csv",
# "netstat_udp.csv", "netstat_tcp6.csv" and "netstat_udp6.csv"
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# <github -at- robertweidlich -dot- de> wrote this file. As long as you retain
# this notice you can do whatever you want with this stuff. If we meet some
# day, and you think this stuff is worth it, you can buy me a beer in return