Skip to content

Instantly share code, notes, and snippets.


Matthias Gutjahr mattsches

View GitHub Profile
nzjrs /
Created Jun 3, 2011
Python script to make Skype co-operate with GNOME3 notifications
#!/usr/bin/env python
# Python script to make Skype co-operate with GNOME3 notifications.
# Copyright (c) 2011, John Stowers
# Adapted from
# Copyright (c) 2009, Lightbreeze
Ocramius / User.php
Last active Aug 22, 2022
Doctrine 2 ManyToMany - the correct way
View User.php
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
* @ORM\Entity()
* @ORM\Table(name="user")
class User
kriswallsmith / QSAListener.php
Created Aug 8, 2012
implements QSA on Symfony2 redirects
View QSAListener.php
use JMS\DiExtraBundle\Annotation as DI;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
/** @DI\Service */
class QSAListener
private $blacklist;
lstrojny / app--code--local--Varien--Autoload.php
Created Apr 16, 2013
Replace Magento autoloader with composer based autoloader. Note: you are losing the ability to use the compiler.
View app--code--local--Varien--Autoload.php
* Classes source autoload
class Varien_Autoload
/** @var \Composer\Autoload\ClassLoader */
private static $autoloader;
/** @var self */
# setup: pip install requests beautifulsoup4
from decimal import Decimal
import requests
from bs4 import BeautifulSoup
import sys
import getpass
mathiasverraes / TestFrameworkInATweet.php
Last active May 23, 2022
A unit testing framework in a tweet.
View TestFrameworkInATweet.php
function it($m,$p){echo ($p?'✔︎':'✘')." It $m\n"; if(!$p){$GLOBALS['f']=1;}}function done(){if(@$GLOBALS['f'])die(1);}
dennisfrank /
Created May 23, 2014
Shell script to import a remote database into local environment
# Import a remote database into a local database
# ----------------------------------------------
# Based on
# Don’t forget chmod +x to make the script executable.
# Change the extension to .command to run the script directly from OS X Finder.
shuairan /
Last active Jul 28, 2021 Backend und Frontend auf Uberspace installieren
crittermike / ExampleModuleController.php
Last active Jun 17, 2021
Example of overriding a route controller in Drupal 8
View ExampleModuleController.php
* @file
* Contains \Drupal\example_module\Controller\ExampleModuleController.
// THIS FILE BELONGS AT /example_module/src/Controller/ExampleModuleController.php
namespace Drupal\example_module\Controller;
View starfield.php
use UI\App;
use UI\Window;
use UI\Point;
use UI\Size;
use UI\Area;
use UI\Controls\Box;
use UI\Draw\Pen;
use UI\Draw\Brush;
use UI\Draw\Path;