Skip to content

Instantly share code, notes, and snippets.


Horia Dragomir hdragomir

View GitHub Profile
hdragomir / image_resizer.php
Created Sep 2, 2010
on the fly image resizer
View image_resizer.php
define('cache', realpath('./cacheddata/icons/'));
$h = 28;
$w = 28;
$iurl = &$_GET['i'];
$file = cache . DIRECTORY_SEPARATOR . sha1("$w/$h/$iurl").'.jpg';
header("Content-type: image/jpeg");
View prime-checker.html
<title>prime number checker</title>
body, input{
font-family: Georgia, serif;
background-color: white;
View isObjectLiteral.html
<!DOCTYPE html>
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<!-- Online here: -->
li { background: green; } li.FAIL { background: red; }
iframe { display: none; }