This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function set_var($var) | |
{ | |
global $$var; | |
if(isset($_REQUEST[$var])) | |
$$var=$_REQUEST[$var]; | |
else | |
$$var=""; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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, ' '); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
eval `ssh-agent` | |
ssh-add ~/.ssh/id_rsa | |
cd ~/osc/home:tpokorra:branches:Kolab:Development | |
TODAY=`date +%Y%m%d` | |
YESTERDAY=`date -d '1 day ago' +%Y%m%d` | |
#YESTERDAY=20140611 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- Mode: Python; tab-width: 4 -*- | |
# | |
# Cyrus Imapd Skiplist db recovery tool | |
# | |
# Copyright (C) 2004-2006 Gianluigi Tiesi <sherpya@netfarm.it> | |
# Copyright (C) 2004-2006 NetFarm S.r.l. [http://www.netfarm.it] | |
# Copyright (C) 2013 TBits.net (http://www.tbits.net) | |
# | |
# This program is free software; you can redistribute it and/or modify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$hosted_domain = isset($argv[1])?$argv[1]:""; | |
$ldappassword = isset($argv[2])?$argv[2]:""; | |
$hosted_domain_root_dn="dc=".implode(",dc=",explode(".", $hosted_domain)); | |
# Do we have all infos to continue? | |
if($hosted_domain=="" || $hosted_domain_root_dn=="" || $ldappassword == "") { | |
die("Usage: ".$argv[0]." <hosted domain> <ldappasswd>\n". | |
"e.g. ".$argv[0]." kolab.example.org secret\n"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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"` |
NewerOlder