Skip to content

Instantly share code, notes, and snippets.

View joonty's full-sized avatar

Jonathan Cairns joonty

View GitHub Profile
@joonty
joonty / context.patch
Created August 14, 2012 08:37
Patch for context get in RDBGP, part of the Komodo Ruby remote debugger tool. Fixes a problem getting non-local variables.
43a44
> processor.logger.debug("Adjusted stack depth: " + stackDepth.to_s)
88c89,93
< val = eval(name, the_binding)
---
> s_name = name.inspect
> if s_name[0] == ":"
> s_name = s_name[1..-1]
> end
> val = eval(s_name, the_binding)
@joonty
joonty / CustomPaginatorHelper.php
Created March 14, 2012 17:04
Custom paginator helper for CakePHP
<?php
App::uses('PaginatorHelper','View/Helper');
class CustomPaginatorHelper extends PaginatorHelper {
public function numbers($options = array()) {
if ($options === true) {
$options = array(
'before' => ' | ', 'after' => ' | ', 'first' => 'first', 'last' => 'last'
);