Skip to content

Instantly share code, notes, and snippets.

Timotheus Pokorra tpokorra

Block or report user

Report or block tpokorra

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
View timesheetng_mysqli.patch
--- mysql.db.inc.orig 2016-04-25 09:40:40.329052075 +0200
+++ mysql.db.inc 2016-04-25 09:58:47.650099683 +0200
@@ -5,10 +5,14 @@
//Should have plug in compatibility.
function dbConnect() {
+ global $dbh;
$GLOBALS["CONNECTED_MYSQL_DB_INC"] = 1;
global $DATABASE_HOST, $DATABASE_USER, $DATABASE_PASS, $DATABASE_DB;
- $dbh = mysql_pconnect("$DATABASE_HOST","$DATABASE_USER","$DATABASE_PASS") or die("Unable to connect to SQL server: ". mysql_error());
View NAnt.exe.config
<?xml version="1.0"?>
<configuration>
<!-- Leave this alone. Sets up configsectionhandler section -->
<configSections>
<section name="nant" type="NAnt.Core.ConfigurationSection, NAnt.Core" />
<section name="log4net" type="System.Configuration.IgnoreSectionHandler" />
</configSections>
<appSettings>
<!-- Used to indicate the location of the cache folder for shadow files -->
<add key="shadowfiles.path" value="%temp%\nunit20\ShadowCopyCache" />
@tpokorra
tpokorra / lxc-pi
Created Jan 20, 2016
lxc container Raspberry Pi
View lxc-pi
#!/bin/bash
#
# lxc: linux Container library
# Authors:
# Original Debian:
# Daniel Lezcano <daniel.lezcano@free.fr>
# Changes for Raspberry Pi by:
# Oliver Heller <oliver@d24m.de>
View kolab_mirror_packages_from_obs_to_copr.py
#!/usr/bin/env python3
import os.path
import sys
from collections import deque
import urllib.request
import re
if len(sys.argv) != 2:
print("Please specify which Kolab version to run this script for. eg. 3.4, or 3.4-updates")
sys.exit(-1)
View mirror_kolabObsToCopr.sh
mkdir -p obs/kolab-3.4
cd obs/kolab-3.4
obsurl=http://obs.kolabsys.com/repositories/Kolab:/3.4/CentOS_7/src/
wget $obsurl -O index.html
# see http://unix.stackexchange.com/questions/181254/how-to-use-grep-and-cut-in-script-to-obtain-website-urls-from-an-html-file
for f in `cat index.html | grep rpm | grep -Eoi '<a [^>]+>' | grep -Eo 'href="[^\"]+"' | awk -F'"' '{ print $2}'`
do
wget $obsurl/$f
done
rm index.html
View indentNamespace.cs
using System;
using System.IO;
using System.Text;
namespace indent
{
class main
{
// Process all files in the directory passed in, recurse on any directories
// that are found, and process the files they contain.
View fixannotations.sh
#!/bin/bash
service cyrus-imapd start
sleep 3
toolsdir=`pwd`
while read line
do
domain=$line
kontakte=`kolab list-mailbox-metadata "user/*@$domain" | grep -E "Kontakte|Contact"`
View lxc-centos
#!/bin/bash
#
# template script for generating CentOS container for LXC
#
#
# lxc: linux Container library
# Authors:
@tpokorra
tpokorra / lxc-debian-wheezy
Last active Oct 4, 2018
lxc template for debian wheezy to install on Ubuntu precise 12.04 host
View lxc-debian-wheezy
#!/bin/bash
#
# lxc: linux Container library
# Authors:
# Daniel Lezcano <daniel.lezcano@free.fr>
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@tpokorra
tpokorra / upgradeLdifKolab.php
Last active Dec 27, 2015
upgrade ldif data from Kolab 2.3 to Kolab 3.x
View upgradeLdifKolab.php
<?php
# Timotheus Pokorra, for TBits.net, 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){
if(is_writeable("/tmp/mylog.log")){
You can’t perform that action at this time.