Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Distributed Composer package registration script
*
* This script registers the given composer module to the local installation registry
* in order to let composer.phar build autoloader files for installed modules.
*
* Usage: php add-package.php <PATH-TO-MODULE-COMPOSER.JSON> <VERSION>
*
@thomascube
thomascube / RegisterCommand.php
Last active August 29, 2015 13:57
Patches and additions for creating a PHP Composer RPM module from source
<?php
/*
* This file is part of Composer.
*
* (c) Thomas Bruederli <bruederli@kolabsys.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@thomascube
thomascube / kolab_webhelp.diff
Last active August 29, 2015 14:03
Kolab web client user guide
diff --git a/_static/default.css b/_static/default.css
index b6f8f62..378107f 100755
--- a/_static/default.css
+++ b/_static/default.css
@@ -26,7 +26,7 @@ body {
div.banner {
margin: 0 0 3px 0;
padding: 10px 0;
- height: 40px;
+ height: 16px;
# replace the values for these placeholders to match your environment
variables = {
'skin': 'kolab',
}
# General information about the project.
project = u'Kolab Groupware Help'
copyright = u'2014, kolab.org'
version = '3.1'
@thomascube
thomascube / git-svn-create-rev-map.php
Created May 13, 2012 16:43
Script to generate a revision mapping table from two SVN and GIT log files
<?php
/**
* This script builds a revision mapping table from two SVN and GIT log files.
* It uses a commit's date and comment to connect SVN revisions with a GIT commits.
*
* Execute it with php git-svn-create-rev-map.php svn.log git.log
*
* @author Thomas Bruederli <thomas(at)roundcube(dot)net>
**/
@thomascube
thomascube / README.md
Last active December 17, 2015 23:59
dcomposer - Install Composer dependencies into a global location

dcomposer

This is simple approach to work-around the missing --global option in Composer. See composer/composer#55

It reads the dependencies from a local composer.json file and installs them into a global location (e.g. /usr/local/lib/composer) and creates a light-weight local Composer installation providing the necessary autoload magic.

@thomascube
thomascube / 0_reuse_code.js
Created June 28, 2017 06:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@thomascube
thomascube / Makefile
Last active October 29, 2017 15:47
Roundcube release scripts
GITREMOTE=git://github.com/roundcube/roundcubemail.git
GITBRANCH=release-1.3
GPGKEY=devs@roundcube.net
VERSION=1.3.2
all: clean complete dependent framework
complete: roundcubemail-git toolchain
cp -RH roundcubemail-git roundcubemail-$(VERSION)
(cd roundcubemail-$(VERSION); cp composer.json-dist composer.json)
@thomascube
thomascube / app.js
Created January 4, 2020 13:53
Automated Docker builds with Google cloud functions
const bent = require('bent');
const httpJSON = bent('json');
const admin = require('firebase-admin');
const DOCKER_BUILD_TRIGGER = 'https://hub.docker.com/api/build/v1/source/<this-is-secret>/trigger/<another-secret>/call/';
const BUILD_TAGS = {
'1.3.x-apache': '7.2-apache',
'1.3.x-fpm': '7.2-fpm',
'1.3.x-fpm-alpine': '7.2-fpm-alpine',
'1.4.x-apache': '7.3-apache',
'1.4.x-fpm': '7.3-fpm',
@thomascube
thomascube / image2grf.php
Created July 11, 2018 08:02
PHP function to convert a PNG image to a .GRF file for use with Zebra printers
<?php
/**
* Converts a PNG image to a .GRF file for use with Zebra printers
*
* The input is preferably a 1-bit black/white image but RGB images
* are accepted as well.
*
* This function uses PHP's GD library image functions.
*