of jacob oehler morrison
search
Fork Me on GitHub

jQuery limitWords Plugin

This plugin allows you to place a limit on the number of words a user may enter into a form input. If they paste in more than the limit, it trims the value to the number of words set by the limit option. While typing, it stops allowing input after the limit has been reached. An optional element (leftSelector) can be used to show a countdown with the number of words left.

This project is located on Github.

Release History

  • [06/19/2010] Initial release

CakePHP SmartMirror Behavior

This CakePHP behavior allows you to track the changes of one model and mirror them onto one or many other models. Several options are available to make sure this doesn't slow down the end-user's experience. This project is located on Github.

Background

I am currently using this behavior to mirror part of a very complicated database on my organization's intranet to some less complicated databases on our remote server. The connection time to the remote server is considerable and I don't want to have to connect to the remote database after every change to the local database. Smart mirror can either track each individual save/create/delete or you can set it up to periodically compare your primary model with each of its mirrored models. Both require some sort cron script in place.

Notes

This project has not been tested very thoroughly. Soon I will have detailed installation instructions. For now, take a look at the current code on its Github page. If you attempt to install the behavior, be sure to maintain up-to-date backups of your data until you have determined that the behavior is working properly on your setup.

Release History

  • [12/13/2009] Initial release

CakePHP Prowl Component

This component allows your controllers to send Prowl notifications to your iPhone or iPod Touch. This is a modified version of Fenrick's ProwlPHP. This project is located on Github.

Installation

  1. Download prowl.php from the master of the Git project or Git clone it.
  2. Place prowl.php in your app's controllers/components directory
  3. Modify your app's config/bootstrap.php with the following configuration settings: <?php Configure::write('Prowl.apikey', ''); Configure::write('Prowl.providerkey', ''); // optional for whitelisted programs Configure::write('Prowl.application', ''); // name of application Configure::write('Prowl.priority', ''); // priority of message (-2 to 2) Configure::write('Prowl.event', ''); // name of event Configure::write('Prowl.logError', false); // (optional ability to log errors) Configure::write('Prowl.verify', false); // (optional ability to verify upon initialization) ?>
  4. Either in the controller you want to use the component in or your app_controller.php file, add "Prowl" to your components array. <?php class AppController extends Controller { var $components = array('Prowl'); // ... } ?>
  5. Use the following code in your controller to send a message to the Prowl service. <?php $this->Prowl->push('short message you would like pushed'); // or you can override almost all the options set in bootstrap.php $this->Prowl->push(array('description' => 'short message you would like pushed', 'application' => 'SpecialApp')); ?>

Release History