Skip to content

Instantly share code, notes, and snippets.

View jamiebicknell's full-sized avatar

Jamie Bicknell jamiebicknell

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jamiebicknell on github.
  • I am jamiebicknell (https://keybase.io/jamiebicknell) on keybase.
  • I have a public key whose fingerprint is 8A60 4248 0557 032A D5C9 AD5A 3C23 7568 264E E708

To claim this, I am signing this object:

<?php
function dHash($file, $size = 8)
{
$hash = '';
list($w, $h, $t) = getimagesize($file);
$im = imagecreatetruecolor($size + 1, $size);
imagefilter($im, IMG_FILTER_GRAYSCALE);
switch($t) {
case 1:
@jamiebicknell
jamiebicknell / gist:6070661
Created July 24, 2013 13:38
IP Address Bookmarkelet
javascript:(function(){var a=new XMLHttpRequest();a.open("GET","http://jsonip.appspot.com",true);a.onreadystatechange=function(b){if(a.readyState===4&&a.status===200){var c=JSON.parse(a.responseText);prompt("Your IP Address is:",c.address)}};a.send(null)})();