Skip to content

Instantly share code, notes, and snippets.

View Takika's full-sized avatar

Sandor Takacs Takika

  • Budapest, Hungary
View GitHub Profile
@Takika
Takika / fixphpextorder.sh
Last active May 3, 2016 10:01
FreeBSD script to reorder php extensions to avoid sig11
#!/bin/sh
EGREP=/usr/bin/egrep
ECHO=/bin/echo
EXTENSIONS_INI=/usr/local/etc/php/extensions.ini
CP=/bin/cp
MV=/bin/mv
HAS_SPL=`$EGREP -c '^extension=spl.so$' $EXTENSIONS_INI`
HAS_SQLITE=`$EGREP -c '^extension=sqlite.so$' $EXTENSIONS_INI`
@Takika
Takika / listing_mode.php
Last active April 20, 2017 20:32
Roundcube default listing mode plugin
<?php
class listing_mode extends rcube_plugin
{
public $task = 'settings';
function init()
{
$this->add_hook('preferences_list', array($this, 'preferences_list_hook'));
$this->add_hook('preferences_save', array($this, 'preferences_save_hook'));
}
@Takika
Takika / debug.log
Created June 6, 2016 14:59
BackendRoundcubeContacts debug
[DEBUG] -------- Start
[ INFO] Version='SVN-trunk-r1981' method='POST' from='5.148.245.184' cmd='FolderSync' getUser='[email protected]' devId='sec1921765021fa7' devType='SAMSUNGGTI'
[DEBUG] Used timezone 'Europe/Budapest'
[DEBUG] Including backend file: '/usr/local/www/data/sync/html/backend/roundcubecontacts/roundcubecontacts.php'
[DEBUG] Request::ProcessHeaders() ASVersion: 12.0
[DEBUG] ZPush::CommandNeedsAuthentication(9): true
[DEBUG] BackendRoundcubeContacts->Login('[email protected]', '', '***')
[DEBUG] BackendRoundcubeContacts->dbConnectContacts()
[DEBUG] BackendRoundcubeContacts->dbConnectAuth()
[DEBUG] BackendRoundcubeContacts->getEncryptedPassword(): '[email protected]'
@Takika
Takika / admin_output.log
Created June 6, 2016 15:01
z-push-admin.php output
Synchronized devices of user: [email protected]
-----------------------------------------------------
DeviceId: sec1921765021fa7
Device type: SAMSUNGGTI
UserAgent: SAMSUNG-GT-I9300/101.403
ActiveSync version: 14.0
First sync: 2016-06-06 16:58
Last sync: never
Total folders: 1
Synchronized folders: 0
@Takika
Takika / roundcubecontacts.php
Created June 6, 2016 15:02
Z-Push Roundcube Contacts backend
<?php
/**
* This backend is for roundcube contacts in MySQL
*
* Based on Zarafa's vcard directory backend
* Roundcube modifications by Alex Charrett.
* TODO: Switch to PDO, clean up SQL injection, import IMAP message code.
* Buggy mobile number detection code is around line 560.
*
* @author Alex Charrett <[email protected]>