Skip to content

Instantly share code, notes, and snippets.

View jonathankowalski's full-sized avatar

Jonathan Kowalski jonathankowalski

  • Le Pradet
View GitHub Profile

Keybase proof

I hereby claim:

  • I am jonathankowalski on github.
  • I am jonatkowalski (https://keybase.io/jonatkowalski) on keybase.
  • I have a public key ASDeKiEQAxBQ4o1N8e7bsBrwKLQYH22zPVCG8J8c5mPA6go

To claim this, I am signing this object:

<?php
$j=$a=1;
echo '<ul>';
do{
$a = $a << 1;
$i = ($a-$j)%2;
$class = empty($i)?'e':'o';
echo '<li class="'.$class.'">'.$j.'</li>';
$j++;
} while($j<=10);
<?php
function getContentForPdf($htmlText){
//le pdf ne reconnait que les tags p et page, plante sinon :(
$pdfText = strip_tags($htmlText, '<p>');
return '<page>'.$pdfText.'</page>';
}
<?php
//balise de code php ouvrante
/**
* Classe de commentaire
*/
class Commentaire {
//Variables privées
private $var;
<?php
/**
* Ce voyageur ailé, comme il est gauche et veule!
* Lui, naguère si beau, qu'il est comique et laid!
* L'un agace son bec avec un brûle-gueule,
* L'autre mime, en boitant, l'infirme qui volait!
**/
$albatros = 0x2A;
<?php
try{
$path = $this->standardInclude( $classname );
$this->cacheManager->addPath( $classname, $path );
} catch ( NotStandardInclude $e ){
if( $this->autoloadInDir( $classname ) ){
return $this->autoload( $classname );
}
}
@jonathankowalski
jonathankowalski / gist:2959447
Created June 20, 2012 11:31
Douglas Crockford Object.create
if (typeof Object.create !== 'function') {
Object.create = function (o) {
function F() {}
F.prototype = o;
return new F();
};
}