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 dplyKolab16.sh
#!/bin/bash
branch=Kolab16
# we need a fully qualified domain name
hostnamectl set-hostname $branch.demo.example.org
yum install -y wget which bzip2 mailx selinux-policy-targeted
# disable SELinux
sed -i 's/enforcing/permissive/g' /etc/selinux/config
View createkolabusers.py
import pykolab
from pykolab.translate import _
from pykolab import utils
log = pykolab.getLogger('pykolab.cli')
conf = pykolab.getConf()
def run():
from pykolab import wap_client
wap_client.authenticate()
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:
You can’t perform that action at this time.