Skip to content

Instantly share code, notes, and snippets.

@hannesrauhe
hannesrauhe / keybase.md
Created April 19, 2014 12:31
keybase.md

Keybase proof

I hereby claim:

  • I am hannesrauhe on github.
  • I am hannesrauhe (https://keybase.io/hannesrauhe) on keybase.
  • I have a public key whose fingerprint is 8CF6 42A7 D5D0 9A2A 093C 9E56 25BF 6263 BBEA D97C

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am hannesrauhe on github.
* I am hannesrauhe (https://keybase.io/hannesrauhe) on keybase.
* I have a public key whose fingerprint is 5EB8 C46C 69AF 2A86 510F 2EF6 3ABE 187A 32E1 867D
To claim this, I am signing this object:
@hannesrauhe
hannesrauhe / git-flame.sh
Created February 22, 2017 10:47
git-flame
#!/bin/bash
FPATH="$1"
if [ ! -f $FPATH ]; then
echo "File does not exist"
exit
fi
pushd $(dirname $FPATH) > /dev/null
@hannesrauhe
hannesrauhe / RPi_I2C_driver.py
Created June 13, 2017 12:26 — forked from DenisFromHR/RPi_I2C_driver.py
RaspberryPi I2C LCD Python stuff
# -*- coding: utf-8 -*-
"""
Compiled, mashed and generally mutilated 2014-2015 by Denis Pleic
Made available under GNU GENERAL PUBLIC LICENSE
# Modified Python I2C library for Raspberry Pi
# as found on http://www.recantha.co.uk/blog/?p=4849
# Joined existing 'i2c_lib.py' and 'lcddriver.py' into a single library
# added bits and pieces from various sources
# By DenisFromHR (Denis Pleic)
sudo apt update
sudo apt install -y build-essential cmake libbluetooth-dev libcurl4-openssl-dev libenet-dev libfreetype6-dev libharfbuzz-dev libfribidi-dev libgl1-mesa-dev libglew-dev libjpeg-dev libogg-dev libopenal-dev libpng-dev libssl-dev libvorbis-dev libxrandr-dev libx11-dev nettle-dev pkg-config zlib1g-dev
sudo apt install -y git subversion g++ make pkg-config zlib1g-dev libz-dev libcurl4-gnutls-dev libssl-dev screen libsqlite3-dev sqlite3
git clone https://github.com/supertuxkart/stk-code stk-code
svn co https://svn.code.sf.net/p/supertuxkart/code/stk-assets stk-assets
cd stk-code
# create and enter the cmake_build directory
mkdir cmake_build
from fritzconnection import FritzConnection
from fritzconnection.lib.fritzhomeauto import FritzHomeAutomation
from fritzconnection.lib.fritzwlan import FritzWLAN
from fritzconnection.lib.fritzstatus import FritzStatus
from influxdb import InfluxDBClient,line_protocol
import json,time
fc = FritzConnection(address='fritz.box', user="", password="")
fs = FritzStatus(fc)
#fw = FritzWLAN(fc)
@hannesrauhe
hannesrauhe / templates.json
Last active January 22, 2022 17:53
just a test template for the restonator
{ "denonoff":
{ "callDenon":
{ "Mod" : "curl", "Fn" :"PostForm" , "Args":
{ "url":"http://192.168.170.26/MainZone/index.put.asp", "cmd0": "PutSystem_OnStandby/STANDBY" }
}
}
}
@hannesrauhe
hannesrauhe / graphs.json
Last active October 16, 2022 17:04
Collection of Graphs for Freeps v2
{
"consuloftheday": {
"OutputFrom": "#0",
"Operations": [
{
"Name": "#0",
"Operator": "curl",
"Function": "Get",
"Arguments": {
"url": "https://query.wikidata.org/sparql?format=json&query=select%20distinct%20%3Fitem%20%3FitemLabel%20%3FitemDescription%20%3Fimage%20%3Farticle%20where%20%7B%0A%20%20%20%20%3Fitem%20wdt%3AP31%20wd%3AQ5%3B%20%20%23%20Any%20instance%20of%20a%20human.%0A%20%20%20%20%20%20%20%20%20%20wdt%3AP39%20wd%3AQ40779%3B%20%20%23%20%20Who%20held%20position%20consul%0A%20%20%20%20%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP18%20%3Fimage%20.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Farticle%20schema%3Aabout%20%3Fitem%20.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Farticle%20schema%3AisPartOf%20%3Chttps%3A%2F%2Fen.wikipedia.org%2F%3E.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22%20%7D%0A%7D"