Skip to content

Instantly share code, notes, and snippets.

@joleuger
joleuger / Angabe-Lösung-vbs
Created September 30, 2017 14:52
Word Marko, mit dem in einer Schulaufgabe/Schularbeit zwischen Angabe und Lösung gewechselt werden kann. Dazu muss die Lösung markiert werden, indem sie entweder unterstrichen wird, oder sie von der Formatvorlage "Lösung (versteckt)" bzw. "Lösung (angezeigt)" erbt
Sub Angabe()
'
' Angabe Macro
'
'
With ActiveDocument.Content.Find
.ClearFormatting
.Font.Underline = wdUnderlineDotted
.Replacement.ClearFormatting
.Replacement.Font.Color = wdColorWhite
@joleuger
joleuger / mqtt-seduboard.py
Created June 6, 2017 21:03
Control SeduBoard with OpenHAB via MQTT (Script needs to be adapted)
#!/usr/bin/python3
# pip3 install paho-mqtt
# pip3 install pyserial
# Assume that OpenHAB writes HSV values to MQTT server at path /things/Licht_Wohnzimmer_Ambilight_Farbe
# This is possible with an item in conf/items/example.items which is connected to MQTT, e.g.,
# Color Licht_Wohnzimmer_Ambilight_Farbe "Wohnzimmer Ambilight" {mqtt=">[openhab-things:/things/Licht_Wohnzimmer_Ambilight_Farbe:state:*:default]"}
# For more details, see http://docs.openhab.org/addons/bindings/mqtt1/readme.html
# and http://docs.openhab.org/configuration/items.html
@joleuger
joleuger / README WIFI reconnect.md
Last active August 29, 2015 14:21
WLAN debian autoreconnect (ping method)

I had problems with my raspberry pi disconnecting and never reconnecting to a WiFi-network. There are already several different solutions

  • http://raspberrypi.stackexchange.com/questions/4120/how-to-automatically-reconnect-wifi
  • http://www.forum-raspberrypi.de/Thread-wlan-reconnect-nach-verbindungsabbruch?page=2

This is mine:

  1. vim /usr/local/sbin/wlan-reconnect
  2. chmod +x /usr/local/sbin/wlan-reconnect.sh
  3. vim /etc/systemd/system/wlan-reconnect.timer
  4. vim /etc/systemd/system/wlan-reconnect.service
  5. systemctl daemon-reload
@joleuger
joleuger / Denon Vtuner example.md
Last active October 22, 2021 14:39
Denon Vtuner example

Tcpdumps of AVR-1713. Reason for dumps: If Denon ever discontinues the vtuner service I need to serve my receiver these dumps:

Press Favorite Station 1 long to save current station as favorite.

Entrance link http://denon.vtuner.com:80/setupapp/denon/asp/browsexm2/navXML.asp?rLev=&gofile=web&mac=xxxxxxxxxxxxxxxxxx&fver=xxxxxx&dlang=ger&startitems=1&enditems=10

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>^M
<ListOfItems>^M
<ItemCount>3</ItemCount>^M
@joleuger
joleuger / README_audioclient.md
Last active December 30, 2020 23:00
Audioserver with Pulseaudio and SystemD/LoginD User Lingering (allows bluetooth)

For a tool, which executes a configurable command when a bluetooth device connects, see repository https://github.com/joleuger/bluetooth-manager. It can be used to play an icecast stream.

> apt-get install libpam-systemd
> apt-get install pulseaudio gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-tools mpv
> apt-get install bluetooth bluez bluez-tools bluez-firmware pulseaudio-module-bluetooth 
> adduser audioclient
> vim /etc/shadow (remove password)
@joleuger
joleuger / [F#] [Computation Expression] WorkflowDemo1.fs
Last active August 29, 2015 14:15
[F#] [Computation Expression] Implementation of a workflow with computation expressions
// The MIT License (MIT)
//
// Copyright (c) 2014-2015, Institute for Software & Systems Engineering
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: