View set_homeassistant_zwave_configs.bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# License: BSD | |
# | |
# !! ATTENTION !! | |
# Do not spam the zwave network with too many set-config at once, it will | |
# bring the communication & network down. Best case is increasing the sleep below again by | |
# the factor of 2! | |
# |
View gist:49580328ca062e39ea2a902517333ee0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
URL="http://192.168.10.10:8123" | |
function set_config_param { | |
curl -X POST "${URL}/api/services/zwave/set_config_parameter" -H "Content-Type: application/json" --data "{ \"node_id\": ${1}, \"parameter\": ${2}, \"value\": ${3} }" | |
} | |
function set_wakeup { | |
curl -X POST "${URL}/api/services/zwave/set_wakeup" -H "Content-Type: application/json" --data "{\"node_id\": ${1}, \"value\": ${2}}" |
View gist:220dae1d4d080d5a55d5897e0e4f0a5b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from selenium import webdriver as drv | |
from selenium.webdriver import ChromeOptions | |
from selenium.webdriver.common.keys import Keys | |
opts = ChromeOptions() | |
opts.add_argument("--headless") | |
br = drv.Chrome(chrome_options=opts) | |
br.get("http://www.hanau.de/lih/sicherheit/abfall/009613/index.html") | |
elems = br.find_element_by_tag_name("input") | |
br.get("http://www.muellmax.de/abfallkalender/his/res/HisStart.php") |
View header.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% | |
%% Header file including short descriptions of packages | |
%% preferably to be used for natural sciences and such: | |
%% computer science, electrical engineering, physics, maths | |
%% | |
%% Author: Markus Meissner <coder@safemailbox.de> | |
%% License: BSD | |
%% | |
\documentclass[a4paper,11pt]{book} |
View functions.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## | |
## indir - execute given command ($2) in | |
## target directory ($1) with arguments ($3..N) | |
## | |
function indir { | |
if [[ "$1" = "" ]] || [[ "$2" = "" ]]; then | |
echo "[i] Usage: indir <target_dir> <command> <arg1> .. <argN>" | |
return 1 |
View ssh_aliases.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## | |
## create an alias for each unambigous host entry in ${HOME}/.ssh/config | |
## | |
## instead of using "ssh myhostname" you can simply use "myhostname" to | |
## establish a ssh-connection to the host! | |
## | |
## You most likely have to change CACHE_FN to point somewhere, | |
## where you want to store the cache |
View example.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%% author: Markus Meissner <coder@safemailbox.de> | |
%%% | |
%%% simple inverter example circuitikz | |
%%% | |
%%% TO USE FANCY MOSFET DEVICES: | |
%%% - get pgfcirctripoles.sty from https://gist.github.com/daringer/78649db64ff04a3b9849 | |
%%% - place it in the _same directory_ as your .tex source file | |
%%% - TeX will now replace the pgfcirctripoles.tex from circuitikz with this one | |
%%% - set some style definitions (see below) | |
%%% - compile your TeX code and use the fancy MOSFET devices |
View Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
obj-m := asus_fan.o | |
KDIR := /lib/modules/$(shell uname -r)/build | |
PWD := $(shell pwd) | |
all: | |
$(MAKE) -C $(KDIR) M=$(PWD) modules | |
install: | |
# just copy the .ko file anywhere below: | |
# /lib/modules/$(uname -r)/ |