Skip to content

Instantly share code, notes, and snippets.

*Directions to Kincaid’s*
60 Bay View Place
Burlingame, CA 94010
From the South:
Take Highway 101 North
Take the Anza Blvd. exit
Turn right onto Airport Blvd.
Turn left onto Bay View Place
me: hey another win for Scan this month: our latest invoice from our lawyers was only $65
Ben: aaah nice!
me: lowest one ever
Ben: that must have been like one of the lawyers had a dream and we were in it, so he charged 65
... checks invoice on Dropbox ...
@kirkouimet
kirkouimet / aspect-ratio-rounded.php
Created November 15, 2011 07:01
aspectRatioRounded
public static function aspectRatioRounded($a, $b) {
$total = $a + $b;
for($i = 1; $i <= 40; $i++) {
$arx = $i * 1.0 * $a / $total;
$brx = $i * 1.0 * $b / $total;
if($i == 40 || (
abs($arx - round($arx)) <= 0.02 &&
abs($brx - round($brx)) <= 0.02)) {
# Accept aspect ratios within a given tolerance
return round($arx).'x'.round($brx);
<html>
<head>
<style>
@-webkit-keyframes struck {
0% { -webkit-transform: translateX(10px); }
50% { -webkit-transform: translateX(0); }
100% { -webkit-transform: translateX(10px); }