Skip to content

Instantly share code, notes, and snippets.

View shama's full-sized avatar
✍️
writing a status message

Kyle Robinson Young shama

✍️
writing a status message
View GitHub Profile
@shama
shama / keyzoom.js
Created February 2, 2012 00:01
jmpress.js zoom in and out with + or -
/**
* Viewport Key Zoom In & Out
* Press + and - to zoom the viewport in and out.
*/
(function() {
'use strict';
$.jmpress("defaults").viewPort.keyZoomAmount = 100;
$.extend(true, $.jmpress('defaults').keyboard.keys, {
187: 'zoomin' // plus
,189: 'zoomout' // minus
@shama
shama / cakeftp_mocks.php
Created October 26, 2011 21:02
Mocking up CakeFTP
/**
* testConnect
*/
public function testConnect() {
// FTP FAILED CONNECT
$this->FtpSource = $this->getMock('FtpSource', array('_ftp'), array($this->defaultConfig));
$callback = create_function('$method,$params', <<<END
if (\$method == "ftp_connect") {
return false;