A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
| <?php | |
| namespace Your\Package\ViewHelpers; | |
| /* * | |
| * This script belongs to the TYPO3 Flow package "Your.Package". * | |
| * * | |
| * It is free software; you can redistribute it and/or modify it under * | |
| * the terms of the GNU Lesser General Public License, either version 3 * | |
| * of the License, or (at your option) any later version. * | |
| * * |
| /** | |
| * This casper scipt checks for 404 internal links for a given root url. | |
| * | |
| * Usage: | |
| * | |
| * $ casperjs 404checker.js http://mysite.tld/ | |
| * $ casperjs 404checker.js http://mysite.tld/ --max-depth=42 | |
| */ | |
| /*global URI*/ |
| <?php | |
| class Namespace_Module_Model_Observer_FormatPrice | |
| { | |
| public function formatPrice(Varien_Event_Observer $observer) | |
| { | |
| $event = $observer->getEvent(); | |
| $options = $event->getCurrencyOptions(); | |
| /** |
| #!/bin/sh | |
| if [ ! "$1" -o ! "$2" ] | |
| then | |
| echo "Usage: $ ./watch.sh [directory] [php script]" | |
| exit | |
| fi | |
| echo "Started watching \"$1\" for \"$2\"" | |
| DIR="$( cd "$( dirname "$0" )" && pwd )" |
| // firefox | |
| document.addEventListener( 'visibilitychange', function ( event ) { | |
| if ( document.hidden === false ) { | |
| lastTime = performance.now(); | |
| } |
| <?php | |
| /** | |
| * This will replicate attribute values of configurable products to all it's child products. | |
| * | |
| * Rationale: After upgrading Magento 1.4 to 1.7 we found that our filtered navigation was | |
| * missing quite alot of products. Turns out somewhere after 1.4 Varien changed the filtered | |
| * navigation to only use the attributes of child products, ignoring the attributes of | |
| * their configurable products. | |
| * |
| <?php | |
| // Access a property with no restrictions | |
| function stole($object,$property){ | |
| $dict = (array)$object; | |
| $class = get_class($object); | |
| return isset($dict[$property])? | |
| $dict[$property]:(isset($dict["\0*\0$property"])? | |
| $dict["\0*\0$property"]:(isset($dict["\0$class\0$property"])? | |
| $dict["\0$class\0$property"]:null)); |
| #!/usr/bin/env bash | |
| # fresh-chrome | |
| # | |
| # Use this script on OS X to launch a new instance of Google Chrome | |
| # with its own empty cache, cookies, and user configuration. | |
| # | |
| # The first time you run this script, it will launch a new Google | |
| # Chrome instance with a permanent user-data directory, which you can | |
| # customize below. Perform any initial setup you want to keep on every |
| delimiter ;; | |
| drop procedure if exists build_catalog;; | |
| create procedure build_catalog(IN categories INT, IN products INT) | |
| begin | |
| SET @category_count = 1; | |
| SET @CATNAMEPREFIX = "Category "; | |
| SET @CATURLKEYPREFIX = "cat-"; | |
| SET @CATURLPATHPREFIX = "catpath-"; | |
| SET @ROOTCATEGORY = 2; | |
| SET @INCLUDEINMENU = 1; |