I hereby claim:
- I am sweeney on github.
- I am martinsweeney (https://keybase.io/martinsweeney) on keybase.
- I have a public key ASCfTbxs8eNU7QlX1zFUPH0qhC68WBVmtTldLWMEUpZ0owo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<?php | |
/** | |
* SplClassLoader implementation that implements the technical interoperability | |
* standards for PHP 5.3 namespaces and class names. | |
* | |
* http://groups.google.com/group/php-standards/web/final-proposal | |
* | |
* // Example which loads classes for the Doctrine Common package in the | |
* // Doctrine\Common namespace. |
// | |
// CLLocation_GeohashExtensions.m | |
// geohash | |
// | |
// Created by Jonathan Wight on 10/28/10. | |
// Copyright 2010 toxicsoftware.com. All rights reserved. | |
// | |
#import "CLLocation_GeohashExtensions.h" |
<?php | |
if($enable_graphite) | |
{ | |
$fp = @fsockopen('127.0.0.1', 2003, $errno, $errstr, 1); | |
if($fp) | |
{ | |
$out = array(); |
<?php | |
$tubeLines = array( | |
'bakerloo' => array ( | |
'short' => 'B', | |
'long' => 'BAK', | |
'color' => 'b06010', | |
'stops' => array( | |
'BST' => 'Baker Street', | |
'CHX' => 'Charing Cross', | |
'ERB' => 'Edgware Road (Bakerloo)', |
<?php | |
function TagColour($name){ | |
$colours = array('red', 'blue', 'green', 'black', 'brown', 'cyan', 'gold', 'yellow', 'grey', 'gray', 'indigo', 'lime', 'navy', 'yellow', 'orange'); | |
if(in_array(strtolower($name), $colours)){ | |
return strtolower($name); | |
} | |
$hex = substr(md5($name), 1, 6); | |
$intensity = (HexIntensity($hex) / 255) * 100; | |
$i=0; | |
while(($intensity > 70) && ($i<10)){ |
<? | |
Class Rest { | |
public $Gets; | |
public $Posts; | |
public $Url; | |
public $return; | |
public $responseHeader; | |
public $info; | |
public $Headers; |
<?php | |
$url = "YOUR_DOPPLR_FEED_URL"; //Available from http://www.dopplr.com/account - "Atom feed of all your trips" | |
//------- | |
$old = array('xmlns=', 'gml:', 'georss:', 'gd:'); //super hack for lack of proper namespace support | |
$new = array('ns=', 'gml-', 'georss-', 'gd-'); | |
$xml = new SimpleXMLElement(str_replace($old, $new, file_get_contents($url))); |
<? | |
//There we go, that's better now | |
$countries = array(); | |
$countries[1] = array( | |
'code' => 1, | |
'name' => "Canada (+1)" ); | |
$countries[2] = array( | |
'code' => 86, | |
'name' => "China (+86)" ); |