Skip to content

Instantly share code, notes, and snippets.

View jdecool's full-sized avatar

Jérémy DECOOL jdecool

View GitHub Profile
@jdecool
jdecool / sudoku-solver.coffee
Last active December 24, 2015 20:09
A try in CoffeeScript this weekend : Sudoku solver
class Board
constructor: (@size = 9) ->
@grid = []
init: ->
@grid = []
for x in [0 .. @size - 1]
@grid.push([])
@jdecool
jdecool / Silex Skeleton installation
Last active August 29, 2015 13:56
Silex Skeleton installation
#!/usr/bin/env php
<?php
define('ARG_NAME', 1);
define('ARG_VERSION', 2);
define('ARG_DESTINATION', 3);
installSkeleton($argv);
@jdecool
jdecool / pre-commit
Created July 15, 2014 09:45
Standard PHP Git pre-commit
#!/bin/sh
PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"`
STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php`
# Determine if a file list is passed
if [ "$#" -eq 1 ]
then
oIFS=$IFS
IFS='
<?php
namespace tests;
class BattleTest extends \PHPUnit_Framework_TestCase
{
public function testMethods()
{
$this->assertEquals('1', 1); // true
$this->assertLessThan('1', 0); // true
@jdecool
jdecool / Dockerfile
Created August 13, 2014 12:59
Draft of a Dockerfile to run Behat test
FROM debian:wheezy
MAINTAINER Jérémy DECOOL <contact@jdecool.fr>
# Upgrade system
RUN apt-get update
RUN apt-get install build-essential vim htop curl unzip wget -y
# Java
RUN apt-get install openjdk-7-jre -y
@jdecool
jdecool / clover.xml
Created August 16, 2014 06:39
Atoum code coverage - clover file
<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="1407360405" clover="53e29d9514264">
<project timestamp="1407360405" name="atoum code coverage">
<package name="atoumCodeCoverage">
<file name="BaseEntityWithFileManager.php" path="/home/jdecool/Workspace/NovawayFileManagementBundle/Manager/BaseEntityWithFileManager.php">
<line num="55" type="stmt" complexity="0" count="1" falsecount="0" truecount="0" signature="" testduration="0" testsuccess="0"/>
<line num="56" type="stmt" complexity="0" count="1" falsecount="0" truecount="0" signature="" testduration="0" testsuccess="0"/>
<line num="59" type="stmt" complexity="0" count="1" falsecount="0" truecount="0" signature="" testduration="0" testsuccess="0"/>
<line num="60" type="stmt" complexity="0" count="1" falsecount="0" truecount="0" signature="" testduration="0" testsuccess="0"/>
<line num="62" type="stmt" complexity="0" count="1" falsecount="0" truecount="0" signature="" testduration="0" testsuccess="
@jdecool
jdecool / behat-installer.sh
Last active August 29, 2015 14:11
behat-installer.sh
#!/usr/bin/env php
<?php
// Crapy script to install and configure Behat in my PHP project
// Usage : curl -sS http://url/to/file | sh
$dockerRepo = 'https://github.com/jdecool/dockerfiles.git';
$dependencies = [
'behat/behat' => '~3.0',
'behat/mink' => '~1.6',
@jdecool
jdecool / .gitignore
Created March 12, 2015 10:59
Global gitignore
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@jdecool
jdecool / composer.json
Last active August 29, 2015 14:18
ImageWorkshop issue #71 sample code
{
"require": {
"sybio/image-workshop": "~2.0",
"codeguy/upload": "~1.3"
}
}
@jdecool
jdecool / keybase.md
Created June 1, 2015 20:45
keybase.md

Keybase proof

I hereby claim:

  • I am jdecool on github.
  • I am jdecool (https://keybase.io/jdecool) on keybase.
  • I have a public key whose fingerprint is 45B7 9B01 B4A3 AC06 AB74 FCC0 067B 170F 8624 CEDA

To claim this, I am signing this object: