Skip to content

Instantly share code, notes, and snippets.

Florian Heigl FlorianHeigl

Block or report user

Report or block FlorianHeigl

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 tplink_lldp.py
View icinga.sh
#!/bin/sh
OK=0
CRIT=2
tics=$(date +%s)
if [ "$tics" -gt 1561741200 -a "$tics" -lt 1561914000 ]; then
# From Friday 17:00Z to Sunday: STFU
echo "OK - Please do not disturb; party in progress"
exit $OK
@FlorianHeigl
FlorianHeigl / pgist.sh
Created May 23, 2019 — forked from rubo77/pgist.sh
Post GIST
View pgist.sh
#!/bin/bash
GITHUB_USERNAME=rubo77
if [[ "$1" == "" ]]; then
echo 'usage: gistfile-post.sh filename [gistname]'
exit 0
fi
# 0. file name for the Gist
@FlorianHeigl
FlorianHeigl / inputrc
Created May 22, 2019
vi mode for bconsole etc
View inputrc
## enable vi mode on all readline programs
set editing-mode vi
#set keymap vi-command
set input-meta on
set output-meta on
set bell-style none
@FlorianHeigl
FlorianHeigl / bacula-jobs
Created Apr 23, 2019
update fuer bastis plugin
View bacula-jobs
#!/bin/sh
echo "<<<bacula_jobs:sep(9)>>>"
echo "Select JobId, Name, JobStatus, EndTime FROM Job WHERE EndTime BETWEEN NOW() - interval '30 days' AND NOW();" | sudo -u postgres psql --tuples-only bacula bacula
View check-mail-loop
#!/usr/bin/python
import time
import os
import sys
import smtplib
import poplib
import re
import random
@FlorianHeigl
FlorianHeigl / intel-no-ht
Created Nov 30, 2018
intel server disable hyperthreading
View intel-no-ht
# display
syscfg /d biossettings "Intel(R) Hyper-Threading Tech"
# change
syscfg /bcs "" "Intel(R) Hyper-Threading Tech" 0
@FlorianHeigl
FlorianHeigl / convwebm.sh
Last active Nov 18, 2018
most simple webm to mp4 converter for itunes, deletes original after conversion
View convwebm.sh
#!/usr/bin/env bash
DELETE=y
fullfile="${1}"
filename=$(basename -- "$fullfile")
extension="${filename##*.}"
filename="${filename%.*}"
@FlorianHeigl
FlorianHeigl / git-clearHistory
Last active Nov 16, 2018 — forked from stephenhardy/git-clearHistory
Steps to clear out the history of a git/github repository
View git-clearHistory
## Remove the history from
rm -rf .git
## recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
## push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:deepthinkag/curl2bash.git
@FlorianHeigl
FlorianHeigl / smart_freebsd
Created Sep 15, 2018
check_mk local check for smart on freeebsd (from elsewhere, limited functionality, better than none)
View smart_freebsd
#!/usr/local/bin/bash
# https://github.com/zmielna/smart_diskinfo
# Backblaze chaps have 40k disks and they care about SMART 187 mainly
# see https://www.backblaze.com/blog/hard-drive-smart-stats/
# This is Check_mk local check script for FreeBSD based NAS like NAS4FREE
# Drop a copy to /usr/lib/check_mk_agent/local/
# you can "telnet nas4free.domain.com 6556" from your OMD server to see if it works.
#
# SMART 5 \u2013 Reallocated_Sector_Count.
# SMART 187 \u2013 Reported_Uncorrectable_Errors.
You can’t perform that action at this time.