##Given Apache 2 and MySQL are already installed.
#Update MacPorts sudo port selfupdate;sudo port -u upgrade outdated
#Install PHP 5.4.* sudo port install php54 php54-apache2handler ##Activate Apache Module cd /opt/local/apache2/modules
| <?php | |
| App::import('Core', array('Media', 'HttpSocket')); | |
| class UploadSocket extends HttpSocket { | |
| /** | |
| * upload function | |
| * allows posting of multipart form data (aka file uploads) | |
| * |
| <?php | |
| /* ----- snip (omitting everything already in config/bootstrap/action.php) ----- */ | |
| /** | |
| * Filter to capture any admin-specific requests | |
| * This simply updates the internal action name for dispatching purposes. In order for this to | |
| * properly work across the board, you'll need to enable a persistent param for `admin` in your | |
| * routes configuration. Something to the effect of the following will do nicely: | |
| * |
| #!/bin/bash | |
| # USAGE: /path/to/chrometest <localfile.html> | |
| /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \ | |
| --disable-web-security \ | |
| --allow-file-access-from-files \ | |
| --allow-file-access \ | |
| --log-level 3 \ | |
| $@ |
| Our root, | |
| who art in Unix, | |
| hallowed be thy shell. | |
| Thy kernel come. | |
| Thy commands be run | |
| @localhost as they are in iNet. | |
| Give us this day our daily updates, | |
| And forgive us for our four-oh-threes, | |
| as we forgive those who 403 against us. | |
| And lead us not into segfaults, |
| <?php | |
| /** | |
| * Behavior to enhance CakePHP ContainableBehavior by respecting default Model order | |
| * | |
| * Makes ContainableBehavior respect Model::order when no other order is specified in | |
| * the containment. Must be placed before ContainableBehavior in the actsAs array of | |
| * the Model being queried, like so: | |
| * | |
| * var $actsAs = array('OrderedContainable', 'Containable'); | |
| * |
| <?php | |
| /** | |
| * Super-simple AWS CloudFront Invalidation Script | |
| * | |
| * Steps: | |
| * 1. Set your AWS access_key | |
| * 2. Set your AWS secret_key | |
| * 3. Set your CloudFront Distribution ID | |
| * 4. Define the batch of paths to invalidate | |
| * 5. Run it on the command-line with: php cf-invalidate.php |
##Given Apache 2 and MySQL are already installed.
#Update MacPorts sudo port selfupdate;sudo port -u upgrade outdated
#Install PHP 5.4.* sudo port install php54 php54-apache2handler ##Activate Apache Module cd /opt/local/apache2/modules
| This playbook has been removed as it is now very outdated. |
| /* | |
| Given a date, tzAbbr returns a short, friendly name for the | |
| user's time zone on that date, or an empty string if their | |
| client's Intl support is missing or incomplete. | |
| For example, a user in New York might see: | |
| tzAbbr(new Date()) // => "EST" | |
| Time zones are locale-dependent. Users traveling outside of |
| <?xml version="1.0"?> | |
| <layout> | |
| <default> | |
| <!--Root/Default Layouts--> | |
| <reference name="root"> | |
| <!--Appending Block--> | |
| <block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/> | |
| </reference> | |
| <!--CSS and JS Files--> |