Skip to content

Instantly share code, notes, and snippets.

<?php
public static function getStatesByCountryCode($countryCode, $include_empty = true) {
if (empty($countryCode)) {
return false;
}
$countryCode = strtoupper($countryCode);
$states = array(
'US' => array(
@vlemaire
vlemaire / install-osx.md
Created December 13, 2012 13:35
Install OS X

Installation OS X

Installation

(*) disponible sur l'AppStore

Base

  • Installation système via clé USB et Lion Disk Maker
  • Réglage des préférences système
#!/bin/bash
SYMFREPO="git://github.com/vjousse/symfony-1.4.git"
DBUSER="root"
DBPASS=""
VENDOR_DIR="lib/vendor/symfony"
if [ -z "$1" ]; then
echo usage: $0 project name
@vlemaire
vlemaire / xhprof.rb
Created February 5, 2011 21:23
Homebrew Formula for xhprof
require 'formula'
class Xhprof <Formula
url 'http://pecl.php.net/get/xhprof-0.9.2.tgz'
homepage 'http://pecl.php.net/package/xhprof'
md5 'ae40b153d157e6369a32e2c1a59a61ec'
depends_on 'pcre'
def install