Skip to content

Instantly share code, notes, and snippets.

Vincent Jousse vjousse

Block or report user

Report or block vjousse

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
vjousse /
Created Feb 20, 2018 — forked from kissgyorgy/
Python: py.test fixture for SQLAlchemy test in a transaction, create tables only once!
from sqlalchemy import create_engine
from sqlalchemy.orm import Session
from myapp.models import BaseModel
import pytest
def engine():
return create_engine('postgresql://localhost/test_database)

Keybase proof

I hereby claim:

  • I am vjousse on github.
  • I am vjousse ( on keybase.
  • I have a public key ASBJmFsbYUzduOMMeVx61F3Dw1gjGcQM8ejgI01Tl3ZUuQo

To claim this, I am signing this object:

vjousse /
Created Sep 11, 2013
Simple django command to output django_redirect redirections to nginx format
from import BaseCommand, CommandError
from django.contrib.redirects.models import Redirect
class Command(BaseCommand):
help = 'Print nginx redirections'
def handle(self, *args, **options):
for redirect in Redirect.objects.all():
self.stdout.write('rewrite ^%s$ %s permanent;' % (redirect.old_path, redirect.new_path))
View git-conventions.markdown
View sf2cli.php
// change this with the actual path you cloned sf2 to
$sf2_path = '~/symfony/src';
use Symfony\Foundation\ClassLoader;
use Symfony\Components\Console\Application;
require_once $sf2_path.'/Symfony/Foundation/ClassLoader.php';
You can’t perform that action at this time.