Skip to content

Instantly share code, notes, and snippets.

@noginn
noginn / array_map.php
Created December 28, 2012 10:31
Using array_map with array_keys
<?php
$headers = array(
'X-PAYPAL-APPLICATION-ID' => 'APP-1234567890',
'X-PAYPAL-REQUEST-DATA-FORMAT' => 'NV',
'X-PAYPAL-RESPONSE-DATA-FORMAT' => 'NV'
);
$headerStrings = array_map(function ($key, $value) {
return $key . ': ' . $value;
@noginn
noginn / gist:193881
Created September 25, 2009 22:20
Some config tweaks for QuakeLive to make enemies more visible. A lazy #dailygist
We couldn’t find that file to show.
@noginn
noginn / Capfile
Created September 24, 2009 21:09
A Capistrano deployment recipe for Zend Framework applications
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
load 'application/configs/deploy'
@noginn
noginn / FormSubmitAnonymous.php
Created September 23, 2009 19:04
The standard FormSubmit view helper will always output with a name attribute, so I created another helper to output "anonymous" submit buttons. This is also the first #dailygist, where I aim to post a useful gist on Twitter each day for no reason other th
<?php
/**
* Helper to generate a "submit" button without a name attribute
*
* @category Noginn
* @package Noginn_View
* @subpackage Helper
*/
class Noginn_View_Helper_FormSubmitAnonymous extends Zend_View_Helper_FormElement
@noginn
noginn / gist:170266
Created August 19, 2009 09:49
ErnestMarples.com API consumer function
<?php
/**
* This file contains a simple function for consuming the ErnestMarples.com postcode
* geocoding API (http://ernestmarples.com/). The original function was written
* by Stuart Harrison, I just adapted it to not rely on file_get_contents.
*
* @author Tom Graham (adapted from Stuart Harrison's function)
* @link http://www.pezholio.co.uk/2009/07/ernest-marples-php-helper-function/
*/
<?php
/**
* @package Whitewashing
*
*/
class Whitewashing_Controller_Helper_Container extends Zend_Controller_Action_Helper_Abstract
{
/**
* @var Yadif_Container
*/
Testing
Another test
This is a test updated
<?php
/**
* Sends a file for download
*
* @category Noginn
* @copyright Copyright (c) 2009 Tom Graham (http://www.noginn.com)
* @license http://www.opensource.org/licenses/mit-license.php
*/
class Noginn_Controller_Action_Helper_SendFile extends Zend_Controller_Action_Helper_Abstract