Skip to content

Instantly share code, notes, and snippets.

Gereon Sommer gereon

  • Zürich
Block or report user

Report or block gereon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gereon
gereon / keybase.md
Created Jan 8, 2016
Public proof to connect my GitHub account to my keybase identity.
View keybase.md

Keybase proof

I hereby claim:

  • I am gereon on github.
  • I am gereon (https://keybase.io/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
gereon / python_decorators.md
Last active Aug 29, 2015
Python Decorators II: Decorator Arguments
View python_decorators.md

Python Decorators II: Decorator Arguments

(nicer, more readable version of: http://www.artima.com/weblogs/viewpost.jsp?thread=240845)

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
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.

<string>public.c-header</string>
<string>public.c-plus-plus-header</string>
<string>public.c-source</string>
<string>public.objective-c-source</string>
<string>public.c-plus-plus-source</string>
@gereon
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:

    firewalls:
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false
@gereon
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';
Swift::registerAutoload(__DIR__.'/../vendor/swiftmailer/lib/swift_init.php');
@gereon
gereon / gist:3049271
Created Jul 4, 2012 — forked from Dattaya/1. README.md
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
gereon / Solving Problems with lessc
Created Oct 22, 2011 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm and after that leesc.
View Solving Problems with lessc
https://github.com/cloudhead/less.js/issues/320
You can’t perform that action at this time.