Skip to content

Instantly share code, notes, and snippets.

View sime's full-sized avatar
🔒
Trezor

Simon Males sime

🔒
Trezor
View GitHub Profile
@sime
sime / paradigm_startups.txt
Created October 17, 2012 03:26
Paradigm for Startups
Ideas are worthless without execution
Execution is worthless without traction
Traction is worthless without revenue
Revenue is worthless without profit
@sime
sime / AppController.php
Created August 27, 2012 21:58
Basic Auth in CakePHP on json request
class AppController extends Controller
{
public $components = array(
'RequestHandler',
'Auth',
);
public function beforeFilter() {
$this->__setupAuth();
@sime
sime / database.php.pagoda
Created March 22, 2012 04:07
Pagoda Boxfile for CakePHP
<?php
// Source: http://help.pagodabox.com/customer/portal/articles/174049-cakephp#setting-global-server-variables-in-database-php
define("DB_HOST", $_SERVER['DB1_HOST']);
define("DB_NAME", $_SERVER['DB1_NAME']);
define("DB_USER", $_SERVER['DB1_USER']);
define("DB_PASS", $_SERVER['DB1_PASS']);
define("DB_PORT", $_SERVER['DB1_PORT']);
class DATABASE_CONFIG {
@sime
sime / schema.php
Created February 26, 2012 15:01
Possible example of using the CakePHP Schema callback `after` to insert content in the database
<?php
// Possible example of using the CakePHP Schema callback `after`
// to insert content in the database.
// Inspiration: https://github.com/majna/schema
// Copy schema.php to app/Config/Schema
// Run: ./Console/cake schema create
App::uses('ClassRegistry', 'Utility');
class AppSchema extends CakeSchema {
@sime
sime / delete_cookie.js
Created July 15, 2011 02:49
Delete a cookie with JS