This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# disable directory browsing | |
Options All -Indexes | |
# Deny access to this directory for anybody | |
Order allow,deny | |
Deny from all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo curl -s https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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(); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\Software\Microsoft\Command Processor] | |
"DisableUNCCheck"=dword:00000001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function findcode { | |
extension=$1 | |
pattern=$2 | |
find . -name "*.${extension}" | xargs grep -ni --colour=always ${pattern} | |
} | |
# Utility | |
function displaycode { | |
file=$(echo $1 | cut -f1 -d:) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% 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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
OlderNewer