Skip to content

Instantly share code, notes, and snippets.

View schlady's full-sized avatar

schlady schlady

  • Greifswald, Germany
View GitHub Profile
@schlady
schlady / fastd.conf
Last active July 31, 2016 21:32
fastd config
log level warn;
hide ip addresses yes;
hide mac addresses yes;
interface "hgwVPN";
method "salsa2012+umac"; # new method (faster)
method "salsa2012+gmac";
method "null+salsa2012+umac";
method "null+salsa2012+gmac";
@schlady
schlady / dsmcad.service
Created October 12, 2016 09:35
systemd service file for the Tivoli Storage Manager Client Daemon dsmcad
[Unit]
Description=Tivoli Storage Manager Client Daemon
After=network.target
[Service]
Type=forking
ExecStart=/usr/bin/dsmcad
Restart=on-abort
GuessMainPID=no
@schlady
schlady / tivoli.sh
Created December 16, 2011 14:07
Debian/Ubuntu init script for IBM Tivoli Storage Manager Client Schedule
#!/bin/bash
### BEGIN INIT INFO
# Provides: dsmc
# Required-Start: $local_fs $network $syslog
# Required-Stop: $local_fs $network $syslog
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: Start and stop the Tivoli Storage Client
# Description: Control the IBM Tivoli Storage Manager Client Schedule instance
### END INIT INFO
@schlady
schlady / gsl
Created July 27, 2017 15:12
GSL environment module file
#%Module1.0
# statements here:
# prepend-path, append-path, setenv, unsetenv, prereq, conflict, module
set topdir /opt/gsl/gsl-2.4
prepend-path PATH $topdir/bin
prepend-path LD_LIBRARY_PATH $topdir/lib
prepend-path LIBRARY_PATH $topdir/lib
prepend-path C_INCLUDE_PATH $topdir/include
@schlady
schlady / peakdetect.py
Created January 7, 2012 21:18 — forked from sixtenbe/analytic_wfm.py
Peak detection in Python
import numpy as np
def peakdetect(y_axis, x_axis = None, lookahead = 500, delta = 0):
"""
Converted from/based on a MATLAB script at http://billauer.co.il/peakdet.html
Algorithm for detecting local maximas and minmias in a signal.
Discovers peaks by searching for values which are surrounded by lower
or larger values for maximas and minimas respectively
#!/bin/bash
image="${1}"
wget -q https://registry.hub.docker.com/v1/repositories/"${image}"/tags -O - \
| tr -d '[]" ' | tr '}' '\n' | awk -F: '{print $3}'
@schlady
schlady / tmuxn.sh
Created February 24, 2015 13:14
A self destroying tmux session
alias tmuxn='tmux new-session -s $$'
_trap_exit() { tmux kill-session -t $$; }
trap _trap_exit EXIT
@schlady
schlady / vnstati.sh
Created October 31, 2016 16:35
Autogenerated vnstat status page
#!/bin/sh
set -e
IFACES=$(ls /var/lib/vnstat/)
TARGET=/var/www/vnstat/
for iface in $IFACES; do
/usr/bin/vnstati -i ${iface} -h -o ${TARGET}/${iface}_hourly.png
/usr/bin/vnstati -i ${iface} -d -o ${TARGET}/${iface}_daily.png
@schlady
schlady / mathlm.service
Created November 11, 2015 16:07
systemd service file for Mathematica network license manager MathLM
[Unit]
Description=Mathematica network license manager
After=network.target
[Service]
ExecStart=/usr/sbin/mathlm -foreground -logfile /var/log/mathlm.log -pwfile /opt/Wolfram/MathLM/mathpass
Restart=always
[Install]
WantedBy=multi-user.target
@schlady
schlady / nmap_commands.sh
Last active October 14, 2023 22:57
Some more or less useful nmap commands via [https://jonlabelle.com/snippets/view/shell/nmap-commands]
# Single target scan:
nmap [target]
# Scan from a list of targets:
nmap -iL [list.txt]
# iPv6:
nmap -6 [target]
# OS detection: