This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parameters: | |
auth.adapter.entityName: Application_Model_User | |
auth.adapter.identityField: email | |
auth.adapter.credentialField: password | |
services: | |
auth.adapter: | |
class: LoSo_Zend_Auth_Adapter_Doctrine2 | |
arguments: [@em, %auth.adapter.entityName%, %auth.adapter.identityField%, %auth.adapter.credentialField%] | |
auth: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Just for everyone's information, if you want to run purely utf8, don't forget the following: | |
httpd.conf: | |
AddCharset UTF-8 .utf8 | |
AddDefaultCharset UTF-8 | |
php.ini | |
default_charset = "utf-8" | |
my.cnf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(E_STRICT | E_ALL); | |
class ImmutableValueObject extends \ArrayObject | |
{ | |
public function __construct(array $data = array(), $flags = \ArrayObject::ARRAY_AS_PROPS) | |
{ | |
parent::__construct($data, $flags); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// HOWTO: load LABjs itself dynamically! | |
// inline this code in your page to load LABjs itself dynamically, if you're so inclined. | |
(function (global, oDOC, handler) { | |
var head = oDOC.head || oDOC.getElementsByTagName("head"); | |
function LABjsLoaded() { | |
// do cool stuff with $LAB here | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Grab latest ubuntu 10.10 64bit canonical ami from alestic - http://alestic.com/ | |
Create new ec2 instance + add ebs volume (/dev/sdf) + elastic ip | |
# update hostname + /etc/host | |
sudo hostname fe1-us.dustinwhittle.net | |
# add user account + configure keys in sshd_config + add ssh key |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_once 'Zend/Application/Resource/ResourceAbstract.php'; | |
/** | |
* TODO: short description. | |
* | |
* TODO: long description. | |
* | |
*/ | |
class My_Resource_Database extends Zend_Application_Resource_ResourceAbstract | |
{ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Requires node v0.1.100 or a browser with console | |
function newShape(x, y) { | |
return { | |
toString: function () { | |
return 'Shape at ' + x + ', ' + y; | |
} | |
}; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Scraping Made Easy with jQuery and SelectorGadget | |
// (http://blog.dtrejo.com/scraping-made-easy-with-jquery-and-selectorga) | |
// by David Trejo | |
// | |
// Install node.js and npm: | |
// http://joyeur.com/2010/12/10/installing-node-and-npm/ | |
// Then run | |
// npm install jsdom jquery http-agent | |
// node numresults.js | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<createTable tableName="contact"> | |
<column name="id" type="bigint"> | |
<constraints primaryKey="true" | |
nullable="false" | |
autoIncrement="true"/> | |
</column> | |
<column name="first_name" type="varchar(50)" /> | |
<column name="middle_initial" type="varchar(5)" /> | |
<column name="last_name" type="varchar(50)" /> | |
<column name="gender" type="varchar(50)" /> |
OlderNewer