Skip to content

Instantly share code, notes, and snippets.


Ludovic Fleury ludofleury

View GitHub Profile
View gist:1078d527f9eb747667e2b0751186e20c
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH:/Users/ludo/Library/Python/3.7/bin
# Path to your oh-my-zsh installation.
export ZSH="/Users/ludo/.oh-my-zsh"
0xjac /
Last active Dec 5, 2020
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)
    git clone --bare
# use newline as separator
for author in $(git log --all --format='%cN' | sort -u); do
echo $author;
git log --all --author="$author" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "++ %s\n-- %s\n= %s\n", add, subs, loc }' -
View MoneyType.php
class MoneyType extends AbstractType implements DataMapperInterface
public function buildForm(FormBuilder $builder, array $options)
->add('amount', 'integer')
->add('currency', 'string')
GitsMcGee / circle.yml
Created Dec 14, 2014
CircleCI config for Play 2.3 and Elastic Beanstalk
View circle.yml
JAVA_TOOL_OPTIONS: '-Dfile.encoding=UTF8 -Duser.timezone=UTC'
_JAVA_OPTIONS: '-Xms512m -Xmx1024m -Xss2m'
version: oraclejdk8
version: 2.7.6
- docker
View OPML des feeds feedly
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<title>Jean-Pierre subscriptions in feedly Cloud</title>
<outline text="innovation" title="innovation">
<outline type="rss" text="Pl4n3s world" title="Pl4n3s world" xmlUrl="" htmlUrl=""/>
<outline type="rss" text="Mozilla Hacks - the Web developer blog" title="Mozilla Hacks - the Web developer blog" xmlUrl="" htmlUrl=""/>
View single-connection-driver.php
namespace Playbloom\Tests;
use Doctrine\DBAL\Driver\PDOMySql\Driver;
class MysqlDriver extends Driver
private static $connection;
nfabre / Symfony Live Paris.markdown
Last active Oct 7, 2020
Slides Symfony Live 2013
View Symfony Live Paris.markdown
ludofleury / MysqlContext.php
Last active Mar 20, 2020
A Behat Context with a hook to kill the Mysql connections
View MysqlContext.php
use Behat\Symfony2Extension\Context\KernelAwareInterface;
use Behat\Symfony2Extension\Context\KernelDictionary;
use Behat\MinkExtension\Context\MinkContext;
class MysqlContext extends MinkContext implements KernelAwareInterface
use KernelDictionary;
piscisaureus /
Created Aug 13, 2012
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url =

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

You can’t perform that action at this time.