View camus_configuration.nix
# nixos config for camus thinkpad T430s Laptop | |
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix | |
]; |
View kevin_configuration.nix
# Edit this configuration file to define what should be installed on | |
# your system. Help is available in the configuration.nix(5) man page | |
# and in the NixOS manual (accessible by running ‘nixos-help’). | |
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix |
View mikrotik_ddos_TCP.rsc
/ip firewall filter | |
add action=reject chain=forward comment="DROP DDOS-TCP ACCESS LIST" log-prefix=BLACKLIST reject-with=icmp-port-unreachable src-address-list=DDOSER-UDP | |
add action=add-src-to-address-list address-list=DDOSER-TCP address-list-timeout=1w chain=forward connection-limit=50,32 dst-address-list=MISAXNET protocol=tcp | |
add action=add-src-to-address-list address-list=DDOSER-TCP address-list-timeout=1h chain=forward dst-address-list=MISAXNET dst-limit=50,32,src-and-dst-addresses/1h \ | |
protocol=tcp dst-port=587 |
View batmanclients.rb
#!/usr/bin/env ruby | |
require 'getoptlong' | |
# The name of the collectd plugin, something like apache, memory, mysql, interface, ... | |
PLUGIN_NAME = 'batmanclients' | |
def usage | |
puts("#{$0} -h <host_id> [-i <sampling_interval>]") | |
exit | |
end |
View rename_latest.sh
#!/bin/sh | |
# Copyright David Noelte - 2016 | |
# Freifunk Mittelsachsen | |
# für Sachsen-Webcam.de | |
# zur freien verwendung freigegeben! | |
# einfach den code auf dem server unter rename_latest.sh speicher | |
# dann einen cronjob anlegen wie folgt | |
# */1 * * * * sh /pfad/zum/script/rename_latest.sh |
View gluon_auto_reboot.sh
# edit /etc/crontabs/root | |
# | |
# add the following line to reboot the router every night at 03:05 | |
# | |
# 5 3 * * * /sbin/reboot > /dev/null |
View throttle.sh
#!/bin/ash | |
# | |
#Check if Mesh-VPN shall be limited | |
# | |
# 1. Edit DownloadRate and UploadRate | |
# 2. save via vi in /etc/throttle.sh | |
# 3. make executable "chmod a+x /etc/throttle.sh" | |
# 4. add to cron to check every 15min "*/15 * * * * /etc/throttle.sh >/dev/null 2>&1" | |
# 5. edit /etc/sysupgrade.conf to protect from sysupgrade | |
# add line "/etc/throttle.sh" |
View check_vplan.sh
#!/bin/bash | |
# | |
# Quick and Dirty Vplan Checker | |
# | |
# - checks for vplan on industrieschule.de | |
# - downloads the pdfs and checks if it contains a certain class | |
# + if it matches converts the pdf to png and sends an email to an email list | |
# | |
# requires: | |
# - linux :-) |
View passthrough.sh
# add to /etc/rc.local | |
# Uncomment one of these three: | |
#GPIO=20 # TP-LINK CPE210/510 | |
#GPIO=8 # Ubiquiti Nanostation M2/M5 (XM) | |
#GPIO=2 # Ubiquiti Nanostation M2/M5 (XW) | |
echo $GPIO > /sys/class/gpio/export | |
echo out > /sys/class/gpio/gpio$GPIO/direction | |
echo 1 > /sys/class/gpio/gpio$GPIO/value |
View dd-to-disk.sh
dd if=debian-8.1.0-i386-netinst.iso | pv --eta --size 330301440 --progress --bytes --rate --wait > /dev/sdc |
NewerOlder