Skip to content

Instantly share code, notes, and snippets.

View gersilex's full-sized avatar

Leroy Förster gersilex

View GitHub Profile
@gersilex
gersilex / README.md
Last active July 5, 2021 17:22
Filter for body content in Fiddler using Fiddlerscript
  1. Open the Fiddlerscript tab in Fiddler
  2. Fiddlerscript is already pre-filled and contains all the logic you selected. Don't erase the script that is in there. Instead, use the 'Go to' dropdown and go to the 'onBeforeResponse' function.
  3. Replace the content with the following and edit to your liking:
static function OnBeforeResponse(oSession: Session) {
  oSession.utilDecodeResponse();
  var body = oSession.GetResponseBodyAsString();
  if (!body.Contains("Dog concerto")) {
 oSession["ui-hide"] = "true";
@gersilex
gersilex / sleep_wakeup_lights.rules
Created October 27, 2020 17:00
Tasmota-based virtual sunrise wakeup lights for openHAB (Rules DSL)
val Number wakeupDurationSeconds = 3000
val Number finishedStayOnDurationSeconds = 0
var Timer wakeupTimer = null
rule "Alarm at 0 should be UNDEF"
when Member of alarm_clocks changed
then
if(triggeringItem.state == 0) triggeringItem.postUpdate(UNDEF)
end
@gersilex
gersilex / migrate_live_ssh
Created July 24, 2019 12:27
OpenNebula Live Migration Examples
#!/usr/bin/env bash
#
# Live migration-over-SSH script for use with OpenNebula.
# Set the 'migrate' action to run this script in /etc/one/oned.conf
# for your respective virtualization type. Only KVM is supported right now.
#
# Author: Leroy Förster <leroy.foerster@immonet.de>
# Contributor: Paul Jost <paul.jost.immonet.de>
#
# (c) 2019 Immowelt Hamburg GmbH
@gersilex
gersilex / import-rds-certs.sh
Last active April 16, 2018 13:38 — forked from shareefhiasat/import-rds-certs.sh
import RDS certificates to java keystore on alpine / osx
#!/usr/bin/env sh
#i tried it and working like charm just have to note make the file .sh chmod +x and you may need sudo to run with permission but be carefull with sudo
#be sure the $JAVA_HOME is configure correctly or make it static as commentedline 7 below
OLDDIR="$PWD"
if [ -z "$CACERTS_FILE" ]; then
# you should have java home configure to point for example /usr/lib/jvm/default-java/jre/lib/security/cacerts
CACERTS_FILE=$JAVA_HOME/jre/lib/security/cacerts
fi
@gersilex
gersilex / example
Created January 14, 2018 14:05
Use a remote/keyboard/mouse on Kodi to send commands to openHAB or other HTTP interfaces (with optional repeations)
[silex@tinywings Downloads]$ ssh media
##############################################
# LibreELEC #
# http://libreelec.tv #
##############################################
LibreELEC (official) Version: 8.0.2
media:~ # pwd
/storage
media:~ # cat custom_scripts/openhab_CMD.py
@gersilex
gersilex / cmdline.txt
Created April 13, 2017 23:18
Raspberry Pi 2 cmdline for NFS root filesystem
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/nfs nfsroot=192.168.21.1:/nfs/rootfs/vera ip=dhcp elevator=deadline
All codes are NEC 32 bits
FF906F Mute
FFB04F Power Toggle
FFD827 Vol down
FF8877 Vol up
FFE817 Front
FF48B7 Center
FF6897 Treble
@gersilex
gersilex / default.rules
Last active July 29, 2018 18:52
mysensors-openhab-rules-elements
// NOTES //
// "senso_irf24" is my String item with the serial binding
// in MySensors terms this is called the "Serial Gateway"
//
// CONTRIBUTE: Feel free to fork, enhance, pull reqest
//
// SiLeX <gersilex@gmail.com>
//
//
// IMPORTS //////////////////////////////////////////////////////////////////////////////////////////////////////////
@gersilex
gersilex / lgtv-nec-ir-codes.txt
Last active January 25, 2021 14:53
LG TV 2008-2013 NEC IR Codes
All codes are in hexadecimal NEC format, 32 bits long. Ready to use with IRLib Arduino library.
### DISCRETE INPUTS ###
Tuner 20DF6B94
HDMI1 20DF738C
HDMI2 20DF33CC
HDMI3 20DF9768
HDMI4 20DF5BA4