Skip to content

Instantly share code, notes, and snippets.

View TimKraemer's full-sized avatar
🌴
Working on AR / VR

Tim Krämer TimKraemer

🌴
Working on AR / VR
View GitHub Profile
@TimKraemer
TimKraemer / ThePoopBagMap.html
Last active June 20, 2016 13:17
ThePoopBagMap
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>The Poop Bag Map</title>
<style type="text/css">
html {
height: 100%
}
@TimKraemer
TimKraemer / data_to_raw_heightmap.py
Last active August 29, 2015 14:25
data_to_raw_heightmap.py
from collections import defaultdict
import numpy as np
import time
# A CSV File with about 35 million lines looking like this:
# 578559.000 5917080.000 5.608
# 578560.000 5917080.000 5.639
# 578562.000 5917080.000 -2.629
# ...
FILENAME = "../../Sources/HH_bis_28082013_1m_NN_UTM.txt"
@TimKraemer
TimKraemer / keybase.md
Created July 17, 2015 13:49
keybase.md

Keybase proof

I hereby claim:

  • I am TimKraemer on github.
  • I am tiekei (https://keybase.io/tiekei) on keybase.
  • I have a public key whose fingerprint is 3C2C F9CD A517 A37A 214D C0CB 14DA 1012 D0C2 D1F1

To claim this, I am signing this object:

@TimKraemer
TimKraemer / user-callback
Created July 20, 2015 13:19
backintime user-callback backup script
#!/usr/bin/env bash
# this file is called by backintime to handle it's current states
# see: http://backintime.le-web.org/documentation/usercallback/
MOUNT_PATH="/media/backup"
LOG_FILE="/var/log/backintime/backintime.log"
EMAIL_ADDRESS="backup@tim-kraemer.de"
LAST_READ_MARKER_PATH="/root/backup_timestamps/marker"
NAME_INDICATOR_PATH=${MOUNT_PATH}"/name_backup"
@TimKraemer
TimKraemer / cpu_temperature_warning.sh
Last active October 29, 2018 12:49
script to check temperatures of Ubuntu Server and send an email report if specified temperatures exceeded
#!/bin/bash
# PURPOSE: Script to check temperatures and report if specified temperatures exceeded
# requires lm-sensors
LOG_FILE="/var/log/CPUWarning.log"
EMAIL_ADDRESS="lockbase@koertner-muth.com"
MAX_TEMP=70
warning=false
@TimKraemer
TimKraemer / online_service_health_check.sh
Last active June 27, 2018 12:45
script to check LOCKBASE online services availability
#!/bin/bash
# PURPOSE: Script to check LOCKBASE online services availability
LOG_FILE="/var/log/online_services_health.log"
EMAIL_ADDRESS="lockbase@koertner-muth.com"
HetznerURL="https://lockbase.net/cgi-bin/"
BackupURL="https://lockbase.org/cgi-bin/"
OnlineCheckURL="https://www.google.com/"
WebsiteURL="https://koertner-muth.de/koertner-muth/Navi.cgi"
@TimKraemer
TimKraemer / kmdb_backup_script.sh
Created June 20, 2016 13:21
daily postgres dump called by crontab
#!/bin/bash
su postgres -c 'pg_dump db --clean' | gzip --rsyncable --best > /data/export/KM/backup/kmdb/"$(date +"%Y-%m-%d")".gz
#!/bin/bash
# automagically downloads the newest stable mediawiki and it's php dependencies
MW_PATH="/export/home/wwwfsr/fachschaft/wiki" # set your mediawiki path here
MW_stable_branch_number=$(curl -s "https://www.mediawiki.org/w/api.php?action=expandtemplates&text=\{\{MW%20stable%20branch%20number\}\}&prop=wikitext&formatversion=2&format=json" | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["expandtemplates"]["wikitext"]')
MW_stable_release_number=$(curl -s "https://www.mediawiki.org/w/api.php?action=expandtemplates&text=\{\{MW%20stable%20release%20number\}\}&prop=wikitext&formatversion=2&format=json" | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["expandtemplates"]["wikitext"]')
@TimKraemer
TimKraemer / wifionice
Last active May 3, 2023 15:46 — forked from vollkorn1982/wifionice
HowTo auto connect your Linux to the German Wifi on ICE trains
#!/bin/sh
# put this file in /etc/network/if-up.d/
if iwconfig wlp4s0 | grep -c "ESSID:\"WIFIonICE\""
then
curl -s "https://www.ombord.info/hotspot/hotspot.cgi?connect=&method=login&realm=db_advanced_wifi"
fi