Skip to content

Instantly share code, notes, and snippets.

View althaus's full-sized avatar
🏠
Working from home

Matthias Althaus althaus

🏠
Working from home
View GitHub Profile
@althaus
althaus / t3_export.gip
Last active October 27, 2015 15:59
T³ export and import formats
<VERSION>
<TOURNAMENT NAME>
<TOURNAMENT ID>
<NUMBER OF PLAYERS>
<USER ID>||<FIRSTNAME>||<LASTNAME>||<NICKNAME>||<FACTION>||<CITY>||<TEAM NAME>||<ARMYLIST STATE>||<ARMYLIST RATING>||<PAID>||<NTR RANKING>||x
@althaus
althaus / datetimepicker.js
Created March 9, 2015 11:13
Init datetimepicker
if (scope.is('body') && locale != 'en') {
$.fn.datetimepicker.defaults.locale = locale;
}
/* Bind datetimepicker */
var currentLocaleData = moment.localeData();
$('.picker-datetime', scope).datetimepicker({
format: currentLocaleData.longDateFormat('L') + ' ' + currentLocaleData.longDateFormat('LT'),
stepping: 5
});
#! /bin/bash
#
# Install Munin plugin for PHP APC (Alternative PHP Cache)
#
# Required : Debian/Ubuntu, Munin-node > 1.4.0, Apc, Apache, some time
#
# You need to be root
#
# Inspired by http://kevin.deldycke.com/2011/07/php-apc-debian-squeeze-munin-monitoring/
# Reference : http://munin-php-apc.googlecode.com
@althaus
althaus / gist:6129562
Last active December 3, 2021 18:22
Array of Bundesländer
$laender = array(
'BW' => 'Baden-Württemberg',
'BY' => 'Bayern',
'BE' => 'Berlin',
'BB' => 'Brandenburg',
'HB' => 'Bremen',
'HH' => 'Hamburg',
'HE' => 'Hessen',
'MV' => 'Mecklenburg-Vorpommern',
'NI' => 'Niedersachsen',
@althaus
althaus / CacheClearCommand.php
Created April 5, 2013 15:32
Extend the base cache clear command adding a little sleep to prevent issus on Windows with "Access denied" on the cache directories.
<?php
namespace Althaus\ExtrasBundle\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand as BaseCommand;
class CacheClearCommand extends BaseCommand
{
/**