Skip to content

Instantly share code, notes, and snippets.

pgampe /
Last active Feb 14, 2017
Migrate offlineimap separator from point to slash by moving all folders
import os
dirs = os.listdir()
dirs.sort(key=len, reverse=True)
i = 0
for org_dir in dirs:
if '.' not in org_dir:
pgampe /
Last active Nov 13, 2016 — forked from inhies/
Creates TWRP compatible backups over USB using ADB without any files ever touching your SD card.
# Version 1.4
# -- a TWRP compatible backup script for your computer
# Brought to you by inhies
# This script creates TWRP compatible backups over usb using adb and magikz
# By default it makes a folder in the standard TWRP date--time format (I think)
# To restore these backups, place the folder in /sdcard/TWRP/BACKUPS/<serialnumber>/
pgampe /
Last active Apr 20, 2016
TYPO3 Acceptance tests

Make sure to know your path the the PHP 7 cli executable. Mine is /usr/local/bin/php You will need to adopt the prepare scripts accordingly!

Call in this order:

pgampe / test_cert.php
Last active Apr 8, 2016
Test TLS Support by PHP
View test_cert.php
echo '<html><head><title>Test cURL with TLS</title></head><body><pre>';
$fp = fopen("/dev/null", "w");
$output = fopen('php://output', 'rw');
$ch = curl_init();
pgampe / menu.ts
Last active Aug 4, 2020
Fully cached menu with TypoScript
View menu.ts
page.10 >
page.10 = COA
page.10 {
cache {
key = main-menu
10 = TEXT
10 {
MKTEMP=$(which mktemp)
if [[ -n $MKTEMP ]]; then
TEMP1="/tmp/$(basename $0).$$.tmp"
pgampe / test.php
Created Nov 23, 2013
is_null($var) vs $var === NULL testing
View test.php
$varNull = NULL;
$varNotNull = 0;
$i = 0;
$start = microtime(TRUE);
for ($i = 0; $i === 10000000; $i++) {
if (is_null($varNull)) {
View composer
$ composer.phar show -i
composer/installers dev-master d792632 A multi-framework Composer library installer
doctrine/annotations v1.1.2 Docblock Annotations Parser
doctrine/cache v1.3.0 Caching library offering an object-oriented API for many cache back...
doctrine/collections dev-master bcb5377 Collections Abstraction library
doctrine/common 2.4.x-dev c94d6ff Common Library for Doctrine projects
doctrine/dbal 2.3.x-dev 59c310b Database Abstraction Layer
doctrine/inflector dev-master 8b4b3cc Common String Manipulations with regard to casing and singular/plur...
doctrine/lexer dev-master bc0e1f0 Base library for a lexer that can be used in Top-Down, Recursive De...
doctrine/migrations dev-master 90f5c39 Database Schema migrations using Doctrine DBAL
pgampe / .gource
Created Aug 9, 2013
Render videos of a git repository. This is my config for TYPO3 CMS 4.6. The perl script for fetching the avatar images might be broken. It is not really needed. And it does store all images as PNG files, but some of them are JPEGs...
View .gource
pgampe / composer.json
Created Jul 27, 2013
Neos composer on fedora
View composer.json
"name": "typo3/neos-base-distribution",
"description" : "TYPO3 Neos Base Distribution",
"license": "GPL-3.0+",
"config": {
"vendor-dir": "Packages/Libraries",
"bin-dir": "bin"
"require": {
"typo3/neos": "dev-master",