Skip to content

Instantly share code, notes, and snippets.

View maetl's full-sized avatar

Mark Rickerby maetl

View GitHub Profile
@maetl
maetl / Ode to Auckland
Created May 20, 2009 04:18
By James K. Baxter
Auckland, you great arsehole,
Some things I like about you
Some things I cannot like.
I came to the Art School, carrying the paintings
Of an eighteen-year-old chick.
On the door of one room somebody had written 'life'
But there was death inside it.
A skeleton hung there by a hook in its skull
renaming a repository on github:
- remember to edit the ./git/config file to point to the new path
country:
- iso2:
- iso3:
- name:
- official_name:
- alternative_name:
language:
- iso:
- name:
## installing locales (tested on ubuntu) ##
list current locales installed on system:
$> locale -a
install and compile new locale
$> sudo apt-get install language-pack-es-base
___ ___
___ / /\ / /\
/__/\ / /:/ / /::\
\ \:\ / /:/ / /:/\:\
\__\:\ / /::\ ___ / /::\ \:\
/ /::\ /__/:/\:\ /\ /__/:/\:\ \:\
/ /:/\:\ \__\/ \:\/:/ \ \:\ \:\_\/
/ /:/__\/ \__\::/ \ \:\ \:\
/__/:/ / /:/ \ \:\_\/
\__\/ /__/:/ \ \:\
<?php
$finder = new Finder("translations");
// OR
class TranslationsFinder extends Finder {}
$finder = new TranslationsFinder();
<?php
# Autoload Hooks
Using::models("app.domain.subpackage");
Using::controllers("app.controllers");
Using::templates("app.templates");
# Require from package path
Using::classPath("lib.floe.repository");
mv repository/store/mysql repository/services/mysql
mv repository/store/redis repository/services/redis
mv repository/store/memcached repository/services/memcached
mv repository/store/sqlite repository/services/sqlite
YAML Config
IdentityDispatcher:
- DefaultBinding: action
MysqlConnection:
- Name:
- Pass:
- Database: default
- Host: localhost
<?php
function getRecordWithLocalScope() {
$object = $this->scope->getObject($this->currentQuery);
if (!$object) {
$object = $this->gateway->getObject();
$this->scope->addObject($object);
}
$record = (isset($object->type)) ? $object->type : $this->currentRecordType;
return new $record($object);