Skip to content

Instantly share code, notes, and snippets.

View mjrider's full-sized avatar
😎
Improving the world 1 LOC at a time

Robbert Müller mjrider

😎
Improving the world 1 LOC at a time
View GitHub Profile
@mjrider
mjrider / ircnet-ssl.md
Last active February 6, 2022 16:27
Instructions for ssl on ircnet servers

SSL for ircnet servers

Prerequisites

  1. Root on the irc server
  2. Recent kernel
  3. C compiler
  4. haproxy ( or hitch or other ssl offloader with proxy support)
  5. downloaded copy of https://github.com/cloudflare/mmproxy

Setup

The setup is that haproxy listens on the external ip, forwards it to mmproxy also on localhost and mmproxy forwards it to the ircd.

@mjrider
mjrider / acme-responder.py
Created January 11, 2021 08:54
acme-responder.py
#!/usr/bin/env python3
from http.server import BaseHTTPRequestHandler, HTTPServer
from os.path import basename
from os import environ
class MyServer(BaseHTTPRequestHandler):
server_version = "Acme-Stateless-Responder"
def do_GET(self):
@mjrider
mjrider / check_zfs
Created July 2, 2020 12:27
check diskspace availability of zfs with nrpe
#!/bin/sh
# Nagios plugin return values
STATE_OK=0
STATE_WARNING=1
STATE_CRITICAL=2
STATE_UNKNOWN=3
# do we have what we need
if [ ${#} -lt 1 ] ; then
@mjrider
mjrider / releaser
Created January 27, 2019 18:58
quick'n'dirty tag next release script
#!/bin/bash
# ==============================================================================
# MIT License
#
# Copyright (c) 2019 Robbert Müller
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
import requests
from requests.auth import HTTPBasicAuth
import re
from StringIO import StringIO
import urllib
JIRA_URL = 'https://your-jira-url.tld/'
JIRA_ACCOUNT = ('jira-username', 'jira-password')
# the JIRA project ID (short)
JIRA_PROJECT = 'PRO'
{
"now":"2018-04-23T17:28:30Z",
"version":"~unreleased",
"hostname":"keyserver.snt.utwente.nl",
"nodename":"keyserver",
"contact":"0xB1B25E4CE46FBA97",
"httpAddr":":11371",
"reconAddr":":11370",
"peers":[
{
@mjrider
mjrider / user-config.yml
Created March 10, 2018 19:21
user-config for hetzner cloud, to get a smaller root partition
#cloud-config
# do not reisze, we are going to do that our self. Because the resizefs will run before the disk setup
resize_rootfs: false
# setup disk, overwriting our live partition scheme
# results in a 4G/16GB split on a cx11
# overwrite needs to be true because we are going to change the layout of an existing drive
disk_setup:
/dev/sda:
<?php
namespace Deployer;
desc('Test error');
task('deploy:newrelic', function () {
throw new \RuntimeException("<comment>Please configure New Relic:</comment> <info>set('newrelic', array('api_key' => 'xad3...', 'application_id' => '12873'));</info>");
});
#!/bin/bash
NEWARGS=();
for i in "${@}" ; do
NEWARGS+=( "${i}" )
if [ "${i}" = "--components" -o "${i}" = "-c" ] ; then
COMPONENTS=1;
fi
done
if [ -z "${COMPONENTS}" ] ; then
NEWARGS+=( "--components" )
#!/bin/sh
# Absolute path to this script. /etc/ssl/example.org/update.sh
SCRIPT=$(readlink -f $0)
# Absolute path this script is in. /etc/ssl/example.org/
SCRIPTPATH=$(dirname $SCRIPT)
cd "${SCRIPTPATH}" || exit 1
/srv/simp_le/venv/bin/simp_le -f full.pem -f account_key.json --default_root /var/www/ \
-d srv.example.org -d example.org -d home.example.org -d mail.example.org