Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Matthias Althaus althaus

🏠
Working from home
View GitHub Profile
@althaus
althaus / t3_export.gip
Last active Oct 27, 2015
T³ export and import formats
View t3_export.gip
<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
View datetimepicker.js
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
});
View install-apc-munin-plugin.sh
#! /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 Dec 20, 2015
Array of Bundesländer
View gist:6129562
$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 Apr 5, 2013
Extend the base cache clear command adding a little sleep to prevent issus on Windows with "Access denied" on the cache directories.
View CacheClearCommand.php
<?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
{
/**