Skip to content

Instantly share code, notes, and snippets.

View AntoineAugusti's full-sized avatar
🚄
High speed, low carbon

Antoine Augusti AntoineAugusti

🚄
High speed, low carbon
View GitHub Profile
@AntoineAugusti
AntoineAugusti / gist:2854724
Created June 1, 2012 19:47
Classement Elo
<?php
/*
// Classement Elo
// Antoine AUGUSTI - antoine@augusti.fr
*/
//************** CONFIGURATION ****************//
//**********************************************/
// cote initiale de P1
// Keyboard shortcuts
var isG = false;
var peutFaireAction = true;
$(document).ready(function()
{
$("input").focus(function(){
peutFaireAction = false;
});
$("input").mouseover(function(){
SELECT id_user, count(*) FROM teen_quotes_favorite GROUP BY id_user HAVING count(*) BETWEEN 75 AND 100 ORDER BY count(*) DESC
<?php
/* CONFIGURATION */
$host = 'localhost';
$user = 'root';
$password = 'root';
$db_name = 'euromillions';
$time_to_play = 10000;
/* END OF CONFIGURATION */
CREATE TABLE `euromillions` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`nb_1` int(2) NOT NULL,
`nb_2` int(2) NOT NULL,
`nb_3` int(2) NOT NULL,
`nb_4` int(2) NOT NULL,
`nb_5` int(2) NOT NULL,
`star_1` int(2) NOT NULL,
`star_2` int(2) NOT NULL,
<?php
/* CONFIGURATION */
$host = 'localhost';
$user = 'root';
$password = 'root';
$db_name = 'euromillions';
$time_to_play = 10000;
/* END OF CONFIGURATION */
<?php
// N'a rien à voir avec du calcul. Mise en forme.
echo '
<!DOCTYPE html>
<html lang="fr">
<head>
<title>Antoine Augusti</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;"/>
<meta name="description" content="Antoine Augusti : développement web, actualité technologique et projets en tout genres."/>
var nb_tests, nb_decoupes_intervalle, nb_valeurs, partie_entiere, i, j, compteur : Entier
var valeur, partie_decimale, borne_inf, borne_sup, valeur_theorique, pourcentage_ecart : Réel
var tab, densite : Tableau [1...nb_valeurs] de Réel
// Les informations de base
nb_tests <- SQRT(2) // SQRT = square root (racine carrée)
nb_decoupes_intervalle <- 10
nb_valeurs <- 1000
pour i <- 1 à nb_valeurs faire
@AntoineAugusti
AntoineAugusti / gist:4287238
Created December 14, 2012 17:43
Rebuild virusmails directory
mkdir /var/lib/amavis/virusmails/
chmod 750 /var/lib/amavis/virusmails/
chown amavis /var/lib/amavis/virusmails/
@AntoineAugusti
AntoineAugusti / gist:4287255
Created December 14, 2012 17:46
Inodes in a directory
find . -type f | cut -d "/" -f 2 | sort | uniq -c | sort -n