Skip to content

Instantly share code, notes, and snippets.

View immutef's full-sized avatar

immutef

  • SCAYLE GmbH
  • Hamburg, Germany
View GitHub Profile
@klange
klange / _.md
Last active December 23, 2024 14:40
It's a résumé, as a readable and compilable C source file. Since Hacker News got here, this has been updated to be most of my actual résumé. This isn't a serious document, just a concept to annoy people who talk about recruiting and the formats they accept résumés in. It's also relatively representative of my coding style.

Since this is on Hacker News and reddit...

  • No, I don't distribute my résumé like this. A friend of mine made a joke about me being the kind of person who would do this, so I did (the link on that page was added later). My actual résumé is a good bit crazier.
  • I apologize for the use of _t in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I am the system libraries".
  • Since people kept complaining, I've fixed the assignments of string literals to non-const char *s.
  • My use of type * name, however, is entirely intentional.
  • If you're using an older compiler, you might have trouble with the anonymous unions and the designated initializers - I think gcc 4.4 requires some extra braces to get them working together. Anything reasonably recent should work fine. Clang and gcc (newer than 4.4, at le
@havvg
havvg / monolog.yml
Last active October 10, 2015 21:58
Monolog handler configuration
monolog:
handlers:
log_everything:
type: fingers_crossed
action_level: critical
handler: grouped
channels: [!frontend, !deprecation]
grouped:
type: group
@kriswallsmith
kriswallsmith / QSAListener.php
Created August 8, 2012 18:23
implements QSA on Symfony2 redirects
<?php
use JMS\DiExtraBundle\Annotation as DI;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
/** @DI\Service */
class QSAListener
{
private $blacklist;
@beberlei
beberlei / TxController.php
Created August 6, 2012 09:44
Transactional Service Proxy
<?php
class TxController extends Controller
{
public function context($id)
{
return new TxProxy($this->get($id), $this->get('doctrine.orm.default_entity_manager'));
}
}
@havvg
havvg / MongoDBStorage.php
Created July 7, 2012 12:35
CraueFormFlowBundle MongoDBStorage
<?php
namespace Ormigo\Bundle\OrmigoBundle\Form\Storage;
use Craue\FormFlowBundle\Storage\StorageInterface;
/**
* This storage is implemented against native MongoDB.
*
* The benefit from this is the separated persistent of the form flow data from the session.
@mathieue
mathieue / reverse.es
Created June 29, 2012 09:11
Simple apache read only reverse proxy on elasticsearch
<VirtualHost *:80>
ServerName es.yourhost.com
<Proxy balancer://main>
BalancerMember http://127.0.0.1:9200 max=1 retry=5
<Limit GET >
order deny,allow
deny from all
allow from 127.0.0.1
@uppfinnarjohnny
uppfinnarjohnny / container.py
Created April 14, 2012 16:59
Simple DI Container for Python, inspired by Pimple (http://pimple.sensiolabs.org/)
class Container(dict):
def __init__(self, *args, **kwargs):
super(Container, self).__init__(*args, **kwargs)
self._shared = set()
self._instances = {}
def __getitem__(self, key):
if key in self._instances:
return self._instances[key]
@immutef
immutef / composer
Created February 21, 2012 17:16
global Composer installation
#!/usr/bin/env sh
COMPOSER=$HOME/.composer.phar
if [ ! -f $COMPOSER ]
then
wget -q -nv -nc -O $COMPOSER http://getcomposer.org/composer.phar
fi
/usr/bin/env php $COMPOSER $@
@qrush
qrush / Inconsolata-dz-Powerline.otf
Created January 11, 2012 16:50
vim-powerline patched fonts
@immutef
immutef / bootstrap.php
Created December 20, 2011 14:43
re-use of Composer ClassLoader (e.g. for tests)
<?php
$loader = require __DIR__.'/../vendor/.composer/autoload.php';
$loader->add('Acme', __DIR__);