Skip to content

Instantly share code, notes, and snippets.


Timotheus Pokorra tpokorra

View GitHub Profile
import MySQLdb
import os
import shutil
# KnowledgeTree default place to store documents
ktdocument = '/var/www/ktdms/Documents/'
conn = MySQLdb.connect(user='', passwd='',db='', charset="utf8", use_unicode=True)
cursor = conn.cursor()
View NAnt.exe.config
<?xml version="1.0"?>
<!-- Leave this alone. Sets up configsectionhandler section -->
<section name="nant" type="NAnt.Core.ConfigurationSection, NAnt.Core" />
<section name="log4net" type="System.Configuration.IgnoreSectionHandler" />
<!-- Used to indicate the location of the cache folder for shadow files -->
<add key="shadowfiles.path" value="%temp%\nunit20\ShadowCopyCache" />
tpokorra /
Created Jan 17, 2018
only use this as a reference, don't run it
if [ -z "$1" ]
echo "$0 <user> <domain> <folder>"
echo "for example: $0"' "my.user" "Anfragen"'
echo "for a deleted mailbox: $0"' "test.test" "test" "test" 1'
tpokorra / reverseSEPA.php
Last active May 5, 2017
Reverse a SEPA direct debit file to a direct credit file / Lastschriften in Überweisungen konvertieren
View reverseSEPA.php
require __DIR__ . '/vendor/autoload.php';
use AbcAeffchen\Sephpa\SephpaCreditTransfer;
$xmlstring = file_get_contents("201704.xml");
$executiondate ='2017-05-08';
$records = new SimpleXMLElement($xmlstring, LIBXML_NOCDATA);
tpokorra / msbuild.spec
Last active Mar 31, 2017
msbuild spec file for RPM package
View msbuild.spec
# Note: this only works if you are able to modify /etc/os-release!
# for some reason, we cannot build on CentOS7, but only if we pretend to be Ubuntu 16.04!
Name: msbuild
Version: 15.1
Release: 1%{?dist}
Summary: The Microsoft Build Engine is a platform for building applications.
License: MIT
tpokorra / lxc-pi
Created Jan 20, 2016
lxc container Raspberry Pi
View lxc-pi
# lxc: linux Container library
# Authors:
# Original Debian:
# Daniel Lezcano <>
# Changes for Raspberry Pi by:
# Oliver Heller <>
# we need a fully qualified domain name
hostnamectl set-hostname $
yum install -y wget which bzip2 mailx selinux-policy-targeted
# disable SELinux
sed -i 's/enforcing/permissive/g' /etc/selinux/config
View timesheetng_mysqli.patch
--- 2016-04-25 09:40:40.329052075 +0200
+++ 2016-04-25 09:58:47.650099683 +0200
@@ -5,10 +5,14 @@
//Should have plug in compatibility.
function dbConnect() {
+ global $dbh;
- $dbh = mysql_pconnect("$DATABASE_HOST","$DATABASE_USER","$DATABASE_PASS") or die("Unable to connect to SQL server: ". mysql_error());
View lxc-centos
# template script for generating CentOS container for LXC
# lxc: linux Container library
# Authors:
tpokorra / upgradeLdifKolab.php
Last active Dec 27, 2015
upgrade ldif data from Kolab 2.3 to Kolab 3.x
View upgradeLdifKolab.php
# Timotheus Pokorra, for, April 2013
# import ldif file that has been dumped from Kolab2
# restoring domains, domain admins, and users
require_once "/usr/share/kolab-webadmin/lib/functions.php";
function debug($msg){
You can’t perform that action at this time.