Skip to content

Instantly share code, notes, and snippets.

<?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"

Running redis using upstart on Ubuntu

I've been trying to understand how to setup systems from the ground up on Ubuntu. I just installed redis onto the box and here's how I did it and some things to look out for.

To install:

<?php
if($enable_graphite)
{
$fp = @fsockopen('127.0.0.1', 2003, $errno, $errstr, 1);
if($fp)
{
$out = array();
<?
//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)" );