Skip to content

Instantly share code, notes, and snippets.

Fabien Arcellier FabienArcellier

  • Octo Technology
  • Paris
Block or report user

Report or block FabienArcellier

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
View check_spa.js
// Check loading of Single Page Application
//
// It checks the count of requests equals the count of response
// of loading of SPA
var page = require('webpage').create();
var system = require('system');
var lastReceived = new Date().getTime();
var requestCount = 0;
@FabienArcellier
FabienArcellier / .htaccess
Created Dec 2, 2012
Disable indexaction or block access to a directory in htaccess file
View .htaccess
# disable directory browsing
Options All -Indexes
# Deny access to this directory for anybody
Order allow,deny
Deny from all
@FabienArcellier
FabienArcellier / install_composer.sh
Created Dec 9, 2012
Install composer on linux machine
View install_composer.sh
sudo curl -s https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin/
@FabienArcellier
FabienArcellier / index.php
Created Dec 9, 2012
Autoload namespace manually from silex
View index.php
<?php
$loader = require_once __DIR__.'/vendor/autoload.php';
$loader -> add('Application', __DIR__); // PSR-0 autoloading, the directory '__DIR__/Application' must exists
$app = new Silex\Application();
$app->run();
?>
@FabienArcellier
FabienArcellier / disable_unc_check.reg
Created Dec 11, 2012
Disable Unc Check in register database
View disable_unc_check.reg
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"DisableUNCCheck"=dword:00000001
View famille.prolog
/* Programme sur les liens familiaux */
pere(paul, jean).
pere(paul, frederic).
pere(emilie, marie).
pere(jean, andre).
pere(jean, cathy).
pere(jean, francis).
pere(frederic, marc).
pere(frederic, lisa).
@FabienArcellier
FabienArcellier / menu.prolog
Created Dec 14, 2012
Create menu with price and calories associate with it
View menu.prolog
entree(salade, 5, 400).
entree(taboulee, 3, 300).
plat(andouillette, 8, 500).
plat(steak, 10, 900).
fromage(bri, 3, 150).
fromage(camembert, 4, 300).
dessert(tarte, 5, 320).
@FabienArcellier
FabienArcellier / findcode.sh
Created Nov 13, 2015
findcode & display code command
View findcode.sh
function findcode {
extension=$1
pattern=$2
find . -name "*.${extension}" | xargs grep -ni --colour=always ${pattern}
}
# Utility
function displaycode {
file=$(echo $1 | cut -f1 -d:)
View list_contains.prolog
% list_contains(5, [1,2]) % Renvoie false
% list_contains(5, [1,5]) % Renvoie true
list_contains(X, [X|_]).
list_contains(X, [_|R]):- list_contains(X, R).
@FabienArcellier
FabienArcellier / fibonacci.prolog
Created Dec 20, 2012
Calculate fibonacci suite
View fibonacci.prolog
fibo(1, Result):- Result is 1.
fibo(2, Result):- Result is 1.
fibo(X, Result):- X > 2, X1 is X - 1, X2 is X - 2, fibo(X1, ResultN1), fibo(X2, ResultN2), Result is ResultN1 + ResultN2.
You can’t perform that action at this time.