Skip to content

Instantly share code, notes, and snippets.

Avatar

Horia Dragomir hdragomir

View GitHub Profile
@hdragomir
hdragomir / image_resizer.php
Created Sep 2, 2010
on the fly image resizer
View image_resizer.php
<?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
<html>
<head>
<title>prime number checker</title>
<style>
body, input{
font-family: Georgia, serif;
background-color: white;
View isObjectLiteral.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<!-- Online here: http://ejohn.org/files/bugs/isObjectLiteral/ -->
<title>isObjectLiteral</title>
<style>
li { background: green; } li.FAIL { background: red; }
iframe { display: none; }
</style>