Skip to content

Instantly share code, notes, and snippets.

Walter Werther wwerther

Block or report user

Report or block wwerther

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@wwerther
wwerther / fixandextend_csvimport.patch
Created Mar 11, 2012
Patch Teamcal 3.3.009 -> Fix and Extend CSV-Import
View fixandextend_csvimport.patch
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 / fix_lastlogin.patch
Created Mar 11, 2012
Patch Teamcal 3.3.009 -> Fix_Lastlogin
View fix_lastlogin.patch
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 / mobileICQ.php
Created Nov 16, 2011
Decoder for ICQ-History that can be found in the backup of your IPhone / IPod
View mobileICQ.php
<!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 / gist:1362341
Created Nov 13, 2011
Logrotate Configuation /etc/logrotate.conf/iptables
View gist:1362341
/var/log/iptables.log
{
rotate 7
daily
missingok
notifempty
delaycompress
compress
postrotate
invoke-rc.d rsyslog reload > /dev/null
View gist:1362333
#!/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 / iptables.conf
Created Nov 13, 2011
Rsyslog configuration for IPTables-Logs
View iptables.conf
# 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
& ~
View gist:1362316
# 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 / updatehe.sh
Created Nov 8, 2011
Small Script to update Tunnelbroker IPv4-address
View updatehe.sh
#!/bin/sh
USERID=<USERID from TUNNELBROKER.NET>
PASSWORD=<PASSWORD>
TUNNELID=<YOUR TUNNEL ID>
LOGSTATE=/tmp/updatehe.stat
if [ -e "$LOGSTATE" ] ; then
LASTIP=`cat $LOGSTATE`
@wwerther
wwerther / gist:1306377
Created Oct 22, 2011
rsnapshot.old.conf
View gist:1306377
#################################################
# rsnapshot.conf - rsnapshot configuration file #
#################################################
# #
# PLEASE BE AWARE OF THE FOLLOWING RULES: #
# #
# This file requires tabs between elements #
# #
# Directories require a trailing slash: #
# right: /home/ #
View gist:1306374
#################################################
# rsnapshot.conf - rsnapshot configuration file #
#################################################
# #
# PLEASE BE AWARE OF THE FOLLOWING RULES: #
# #
# This file requires tabs between elements #
# #
# Directories require a trailing slash: #
# right: /home/ #
You can’t perform that action at this time.