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
/** | |
* Found on http://www.weirdog.com/blog/php/supprimer-les-accents-des-caracteres-accentues.html | |
*/ | |
function wd_remove_accents($str, $charset='utf-8') { | |
$str = htmlentities($str, ENT_NOQUOTES, $charset); | |
$str = preg_replace('#&([A-za-z])(?:acute|cedil|circ|grave|orn|ring|slash|th|tilde|uml);#', '\1', $str); | |
$str = preg_replace('#&([A-za-z]{2})(?:lig);#', '\1', $str); // pour les ligatures e.g. 'œ' | |
$str = preg_replace('#&[^;]+;#', '', $str); // supprime les autres caractères | |
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
import ast | |
from cStringIO import StringIO | |
import sys | |
INFSTR = '1e308' | |
def interleave(inter, f, seq): | |
seq = iter(seq) | |
try: | |
f(next(seq)) |
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
#!/bin/bash | |
# | |
# Server Status Script | |
# -------------------- | |
# | |
# Install | |
# ------- | |
# | |
# need dependencies : | |
# - bc |
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
// Force EOL to unix : "\n" | |
:set fileformat=unix |
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
#!/bin/sh | |
if [ $( whoami ) != "root" ]; then | |
echo "Ce script doit être exécuter en tant que root." | |
exit 1 | |
fi | |
is_inlist () { | |
OIFS=$IFS | |
IFS=: |
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
set ts=4 | |
set sw=4 | |
set softtabstop=4 | |
set expandtab | |
syn on | |
set syn=php | |
set autoindent | |
set smartindent | |
set showmatch | |
set ruler |
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 | |
/** | |
* Author : Zikko | |
* Source : http://www.zikko.se/resources/extractFromPDF.php | |
* | |
* Usage : | |
* | |
* $path = 'my_pdf_file.pdf'; | |
* $pdf = new pdf( $path ); |
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 | |
/** | |
* @file | |
* Class PdfParser | |
* | |
* @author : Sebastien MALOT <[email protected]> | |
* @date : 2013-08-08 | |
* | |
* References : |
NewerOlder