Skip to content

Instantly share code, notes, and snippets.

View philsturgeon's full-sized avatar
🌳
Planting Trees

Phil Sturgeon philsturgeon

🌳
Planting Trees
View GitHub Profile
@philsturgeon
philsturgeon / gist:497631
Created July 29, 2010 08:38
Controller_Api
<?php defined('SYSPATH') or die('No direct script access.');
class Controller_Api extends Controller {
/**
* Handle a response from an api
*/
public function response($status = 'success', $data = array())
{
$data = array_merge(array('status' => $status), $data);

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@ircmaxell
ircmaxell / sturgeon_compat.php
Last active December 27, 2015 18:39
Sturgeon Compat
<?php
if (!function_exists('philsturgeon_said_so')) {
function philsturgeon_said_so($what) {
return 0 !== preg_match('(FIG|PSR|Pyro|Cider|doing it wrong)i', $what);
}
}