Skip to content

Instantly share code, notes, and snippets.

View ludofleury's full-sized avatar
🐼
Yay

Ludovic Fleury ludofleury

🐼
Yay
View GitHub Profile
@nfabre
nfabre / Symfony Live Paris.markdown
Last active October 7, 2020 12:27
Slides Symfony Live 2013
# 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"
ZSH_THEME="powerlevel9k/powerlevel9k"
# CASE_SENSITIVE="true"
# HYPHEN_INSENSITIVE="true"
@gyndav
gyndav / .travis.yml
Created April 10, 2012 12:57
Simple Mongo PHP Driver extension installer for Travis CI. Works like a charm for other PECL extensions too.
before_script:
- ./path/to/mongo-php-driver-installer.sh
@ludofleury
ludofleury / A-result.txt
Created January 31, 2012 04:21
PHP get_class vs ReflectionObject vs ReflectionClass
This was a quick & dirty benchmark (for my own needs) to compare the method to get a class name in PHP
-ReflectionObject->getName();
-get_class();
-ReflectionClass->getName();
It was performed on my local machine : MacBookPro with PHP 5.3.6
You will find the result below and the code used for the 3 tests.
ReflectionObject
Memory : 750040
#!/bin/bash
# use newline as separator
IFS=$'\n'
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 }' -
done
@unixmonkey
unixmonkey / Cucumber Plain Text Feature.tmLanguage
Created March 10, 2011 20:15
Cucumber Language definition file for TextMate; modified to work with Sublime Text 2
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>feature</string>
</array>
<key>firstLineMatch</key>
<string>기능|機能|功能|フィーチャ|خاصية|תכונה|Функціонал|Функционалност|Функционал|Особина|Могућност|Özellik|Właściwość|Tính năng|Savybė|Požiadavka|Požadavek|Osobina|Ominaisuus|Omadus|OH HAI|Mogućnost|Mogucnost|Jellemző|Fīča|Funzionalità|Funktionalität|Funkcionalnost|Funkcionalitāte|Funcționalitate|Functionaliteit|Functionalitate|Funcionalitat|Funcionalidade|Fonctionnalité|Fitur|Feature|Egenskap|Egenskab|Crikey|Característica|Arwedd(.*)</string>
class MoneyType extends AbstractType implements DataMapperInterface
{
public function buildForm(FormBuilder $builder, array $options)
{
$builder
->add('amount', 'integer')
->add('currency', 'string')
->setDataMapper($this)
;
}
@GitsMcGee
GitsMcGee / circle.yml
Created December 14, 2014 22:42
CircleCI config for Play 2.3 and Elastic Beanstalk
machine:
environment:
JAVA_TOOL_OPTIONS: '-Dfile.encoding=UTF8 -Duser.timezone=UTC'
_JAVA_OPTIONS: '-Xms512m -Xmx1024m -Xss2m'
java:
version: oraclejdk8
python:
version: 2.7.6
services:
- docker
<?php
namespace Playbloom\Tests;
use Doctrine\DBAL\Driver\PDOMySql\Driver;
class MysqlDriver extends Driver
{
private static $connection;
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Jean-Pierre subscriptions in feedly Cloud</title>
</head>
<body>
<outline text="innovation" title="innovation">
<outline type="rss" text="Pl4n3s world" title="Pl4n3s world" xmlUrl="http://pl4n3.blogspot.com/feeds/posts/default?alt=rss" htmlUrl="http://pl4n3.blogspot.com/"/>
<outline type="rss" text="Mozilla Hacks - the Web developer blog" title="Mozilla Hacks - the Web developer blog" xmlUrl="http://hacks.mozilla.org/feed/" htmlUrl="https://hacks.mozilla.org"/>