Skip to content

Instantly share code, notes, and snippets.

@wwerther
wwerther / gist:1362316
Created November 13, 2011 16:49
IP6Table-Rules
# Generated by ip6tables-save v1.4.8 on Sun Nov 13 17:47:55 2011
*filter
:INPUT DROP [4018:321440]
:FORWARD DROP [6107:487980]
:OUTPUT ACCEPT [2868:232336]
:HEIPV6LOCAL - [0:0]
:LAN - [0:0]
:LAN2WAN - [0:0]
:LOGDROP - [0:0]
:SIXXSLOCAL - [0:0]
@wwerther
wwerther / iptables.conf
Created November 13, 2011 16:59
Rsyslog configuration for IPTables-Logs
# Filter IP-Tables LOGs
# and discard the line afterwards
:msg, contains, "iptables" -/var/log/iptables.log
& ~
# Filter IP6-Tables LOGs
# and discard the line afterwards
:msg, contains, "ip6tables" -/var/log/ip6tables.log
& ~
@wwerther
wwerther / gist:1362333
Created November 13, 2011 17:00
IP-Table Rules
#!/bin/sh
iptables -A INPUT -d <your local ipv4> -i eth0 -p udp -m udp --sport 5072 -m comment --comment "allow SixXS traffic" -j ACCEPT
iptables -A OUTPUT -s <your local ipv4> -o eth0 -p udp -m udp --dport 5072 -m comment --comment "allow SixXS traffic" -j ACCEPT
@wwerther
wwerther / gist:1362341
Created November 13, 2011 17:07
Logrotate Configuation /etc/logrotate.conf/iptables
/var/log/iptables.log
{
rotate 7
daily
missingok
notifempty
delaycompress
compress
postrotate
invoke-rc.d rsyslog reload > /dev/null
@wwerther
wwerther / mobileICQ.php
Created November 16, 2011 13:35
Decoder for ICQ-History that can be found in the backup of your IPhone / IPod
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<style TYPE="text/css">
<!--
.isfromme {
background: rgb(229, 194, 78);
}
@wwerther
wwerther / fix_lastlogin.patch
Created March 11, 2012 22:08
Patch Teamcal 3.3.009 -> Fix_Lastlogin
diff --git a/sql/empty.sql b/sql/empty.sql
index 129af9e..179d82f 100755
--- a/sql/empty.sql
+++ b/sql/empty.sql
@@ -355,7 +355,7 @@ CREATE TABLE `my_tc_users` (
`last_pw_change` datetime default NULL,
`birthday` date default NULL,
`idnumber` varchar(40) default NULL,
- `last_login` datetime NOT NULL default '',
+ `last_login` datetime NULL,
@wwerther
wwerther / fixandextend_csvimport.patch
Created March 11, 2012 22:12
Patch Teamcal 3.3.009 -> Fix and Extend CSV-Import
diff --git a/includes/csvhandler.class.php b/includes/csvhandler.class.php
index 44788cd..618f664 100755
--- a/includes/csvhandler.class.php
+++ b/includes/csvhandler.class.php
@@ -264,7 +264,7 @@ if (!class_exists("CsvImport")) {
if ($fpointer) {
while ($arr = fgetcsv($fpointer, 10 * 1024, ";")) {
if (is_array($arr) && !empty ($arr)) {
- if (count($arr)<>11) {
+ if ((count($arr)<11) or (count($arr)>12)) {
@wwerther
wwerther / trigger_awattar.js
Created June 23, 2023 20:36
IOBroker - Trigger Awattar 2 Influx
const axios = require('axios').default;
const influxDbInstance = 'influxdb.0';
const token = 'xxxxxxxxxxxxxxxxxxxxxx';
const measurement = 'energy-stats';
const loggingTemplate = {
'awattar.0.Rawdata': 'awattar',
//{"object":"list","data":[{"start_timestamp":1687392000000,"end_timestamp":1687395600000,"marketprice":115.49,"unit":"Eur/MWh"},{"start_timestamp":1687395600000,"end_timestamp":1687399200000,"marketprice":111.34,"unit":"Eur/MWh"},{"start_timestamp":1687399200000,"end_timestamp":1687402800000,"marketprice":107.02,"unit":"Eur/MWh"},{"start_timestamp":1687402800000,"end_timestamp":1687406400000,"marketprice":115.75,"unit":"Eur/MWh"},{"start_timestamp":1687406400000,"end_timestamp":1687410000000,"marketprice":137.62,"unit":"Eur/MWh"},{"start_timestamp":1687410000000,"end_timestamp":1687413600000,"marketprice":152.72,"unit":"Eur/MWh"},{"start_timestamp":1687413600000,"end_timestamp":1687417200000,"marketprice":153.94,"unit":"Eur/MWh"},{"start_timestamp":1687417200000,"end_timestamp":16874208000
@wwerther
wwerther / fetch_awattar.js
Created June 23, 2023 20:38
Iobroker - Skript Awattar History 2 Influx DB
const axios = require('axios').default;
const influxDbInstance = 'influxdb.0';
const token = 'xxxxxxxxxxxxxxxxxxxx';
const measurement = 'energy-stats';
const influxDbInstanceConfig = await getObjectAsync(`system.adapter.${influxDbInstance}`);
const protocol = influxDbInstanceConfig.native.protocol;
const host = influxDbInstanceConfig.native.host;
@wwerther
wwerther / iobroker_modbus_solaredge_sf.tsv
Last active July 27, 2023 19:58
IOBROKER - Modbus TCP Solaredge incl. SF
_address name description unit type len factor offset formula role room poll wp cw isScale
40001 SunSpecID C_SunSpec_ID uint32be 2 1 0 state true false false false
40003 SunSpecDID C_SunSpec_DID uint16be 1 1 0 state true false false false
40004 SunSpecLength C_SunSpec_Length uint16be 1 1 0 state true false false false
40005 Manufacturer C_Manufacturer string 16 1 0 state true false false false
40021 Model C_Model string 16 1 0 state true false false false
40045 Version C_Version string 8 1 0 state true false false false
40053 SerialNumber C_SerialNumber string 16 1 0 state true false false false
40069 DeviceAddress C_DeviceAddress uint16be 1 1 0 state true false false false
40070 PhaseTypes C_SunSpec_DID uint16be 1 1 0 state true false false false