Skip to content

Instantly share code, notes, and snippets.

@gereon
gereon / Solving Problems with lessc
Created October 22, 2011 11:47 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm and after that leesc.
https://github.com/cloudhead/less.js/issues/320
@gereon
gereon / gist:3049271
Created July 4, 2012 20:04 — forked from Dattaya/1. README.md
Symfony 2.1: How to integrate assetic less filter with lessphp

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 / gist:3049717
Created July 4, 2012 21:52
Symfony 2.1: How to get the Swiftmailer running in combination with /register

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:3060625
Created July 6, 2012 14:53
Assetic `less` Configuration and Routing: How It Works

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:3150445
Created July 20, 2012 12:20
Mac OSX Spotlight Enhancement

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>
public.c-plus-plus-source
@gereon
gereon / python_decorators.md
Last active August 29, 2015 14:20
Python Decorators II: Decorator Arguments

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 / keybase.md
Created January 8, 2016 14:35
Public proof to connect my GitHub account to my keybase identity.

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: