Skip to content

Instantly share code, notes, and snippets.

View jjanvier's full-sized avatar

Julien Janvier jjanvier

View GitHub Profile
@nidup
nidup / gist:9485426
Created March 11, 2014 13:18
Download Crowdin translations + create PR
<?php
$app
->get('/crowdin/pull', function (Request $request) use ($app) {
$responses = array();
$config = $app['config']['crowdin']['download'];
$app['crowdin']->api('export')->execute();
if (!is_dir($config['base_dir'])) {
@norberttech
norberttech / selenium-travis.yml
Last active December 28, 2015 02:39
Symfony2 Behat Selenium at travis. Remeber to change domain "example.com"
language: php
php:
- 5.3
- 5.4
- 5.5
before_install:
- sudo apt-get update > /dev/null
@docteurklein
docteurklein / Collaborator.php
Created August 16, 2014 19:55
a phpspec extension to ease usage of Iterators
<?php
namespace PhpSpec\Iterator;
use PhpSpec\Wrapper\Collaborator as Base;
use Prophecy\Prophecy\ObjectProphecy;
use Prophecy\Promise\ReturnPromise;
class Collaborator extends Base
{
anonymous
anonymous / main.js
Created November 25, 2013 10:17
reload sf2 wdt on ajax request
$(document).ajaxComplete(function(event, XMLHttpRequest){
var token = XMLHttpRequest.getResponseHeader('x-debug-token'),
protocol = window.location.protocol,
hostname = window.location.hostname;
if(token) {
$.get(protocol+'//'+hostname+'/_wdt/'+token, function(data){
@potix2
potix2 / gist:3339485
Created August 13, 2012 11:01
ApacheBenchでJSONをPOSTする
% ab -n 10 -c 10 -p json.file -T "application/json; charset=utf-8" http://localhost/
@sroccaserra
sroccaserra / LApresMidiDuDDD.md
Last active September 25, 2018 19:37
Mes notes brutes sur l'après-midi du DDD
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@joanrieu
joanrieu / DDD.md
Created May 12, 2017 11:16
Notes d'une formation DDD donnée par Cyril Martraire
title author date
DDD
Cyrille Martraire
10 et 11 Avril 2017

Introduction

DDD se situe du côté de XP. Bien comprendre le métier : transformer le savoir en code.

@pizzavomito
pizzavomito / CsvReader.php
Last active May 4, 2021 04:45
Reading CSV file with SplFileObject. Define a header or manage the header line from CSV file. Returns rows in arrays with header values as array keys.
<?php
/**
* MIT License
*
* Copyright (c) 2017 Pascal Roux
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
@sroccaserra
sroccaserra / 2017-06-20_Alistair_in_the_hexagone.md
Last active July 21, 2021 08:17
Alistair in the 'hexagone'