Text
Tips for (unit)testing mail functionality w/ #zf @AdrianSchneider's here: http://bit.ly/czITqv and @akrabat's here: http://bit.ly/9jIRMH
Text
RT @weierophinney: Some #php 5.3 discoveries and gotchas: http://short.ie/php53primer /corrected link!
Text
If getting started with Apache solr, remember to read up on the difference between the 'DisMax' and 'Standard' search request handlers
Text

I have been hacking away in bash a little bit lately and it's remarkable how such a simple set of utilities can allow you to perform quite complex tasks.

I had an array of files that I wanted to do some operations on and the following construct allowed me to easily iterate through that list.

FILES=( a/path/to/a/file1 a/path/to/another/file2 and/so/on/and/so/on )
  
  for ELEMENT in $(seq 0 $((${#FILES[@]} - 1))); do
    echo ${FILES[$ELEMENT]}
  done 

The $(seq 0 $(($#FILES[@]} - 1))); returns the number of elements in FILE, the seq command produces a sequence of numbers from x to y. If you call seq 0 4, you will get a line with 0, 1, 2, 3, 4 on it.

So while the syntax is a little smelly, the terse power of it, is quite handy.

Text
Handy way to read a file in line by line in bash: exec 3< myfile; while read <&3; do echo $REPLY; done; exec <&3-;
Text
RT @royganor: "Installing Eclipse PDT" http://bit.ly/cZmnC4 >> nice series of posts by @senf
Text
Writing unit tests is like running 10 miles. You don't always like it much at the time, but you're almost always better off for it.
Text
Rather than mocking your #ZF Db class, it's worth looking at Zend_Test_DbAdapter and its bff Zend_Test_DbStatement. Docs are scarce though.
Text
FUSE is sweet: sshfs name@server:/path/to/folder /path/to/mount/point
Text
Setting your Mac OSX system hostname from the commandline: sudo scutil --set HostName myhostname.local
Text
Awesome website for command line lovers: http://bit.ly/ayThir
Text
RT @chrisgrice: oh wow - (from http://bit.ly/al8kM5) save a file you edited in vim without the needed permissions: :w !sudo tee %
Text

Part of any good developer's toolkit, is a set of tools to aid the creation of a 'staging' or 'test' site that mirrors the production environment as closely as possible.

Often, you will want to change some details, baseurls, use test payment or shipping account details.

Generally this is pretty easy to script up in bash, python or even plain php. However magento encrypts some of the data it stores in core_config_data.

The following is the approach I use to update data in core_config_data  in an encrypted format magento will accept:

<?php
  require_once 'app/Mage.php';
  umask(0);
  $app = Mage::app('default');
  $data = $_SERVER['argv'][1];
  $obj = Mage::getModel('core/encryption');
  $helper = Mage::helper('core');
  $obj->setHelper($helper);
  echo $obj->encrypt($data);
  
Text
Anyone with Snow Leopard and an MS external keyboard/mouse would be well advised to install intelli(type|point) 7.1 - kernel panics gone!
Text
RT @mraible: My TSSJS 2010 Presentations and Summary: http://bit.ly/9mt1Iv #tssjs