Skip to content

Instantly share code, notes, and snippets.

gereon /
Created Jan 8, 2016
Public proof to connect my GitHub account to my keybase identity.

Keybase proof

I hereby claim:

  • I am gereon on github.
  • I am gereon ( on keybase.
  • I have a public key whose fingerprint is 54B0 CA9F E028 B864 65D2 000F EF0F 8E80 0A21 5E60

To claim this, I am signing this object:

gereon /
Last active Aug 29, 2015
Python Decorators II: Decorator Arguments

Python Decorators II: Decorator Arguments

(nicer, more readable version of:

Review: Decorators without Arguments

In part I, I showed how to use decorators without arguments, primarily using classes as decorators because I find them easier to think about.

If we create a decorator without arguments, the function to be decorated is passed to the constructor, and the __call__() method is called whenever the decorated function is invoked:

class decoratorWithoutArguments(object):
gereon / gist:3150445
Created Jul 20, 2012
Mac OSX Spotlight Enhancement
View gist:3150445

Mac OSX Spotlight Enhancement

Add this to Info.plist in /System/Library/Spotlight/RichText.mdimporter/Contents/ and Spotlight will search for source code files.

gereon / gist:3060625
Created Jul 6, 2012
Assetic `less` Configuration and Routing: How It Works
View gist:3060625

Assetic less configuration and Routing: How It Works

In dev you have to make sure that in your security.yml the security checks are disabled for the resource routings:

            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false
gereon / gist:3049717
Created Jul 4, 2012
Symfony 2.1: How to get the Swiftmailer running in combination with /register
View gist:3049717

Insert this into to the bottom of the autoload.php file:

// Swiftmailer needs a special autoloader to allow
// the lazy loading of the init file (which is expensive)
require_once __DIR__.'/../vendor/swiftmailer/lib/classes/Swift.php';
gereon / gist:3049271
Created Jul 4, 2012 — forked from Dattaya/1.
Symfony 2.1: How to integrate assetic less filter with lessphp
View gist:3049271

Symfony2.0.10. How to integrate assetic lessphp filter.

  • Add the following lines of code to the composer.json file:
"leafo/lessphp": "*"
  • Run composer install
gereon / Solving Problems with lessc
Created Oct 22, 2011 — forked from isaacs/
Use one of these techniques to install node and npm and after that leesc.
View Solving Problems with lessc