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
@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")){
@tpokorra
tpokorra / reinstallKolabDebian.sh
Last active Dec 26, 2015
install kolab on Debian
View reinstallKolabDebian.sh
service kolab-server stop
service kolab-saslauthd stop
service cyrus-imapd stop
service dirsrv stop
service wallace stop
service apache2 stop
if [ -f /usr/sbin/remove-ds-admin ]
then
sed -i "s#/usr/lib/x86_64-linux-gnu/dirsrv/perl);#/usr/lib/x86_64-linux-gnu/dirsrv/perl);\nuse lib qw(/usr/lib/dirsrv/perl);#g" /usr/sbin/remove-ds-admin
@tpokorra
tpokorra / fixannotations.sh
Created Oct 1, 2013
Kolab: fixes CyrusIMAP problems with 32 bit to 64 bit migration, annotations.db folder-type
View fixannotations.sh
# call with domain name as parameter, eg. ./fixannotations.sh mydomain.org
domain="user/*@$1"
acceptedFolderTypes=(
"event" "event.default"
"contact" "contact.default"
"note" "note.default"
"task" "task.default"
"journal" "journal.default"
"mail.outbox" "mail.sentitems" "text/plain")
@tpokorra
tpokorra / testimap.php
Last active Dec 21, 2015
testing the imap flags and acl permissions
View testimap.php
<?php
// centos: yum install php-imap
$host="localhost";
$mbox = imap_open("{".$host.":993/imap/ssl/novalidate-cert}INBOX", "admin.admin@servers.jiffybox.net", "test");
if ($mbox== null) die("mbox is null");
$folders = imap_listmailbox($mbox, "{".$host.":993}", "*");
echo "<pre>folders: ".print_r($folders,true)."</pre>";
$headers = imap_headers($mbox);
View _jiffybox.php
<?php
// get from here: https://github.com/tfnet/jiffy-api-php-client/blob/master/JiffyBoxApi.class.php
require "JiffyBoxApi.class.php";
$token = "INSERT YOUR TOKEN HERE";
$id=INSERT YOU jiffybox id HERE;
$planid=20;
$hours=2;
if (!empty($argc) && strstr($argv[0], basename(__FILE__)))
{
@tpokorra
tpokorra / _patchQuotaEdit.patch
Last active Dec 18, 2015
Kolab webadmin: select a unit, eg. KB, MB or GB for the quota to be stored
View _patchQuotaEdit.patch
diff -uNr kolab-webadmin.orig/lib/api/kolab_api_service_user.php kolab-webadmin/lib/api/kolab_api_service_user.php
--- kolab-webadmin.orig/lib/api/kolab_api_service_user.php 2013-06-18 11:33:48.541736452 +0200
+++ kolab-webadmin/lib/api/kolab_api_service_user.php 2013-06-25 13:37:54.989123228 +0200
@@ -125,6 +125,13 @@
{
//console("\$postdata to user_edit()", $postdata);
+ if ($postdata['mailquota-unit'] == 'gb') {
+ $postdata['mailquota'] *= 1024*1024;
+ }
@tpokorra
tpokorra / patchDomainAdmins.patch
Created Jun 25, 2013
domainadmin patch for Kolab trunk
View patchDomainAdmins.patch
diff -uNr kolab-webadmin.orig/lib/api/kolab_api_service_domain_types.php kolab-webadmin/lib/api/kolab_api_service_domain_types.php
--- kolab-webadmin.orig/lib/api/kolab_api_service_domain_types.php 2013-06-18 11:33:48.542736382 +0200
+++ kolab-webadmin/lib/api/kolab_api_service_domain_types.php 2013-06-18 11:34:09.088733566 +0200
@@ -64,6 +64,10 @@
'associateddomain' => array(
'type' => 'list',
),
+ 'domainadmin' => array(
+ 'type' => 'list',
+ 'optional' => 'true',
View konto_check_frontend.php
<?php
function set_var($var)
{
global $$var;
if(isset($_REQUEST[$var]))
$$var=$_REQUEST[$var];
else
$$var="";
}
@tpokorra
tpokorra / kolabrss.php
Last active Dec 18, 2015
this script is used for creating an RSS feed from Typo3 pages, without touching the Typo3 installation
View kolabrss.php
<?php
function getContent(&$contents, $startContentStr, $endContentStr)
{
// if we want the content of an html element, we need to count, eg. the div's
$element = '';
if ($startContentStr[0] == '<' && substr($endContentStr, 0, 2) == '</')
{
$posSpace = strpos($startContentStr, ' ');
You can’t perform that action at this time.