Skip to content

Instantly share code, notes, and snippets.

View RubenKelevra's full-sized avatar

@RubenKelevra RubenKelevra

View GitHub Profile
@RubenKelevra
RubenKelevra / RethinkDB-story01.txt
Last active August 27, 2015 07:14
Blog: RethinkDB for system-statistics of freifunk-nodes
This story is about: How do we fetch, process and display nice statistics for
freifunk-nodes, running a free, open WiFi-Network.
Else we want to implement pushes for the owner of each freifunk-node, when
something goes wrong or offline.
Status Quo:
Currently we use some hacky bash scripts[1] which generates a text-file, curl it
to a php running server over https and dropping the latest values to a
@RubenKelevra
RubenKelevra / ZFS lost mirror device.txt
Created September 3, 2015 08:45
ZFS lost mirror device
I'm using zfs for mirroring on my hypervisors, mitingated from lvm/mdadm-raid1.
Some days ago my zfs-mirroring stopped working, leading to a degraded state. ZFS said,
one of the mirror-devices, which should be normally named sda4, is now called
238018108320 or something like this, and on the last row of zpool status, theres an
entry like "was: /dev/sda4".
Zfs can't open the device again, I tried:
zpool offline data /dev/sda4
@RubenKelevra
RubenKelevra / netperf routing.txt
Last active September 22, 2015 21:27
Enable routing on Netperf
netperf -L 192.168.0.20 -H 192.168.1.23 -t udp_stream -l 60 -- -R 1
The "-- -R 1" part enables subnet-routing
# x11-driver-video-sisimedia
# 2014-08-22
Section "Device"
Identifier "sis671"
Driver "sisimedia"
Screen 0
EndSection
Section "Monitor"
mkdir /var/log/journal
systemd-tmpfiles --create --prefix /var/log/journal
systemctl restart systemd-journald
echo "admins=(\"ruben\" \"kevin\")" > /mnt/install.sh
echo "declare -A sshkeys" >> /mnt/install.sh
echo "sshkeys[\"ruben\"]='ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDA4VjJnNTVDxtLgQqCzOiPWsy0yBNiv32GzzYPPatKYozL8PW5hDhEWg7h8vMs5Ty77U/qijjNr4VRyKKmvDFv907f6Wg/Fnm0a7+DmzZ6M4jdEJgqM3LJc3V81aXB6vXDCpCHB3orIKVB9xz2zaBdcA1A8eNYmy7paiZZPnjnSTGDt+UNMWfKumD9TAj4zyvH3yc1MdeB2WOvWCdxQXnyVEfS/AvAIZtzZA5D2osCPKouTGpjKZXoRYqJoT7X+GltbkopFZ7As9jEMfxG3Rum8oIOrqhNwy4ipahd50RYLhBXEUFvFQpDNadlbeslgTq/P5feX1z41PUR5OgNP8cd ruben@freifunk-nrw.de
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIVP7CBN1orjIvx7OOvAaQ6h461ziDZjjgJSseR1GfPvpFizP80+N+6bhrOs8+sz/BxaO1kr9fpArs+g/NmMQobiiXKKmOcR+Wm1y2/LBOrtotmZZJGVQnSoQwwY9K7xhJMGKL4TlktSusvmja5kg2WAf7vW389oYqTfwVq4TgerpPSihn9vVRfVi0827MNfh5agwRIZ/OgWXd6ka/LDByQ0FtV4npFWAwx4/uWphg2t/g6vR7ZoIt5rBSR/E0VqRGMwSbwlbDbYgJTPJ3/lVCrDtVka2r1fuL5f+VyuyYhobtBwkjD5GusIB82XlvIs4KzFTOGVhPpvrmoFKaN1aJ ruben@freifunk-nrw.de_2
ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAFGe5/7cfDkbssq+by
@RubenKelevra
RubenKelevra / flash_unify_ap
Created June 6, 2016 09:16
Flash Unify AP with Freifunk Firmware via TFTP-Put
mv gluon-firmware-abc.bin /var/tmp/firmware.bin
cd /var/tmp/
tftp -m binary -v 192.168.1.20 -c put firmware.bin
oldifs="$IFS"
IFS=$'\n'
echo "" > installed_programs.txt
for e in `yaourt -Qen`; do
echo "$(echo $e | cut -d' ' -f1)" >> installed_programs.txt
done
IFS=$oldifs
[ -z "$1" ] && (echo "supply a hostname!") && exit 1
hostname="$1"
extrarepos='
[archlinuxfr]
SigLevel = Optional TrustAll
Server = http://repo.archlinux.fr/$arch
[repo-ck]
Server = http://repo-ck.com/$arch
@RubenKelevra
RubenKelevra / SCTP Conntrack missing ERROR
Last active June 27, 2016 07:38
Linux kernel complains about missing SCTP-Module for Conntracking...
conntrack: generic helper won't handle protocol 132. Please consider loading the specific helper module.
Fixing with
echo "ip_conntrack_proto_sctp" > /etc/modules-load.d/sctp.conf
modprobe ip_conntrack_proto_sctp