Skip to content

Instantly share code, notes, and snippets.

Ranlvor Ranlvor

Block or report user

Report or block Ranlvor

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View rzl-plenum-reminder.py
#!/usr/bin/python3
# -*- coding: UTF-8 -*-
#####
#
# Plenum-Reminder, by Ranlvor
# with idea and large code-parts taken from Kunsi https://github.com/entropia/reminders/blob/master/plenum.py
#
# To be executed by a cronjob whenever the reminder should be sent
#
# sends out a mail notification to the mailing list about a plenum next sunday.
View ZFS-space-info.php
<?php
//do not use this. zfs list -o name,referenced,usedbysnapshots does the same thing without php hackery.
function startsWith($string, $query) {
return substr($string, 0, strlen($query)) === $query;
}
function calculateChileUsed($value, $output) {
$name = $value['name']."/"; //echo "\n\n\n".$name."\n";
$children = array_filter($output, function ($v) use($name) { return startsWith($v['name'], $name); });
View fftr-jenkins-skript
node {
stage ('Update git-cache') {
sh '''echo "Updating git-cache"
cd ../..//gluon-caches/git
for i in openwrt packages gluon-packages routing luci gluon site-fftr ffda-packages fftr-packages linux-firmware; do
echo "fetching \$i..."
git fetch \$i
done'''
}
stage ('calculate targets') {
View haproxy
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
View gist:223a61e8f980bb452206
<?php
global $interface;
global $mesurements;
global $file;
$interface = "br-fftr:";
$mesurements = 120;
$file = "/var/www/html/realtime-stats/bandwidth.json";
function data_add(&$array, $value) {
global $mesurements;
@Ranlvor
Ranlvor / S99z-fastd-MTU-problem-prober
Last active Aug 29, 2015
fastd MTU-problem-prober
View S99z-fastd-MTU-problem-prober
#!/bin/sh
#place in /etc/rc.d/S99z-fastd-MTU-problem-prober
BIGPROBESIZE=1492
GWA=draco.fftr
GWAuciPath=fastd.mesh_vpn_backbone_peer_draco.remote
GWB=elmira.fftr
GWBuciPath=fastd.mesh_vpn_backbone_peer_elmira.remote
waitForNet() {
while !ping -6 -c 10 $GWA && !ping -6 -c 10 $GWB; do
@Ranlvor
Ranlvor / gen-cert.sh
Created Dec 29, 2014
A short snipped I use for generating my keys. It just creates a new RSA-Key including Certificate Request, ready to copypaste to startssl and then waits for you to copy the certificate startssl generated back. Then it creates a file of private key and certificate ready to be used for example by apache.
View gen-cert.sh
echo -e "\e[1;32manswer all the following questions by just typing [Enter], startssl will ignore them anyway\e[0m"
echo
openssl req -nodes -new -newkey rsa:4096 -out csr.pem
echo
echo -e "\e[1;32mcopypaste the Request to startssl to generate the certificate\e[0m"
echo
cat csr.pem
echo
echo -e "\e[1;32mpaste the certificate here, end with [STRG+D]\e[0m"
echo
@Ranlvor
Ranlvor / keybase.md
Last active Aug 29, 2015
keybase.md
View keybase.md

Keybase proof

I hereby claim:

  • I am Ranlvor on github.
  • I am ranlvor (https://keybase.io/ranlvor) on keybase.
  • I have a public key whose fingerprint is 5DA7 242C 4C79 1615 F335 796D 1BAB 9EAE CCC5 656A

To claim this, I am signing this object:

You can’t perform that action at this time.