<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1931489360431959261</id><updated>2010-06-22T14:07:08.493-07:00</updated><title type='text'>The Pragmatic Technophobe</title><subtitle type='html'>Practical Approaches to Software Development.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.aphexcreations.net/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default'/><link rel='alternate' type='text/html' href='http://blog.aphexcreations.net/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Brendon</name><uri>http://www.blogger.com/profile/17253776647489907462</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>19</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1931489360431959261.post-7741887658589744556</id><published>2009-11-28T21:25:00.006-08:00</published><updated>2009-11-28T21:27:51.236-08:00</updated><title type='text'>DrupalORM: As a programmatic ORM interface to nodes and their CCK fields</title><content type='html'>I have recently put up an initial development version of DrupalORM. This provides a nice OOP-like ORM interface to Drupal nodes. It can handle basic CRUD operations as well as handling recursive nodereference nodes.&lt;br /&gt;&lt;br /&gt;The project is located at &lt;a href="http://drupal.org/project/orm/"&gt;http://drupal.org/project/orm/&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1931489360431959261-7741887658589744556?l=blog.aphexcreations.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.aphexcreations.net/feeds/7741887658589744556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1931489360431959261&amp;postID=7741887658589744556' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/7741887658589744556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/7741887658589744556'/><link rel='alternate' type='text/html' href='http://blog.aphexcreations.net/2009/11/drupalorm-as-programmatic-orm-interface.html' title='DrupalORM: As a programmatic ORM interface to nodes and their CCK fields'/><author><name>Brendon</name><uri>http://www.blogger.com/profile/17253776647489907462</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04839470412706495604'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1931489360431959261.post-7840907934575405706</id><published>2009-11-26T01:22:00.000-08:00</published><updated>2009-11-26T01:24:20.319-08:00</updated><title type='text'>Fixing Weak Wireless on Asus EEE PC With Ubuntu 9.10</title><content type='html'>As a quick google search will show, the wireless signal on the Asus EEE PC for Ubuntu 9.10 is pretty terrible. I found this little trick to work quite well. (Perform at your own risk)&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ sudo apt-get install linux-backports-modules-wireless-karmic-generic&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1931489360431959261-7840907934575405706?l=blog.aphexcreations.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.aphexcreations.net/feeds/7840907934575405706/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1931489360431959261&amp;postID=7840907934575405706' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/7840907934575405706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/7840907934575405706'/><link rel='alternate' type='text/html' href='http://blog.aphexcreations.net/2009/11/fixing-weak-wireless-on-asus-eee-pc.html' title='Fixing Weak Wireless on Asus EEE PC With Ubuntu 9.10'/><author><name>Brendon</name><uri>http://www.blogger.com/profile/17253776647489907462</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04839470412706495604'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1931489360431959261.post-2555564405892075743</id><published>2009-08-17T23:03:00.000-07:00</published><updated>2009-08-17T23:07:27.962-07:00</updated><title type='text'>Write to HFSPlus Formatted iPod From Linux (Ubuntu)</title><content type='html'>If you have an ipod which was formatted in iTunes for OSX, it will most likely be formatted with the HFSPlus filesystem with journalling enabled. Ubuntu, by default can write to HFSPlus, but only if journalling is disabled. To write to your iPod, you will need to issue the following command from within the terminal in OSX...&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;diskutil disableJournal /Volumes/NAME-OF-IPOD&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1931489360431959261-2555564405892075743?l=blog.aphexcreations.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.aphexcreations.net/feeds/2555564405892075743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1931489360431959261&amp;postID=2555564405892075743' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/2555564405892075743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/2555564405892075743'/><link rel='alternate' type='text/html' href='http://blog.aphexcreations.net/2009/08/write-to-hfsplus-formatted-ipod-from.html' title='Write to HFSPlus Formatted iPod From Linux (Ubuntu)'/><author><name>Brendon</name><uri>http://www.blogger.com/profile/17253776647489907462</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04839470412706495604'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1931489360431959261.post-5302731414515655571</id><published>2009-08-03T13:34:00.000-07:00</published><updated>2009-08-03T13:36:18.760-07:00</updated><title type='text'>Enabling Memory Profiling for xDebug 2</title><content type='html'>XDebug has not had memory profiling for the last couple of years. I am not sure why it was taken out, but it was. The APD memory profiling seems for the last year or so to be completely broken, so that is no good as well.&lt;br /&gt;&lt;br /&gt;There is a patch over at http://xdebug.org/archives/xdebug-general/1228.html which works perfectly if you want memory profiling in xdebug.&lt;br /&gt;&lt;br /&gt;Have fun.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1931489360431959261-5302731414515655571?l=blog.aphexcreations.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.aphexcreations.net/feeds/5302731414515655571/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1931489360431959261&amp;postID=5302731414515655571' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/5302731414515655571'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/5302731414515655571'/><link rel='alternate' type='text/html' href='http://blog.aphexcreations.net/2009/08/enabling-memory-profiling-for-xdebug-2.html' title='Enabling Memory Profiling for xDebug 2'/><author><name>Brendon</name><uri>http://www.blogger.com/profile/17253776647489907462</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04839470412706495604'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1931489360431959261.post-1628692472154326303</id><published>2009-07-31T19:08:00.000-07:00</published><updated>2009-07-31T19:28:13.605-07:00</updated><title type='text'>Using GnuCash With Bank of the West</title><content type='html'>This is not a tutorial for how to setup GnuCash. There is plenty of documentation out there for that. This, however will give you the settings you need to integrate GnuCash with Bankofthewest etimebanker service. This assumes you live in the USA. Have fun.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;* AqBanking Wizard&lt;br /&gt;&lt;br /&gt;  * Users &gt; General...&lt;br /&gt;&lt;br /&gt;    * User Name: (your name)&lt;br /&gt;&lt;br /&gt;    * User ID: (your etimebanker id)&lt;br /&gt;&lt;br /&gt;    * Customer ID: (your etimebanker id)&lt;br /&gt;&lt;br /&gt;    * Country: United States of America&lt;br /&gt;&lt;br /&gt;    * Bank ID: (your bank routing code, found at bottom of your check)&lt;br /&gt;&lt;br /&gt;  * Users &gt; OFX...&lt;br /&gt;&lt;br /&gt;    * FID: "5809"&lt;br /&gt;&lt;br /&gt;    * ORG: "BancWest Corp"&lt;br /&gt;&lt;br /&gt;    * Server URL: "https://olbp.bankofthewest.com/ofx0002/ofx_isapi.dll"&lt;br /&gt;&lt;br /&gt;    * Server Options&lt;br /&gt;&lt;br /&gt;      * Supports account list download&lt;br /&gt;&lt;br /&gt;      * Supoorts statement download&lt;br /&gt;&lt;br /&gt;      * Force SSLv3&lt;br /&gt;&lt;br /&gt;    * Expert Settings...&lt;br /&gt;&lt;br /&gt;      * APPID: "QWIN"&lt;br /&gt;&lt;br /&gt;      * APPVER: "1800"&lt;br /&gt;&lt;br /&gt;    * Header Version: "102"&lt;br /&gt;&lt;br /&gt;  * Accounts &gt; General...&lt;br /&gt;&lt;br /&gt;    * Account Settings&lt;br /&gt;&lt;br /&gt;      * Name: "DIRECT CHOICE CHECKING" or "SAVINGS INTEGRATED - PERSONAL"&lt;br /&gt;&lt;br /&gt;      * Number: (your account number)&lt;br /&gt;&lt;br /&gt;      * IBAN: (blank)&lt;br /&gt;&lt;br /&gt;      * Owner Name: (your name)&lt;br /&gt;&lt;br /&gt;      * Type: "CHECKING" or "SAVINGS"&lt;br /&gt;&lt;br /&gt;    * Available Users...&lt;br /&gt;&lt;br /&gt;      * All users of this backend&lt;br /&gt;&lt;br /&gt;      * Add user&lt;br /&gt;&lt;br /&gt;    * Bank Settings&lt;br /&gt;&lt;br /&gt;      * Code: (bank routing code)&lt;br /&gt;   &lt;br /&gt;      * BIC: (blank)&lt;br /&gt;&lt;br /&gt;      * Name: "Bank of the West"&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1931489360431959261-1628692472154326303?l=blog.aphexcreations.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.aphexcreations.net/feeds/1628692472154326303/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1931489360431959261&amp;postID=1628692472154326303' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/1628692472154326303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/1628692472154326303'/><link rel='alternate' type='text/html' href='http://blog.aphexcreations.net/2009/07/using-gnucash-with-bank-of-west.html' title='Using GnuCash With Bank of the West'/><author><name>Brendon</name><uri>http://www.blogger.com/profile/17253776647489907462</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04839470412706495604'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1931489360431959261.post-5114661715064884839</id><published>2009-07-15T01:52:00.000-07:00</published><updated>2009-07-15T01:54:52.637-07:00</updated><title type='text'>Enabling Flash Sound, Firefox 3.5, Ubuntu Jaunty</title><content type='html'>This worked for me... Might not work for everyone...&lt;br /&gt;&lt;br /&gt;1) Uninstall all PulseAudio packages&lt;br /&gt;&lt;br /&gt;2) Ensure that ALSA is installed&lt;br /&gt;&lt;br /&gt;3) Uninstall any flash packages&lt;br /&gt;&lt;br /&gt;4) Install mozilla-mplayer package&lt;br /&gt;&lt;br /&gt;5) Install package "flahplugin-installer"&lt;br /&gt;&lt;br /&gt;6) Restart firefox if it was open&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1931489360431959261-5114661715064884839?l=blog.aphexcreations.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.aphexcreations.net/feeds/5114661715064884839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1931489360431959261&amp;postID=5114661715064884839' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/5114661715064884839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/5114661715064884839'/><link rel='alternate' type='text/html' href='http://blog.aphexcreations.net/2009/07/enabling-flash-sound-firefox-35-ubuntu.html' title='Enabling Flash Sound, Firefox 3.5, Ubuntu Jaunty'/><author><name>Brendon</name><uri>http://www.blogger.com/profile/17253776647489907462</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04839470412706495604'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1931489360431959261.post-3170346630710811302</id><published>2009-05-13T01:43:00.000-07:00</published><updated>2009-05-13T01:44:27.016-07:00</updated><title type='text'>RIP Venkman</title><content type='html'>Well, now that I have discovered that Firebug Alpha has "Break on Next Function Call", I have no need for Venkman anymore. Venkman has served me well for many years, but now it's time is up.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1931489360431959261-3170346630710811302?l=blog.aphexcreations.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.aphexcreations.net/feeds/3170346630710811302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1931489360431959261&amp;postID=3170346630710811302' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/3170346630710811302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/3170346630710811302'/><link rel='alternate' type='text/html' href='http://blog.aphexcreations.net/2009/05/rip-venkman.html' title='RIP Venkman'/><author><name>Brendon</name><uri>http://www.blogger.com/profile/17253776647489907462</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04839470412706495604'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1931489360431959261.post-2498613072842189044</id><published>2009-04-16T13:26:00.000-07:00</published><updated>2009-04-17T11:10:20.507-07:00</updated><title type='text'>Theming the Drupal 6 User Login Form</title><content type='html'>There are a great deal of articles out there on theming the Drupal User Login Form, but most don't give you granular control over each individual form element. Rather, you are restricted to mainly editing the css. Here is a way to have complete granular control over each element within the user login form...&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1. Place this function either in a module or in your template.php:&lt;/strong&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;function get_user_login_form() {&lt;br /&gt;  $form_id = 'user_login';&lt;br /&gt;  $form = array();&lt;br /&gt;  $form['name'] = array(&lt;br /&gt;    '#type' =&amp;gt; 'textfield',&lt;br /&gt;    '#maxlength' =&amp;gt; USERNAME_MAX_LENGTH,&lt;br /&gt;    '#required' =&amp;gt; TRUE,&lt;br /&gt;    '#attributes' =&amp;gt; array('tabindex' =&amp;gt; '1'),&lt;br /&gt;  );&lt;br /&gt;  $form['pass'] = array(&lt;br /&gt;    '#type' =&amp;gt; 'password',&lt;br /&gt;    '#required' =&amp;gt; TRUE,&lt;br /&gt;    '#attributes' =&amp;gt; array('tabindex' =&amp;gt; '2'),&lt;br /&gt;  );&lt;br /&gt;  $form['submit'] = array(&lt;br /&gt;    '#type' =&amp;gt; 'submit',&lt;br /&gt;    '#value' =&amp;gt; t('Log in'),&lt;br /&gt;    '#weight' =&amp;gt; 2,&lt;br /&gt;    '#attributes' =&amp;gt; array('tabindex' =&amp;gt; '3')&lt;br /&gt;  );&lt;br /&gt;  $form['#validate'] = user_login_default_validators();&lt;br /&gt;  $form['#build_id'] = sprintf('form-%s', md5(uniqid(mt_rand(), TRUE)));&lt;br /&gt;  $form_state = array();&lt;br /&gt;  drupal_prepare_form($form_id, $form, $form_state);&lt;br /&gt;  drupal_process_form($form_id, $form, $form_state);&lt;br /&gt;  $out = new stdClass;&lt;br /&gt;  $out-&gt;form_start =&lt;br /&gt;    sprintf("&amp;lt;form method='post' accept-charset='UTF-8' action='%s'&amp;gt;",&lt;br /&gt;    url('user/login'));&lt;br /&gt;  $out-&gt;form_end = "&amp;lt/form&amp;gt;";&lt;br /&gt;  $out-&gt;name = drupal_render($form['name']);&lt;br /&gt;  $out-&gt;pass = drupal_render($form['pass']);&lt;br /&gt;  $out-&gt;submit =&lt;br /&gt;    drupal_render($form['form_id']) .&lt;br /&gt;    drupal_render($form['form_build_id']) .&lt;br /&gt;    drupal_render($form['submit']);&lt;br /&gt;  return $out;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. In your .tpl.php file, output the fields&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;  $login_form = get_user_login_form(); &lt;br /&gt;?&amp;gt;&lt;br /&gt;&amp;lt;?php print $login_form-&gt;form_start; ?&amp;gt;&lt;br /&gt;  Username: &amp;lt;?php print $login_form-&gt;name; ?&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;  Password: &amp;lt;?php print $login_form-&gt;pass; ?&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;  &amp;lt;?php print $login_form-&gt;submit; ?&amp;gt;&lt;br /&gt;&amp;lt;?php print $login_form-&gt;form_end; ?&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1931489360431959261-2498613072842189044?l=blog.aphexcreations.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.aphexcreations.net/feeds/2498613072842189044/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1931489360431959261&amp;postID=2498613072842189044' title='15 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/2498613072842189044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/2498613072842189044'/><link rel='alternate' type='text/html' href='http://blog.aphexcreations.net/2009/04/theming-drupal-user-login-form.html' title='Theming the Drupal 6 User Login Form'/><author><name>Brendon</name><uri>http://www.blogger.com/profile/17253776647489907462</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04839470412706495604'/></author><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1931489360431959261.post-6462384041354219693</id><published>2008-07-11T13:58:00.000-07:00</published><updated>2008-07-11T14:00:38.589-07:00</updated><title type='text'>Drupy: Drupal in Python</title><content type='html'>" Drupy is a Python port of the Drupal content management system, which until now was only available in PHP."&lt;br /&gt;&lt;br /&gt;This is a great project, filling a big need. Check it out.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://drupy.net"&gt;The Drupy Project&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1931489360431959261-6462384041354219693?l=blog.aphexcreations.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.aphexcreations.net/feeds/6462384041354219693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1931489360431959261&amp;postID=6462384041354219693' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/6462384041354219693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/6462384041354219693'/><link rel='alternate' type='text/html' href='http://blog.aphexcreations.net/2008/07/drupy-drupal-in-python.html' title='Drupy: Drupal in Python'/><author><name>Brendon</name><uri>http://www.blogger.com/profile/17253776647489907462</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04839470412706495604'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1931489360431959261.post-7526323797311170349</id><published>2008-05-22T03:55:00.000-07:00</published><updated>2008-06-26T10:50:26.725-07:00</updated><title type='text'>Remembering Previous Shell Commands</title><content type='html'>Here is an easy way to re-run your last shell command which contained a certain word. Mind you, this command can be dangerous if you search on the wrong word.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:red;"&gt;Update:&lt;/span&gt; As a commentor has pointed out, in Bash, you cn simply use Ctrl-R. Genious!&lt;br /&gt;&lt;br /&gt;&lt;pre style="color:green; text-decoration:line-through;"&gt;#&lt;br /&gt;# Run last bash shell command containing a certain word.&lt;br /&gt;#&lt;br /&gt;&lt;br /&gt;`grep SOMEWORD ~/.bash_history | tail -n1 -`&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1931489360431959261-7526323797311170349?l=blog.aphexcreations.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.aphexcreations.net/feeds/7526323797311170349/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1931489360431959261&amp;postID=7526323797311170349' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/7526323797311170349'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/7526323797311170349'/><link rel='alternate' type='text/html' href='http://blog.aphexcreations.net/2008/05/remembering-previous-shell-commands.html' title='Remembering Previous Shell Commands'/><author><name>Brendon</name><uri>http://www.blogger.com/profile/17253776647489907462</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04839470412706495604'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1931489360431959261.post-4569622415369254262</id><published>2008-04-15T00:26:00.000-07:00</published><updated>2008-04-15T00:27:36.581-07:00</updated><title type='text'>Drupal AJAX Forms Validation</title><content type='html'>Here is a beautiful little module I have created which will automagically validate your forms via AJAX, so you get no page refresh when getting back validation information on a Drupal form.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://drupal.org/project/ajax_validation"&gt;Drupal AJAX Forms Validation&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1931489360431959261-4569622415369254262?l=blog.aphexcreations.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.aphexcreations.net/feeds/4569622415369254262/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1931489360431959261&amp;postID=4569622415369254262' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/4569622415369254262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/4569622415369254262'/><link rel='alternate' type='text/html' href='http://blog.aphexcreations.net/2008/04/drupal-ajax-forms-validation.html' title='Drupal AJAX Forms Validation'/><author><name>Brendon</name><uri>http://www.blogger.com/profile/17253776647489907462</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04839470412706495604'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1931489360431959261.post-2678118677252071453</id><published>2008-03-17T15:24:00.000-07:00</published><updated>2008-03-17T15:27:17.676-07:00</updated><title type='text'>Get Non Up-to-Date Files in CVS</title><content type='html'>Here it is:&lt;br /&gt;&lt;br /&gt;&lt;pre style="color:green;"&gt;&lt;br /&gt;# Get Non Up-to-Date Files in CVS&lt;br /&gt;# This will not work within a Bash alias without proper escaping&lt;br /&gt;# It would be better to put it in file somewhere within you Bash PATH&lt;br /&gt;&lt;br /&gt;cvs -qr status | grep Status: | awk '$4 != "Up-to-date" { print $0 }'&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1931489360431959261-2678118677252071453?l=blog.aphexcreations.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.aphexcreations.net/feeds/2678118677252071453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1931489360431959261&amp;postID=2678118677252071453' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/2678118677252071453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/2678118677252071453'/><link rel='alternate' type='text/html' href='http://blog.aphexcreations.net/2008/03/get-non-up-to-date-files-in-cvs.html' title='Get Non Up-to-Date Files in CVS'/><author><name>Brendon</name><uri>http://www.blogger.com/profile/17253776647489907462</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04839470412706495604'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1931489360431959261.post-6883948066515482776</id><published>2007-10-30T02:54:00.000-07:00</published><updated>2007-10-30T03:10:37.645-07:00</updated><title type='text'>Parsing a URL with Javascript</title><content type='html'>Ugh, once again, there is no solid reference on the web for parsing a URL with JavaScript. How ths is possible, I don't know. When you parse a URL, you want a certain amount of information:&lt;br /&gt;&lt;br /&gt;* scheme&lt;br /&gt;* user&lt;br /&gt;* pass&lt;br /&gt;* host&lt;br /&gt;* port&lt;br /&gt;* path&lt;br /&gt;* query&lt;br /&gt;&lt;br /&gt;This function provides all of these and could be used for example when dealing with any paths within inline page elements such as:&lt;br /&gt;&lt;br /&gt;* &amp;lt;script src='XYZ'&amp;gt;&lt;br /&gt;* &amp;lt;a href='XYZ'&amp;gt;&lt;br /&gt;* &amp;lt;link href='XYZ'&amp;gt;&lt;br /&gt;* &amp;lt;iframe src='XYZ'&amp;gt;&lt;br /&gt;* &amp;lt;img src='XYZ'&amp;gt;&lt;br /&gt;&lt;br /&gt;Here is the code. As usual, no comments are included, because good, clean, scalable code should comment itself. If you want to debate me on this, I would be more than happy to:&lt;br /&gt;&lt;br /&gt;&lt;pre style='color:green'&gt;&lt;br /&gt;/**&lt;br /&gt; * Parses a URL&lt;br /&gt; * @author B Crawford (info at aphexcreations dotcom)&lt;br /&gt; * @copyright Copyright 2007 B Crawford&lt;br /&gt; * @license You may distribute this as long as you keep this header intact&lt;br /&gt; * @param str (String)&lt;br /&gt; * @return (Object)&lt;br /&gt; */&lt;br /&gt;getParams = function(str) {&lt;br /&gt; var parts, tmpOut, out, parser, args, i;&lt;br /&gt; parser =&lt;br /&gt;/^((([a-z]+):\/\/)((.+?)(:(.+?))?@)?(.+?\.[a-z]+)(:(\d+))?)?([^\?]+)?(\?(.+))?/i;&lt;br /&gt; parts = str.match(parser);&lt;br /&gt; out = {};&lt;br /&gt; tmpOut = {&lt;br /&gt;  scheme : parts[3],&lt;br /&gt;  user : parts[5],&lt;br /&gt;  pass : parts[7],&lt;br /&gt;  host : parts[8],&lt;br /&gt;  port : parts[10],&lt;br /&gt;  path : parts[11],&lt;br /&gt;  query : parts[13]&lt;br /&gt; };&lt;br /&gt; if(tmpOut.scheme === undefined) {&lt;br /&gt;  out.scheme = window.location.protocol.toString().match(/^([a-z]+)/i)[1];&lt;br /&gt; }&lt;br /&gt; else {&lt;br /&gt;  out.scheme = tmpOut.scheme;&lt;br /&gt; }&lt;br /&gt; if(tmpOut.user === undefined) {&lt;br /&gt;  out.user = false;&lt;br /&gt; }&lt;br /&gt; else {&lt;br /&gt;  out.user = tmpOut.user;&lt;br /&gt; }&lt;br /&gt; if(tmpOut.pass === undefined) {&lt;br /&gt;  out.pass = false;&lt;br /&gt; }&lt;br /&gt; else {&lt;br /&gt;  out.user = tmpOut.pass;&lt;br /&gt; }&lt;br /&gt; if(tmpOut.host === undefined) {&lt;br /&gt;  out.host = document.domain ? document.domain : 'localhost';&lt;br /&gt; }&lt;br /&gt; else {&lt;br /&gt;  out.host = tmpOut.host;&lt;br /&gt; }&lt;br /&gt; if(tmpOut.port === undefined) {&lt;br /&gt;  out.port = window.location.port ? parseInt(window.location.port) : 80;&lt;br /&gt; }&lt;br /&gt; else {&lt;br /&gt;  out.port = tmpOut.port;&lt;br /&gt; }&lt;br /&gt; if(tmpOut.path === undefined) {&lt;br /&gt;  out.path = window.location.pathname ? window.location.pathname : '';&lt;br /&gt; }&lt;br /&gt; else {&lt;br /&gt;  out.path = tmpOut.path;&lt;br /&gt; }&lt;br /&gt; if(tmpOut.query === undefined) {&lt;br /&gt;  out.query = window.location.search ? window.location.search : '';&lt;br /&gt; }&lt;br /&gt; else {&lt;br /&gt;  out.query = tmpOut.query;&lt;br /&gt; }&lt;br /&gt; out.args = {};&lt;br /&gt; args = out.query.split(/&amp;/g);&lt;br /&gt; for(i = 0; i &lt; args.length; i++) {&lt;br /&gt;  arg = args[i].split(/\=/);&lt;br /&gt;  if(arg[0] !== '') {&lt;br /&gt;   if(arg[1]) {&lt;br /&gt;    out.args[arg[0]] = arg[1];&lt;br /&gt;   }&lt;br /&gt;   else {&lt;br /&gt;    out.args[arg[0]] = true;  &lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt; return out;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1931489360431959261-6883948066515482776?l=blog.aphexcreations.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.aphexcreations.net/feeds/6883948066515482776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1931489360431959261&amp;postID=6883948066515482776' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/6883948066515482776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/6883948066515482776'/><link rel='alternate' type='text/html' href='http://blog.aphexcreations.net/2007/10/parsing-url-with-javascript.html' title='Parsing a URL with Javascript'/><author><name>Brendon</name><uri>http://www.blogger.com/profile/17253776647489907462</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04839470412706495604'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1931489360431959261.post-6999557717459547807</id><published>2007-10-25T00:29:00.000-07:00</published><updated>2008-05-22T04:02:35.098-07:00</updated><title type='text'>Mandatory FireFox Extensions for Web Developers</title><content type='html'>As a web developer and a web user, I have 5 objectives in mind when it comes to browsers and extensions:&lt;br /&gt;&lt;br /&gt;1) I don't want ads, spyware, or any XSS attacks.&lt;br /&gt;&lt;br /&gt;2) I want to see a page how a normal user will see the page.&lt;br /&gt;&lt;br /&gt;3) I don't want to use the mouse. Keyboards are much more efficient.&lt;br /&gt;&lt;br /&gt;4) I want to be able to quickly dissect any element within a page.&lt;br /&gt;&lt;br /&gt;5) I need an efficient way to manage bookmarks.&lt;br /&gt;&lt;br /&gt;So, with that in mind, these are the extensions that make that possible:&lt;br /&gt;&lt;br /&gt;1) AdBlock Plus&lt;br /&gt;&lt;br /&gt;Not to be confused with AdBlock (proper). This eliminates ads, and does it better than anything else. period.&lt;br /&gt;&lt;br /&gt;2) FireBug&lt;br /&gt;&lt;br /&gt;This extension alone offers about 90% of the functionality a web developer will ever need.  If you need that other 10%, get the Web Developer Toolbar and the Venkman Javascript Debugger. Word of warning though, Venkman does a few things FireBug doesnt do, BUT it is a huge pain in the ass and it's usually not worth the hassle. Hint: For stack traces, include console.trace() in your code.&lt;br /&gt;&lt;br /&gt;3) Tab Mix Plus&lt;br /&gt;&lt;br /&gt;The main reason I use this is for SIngle Window mode, which basically eliminates all popups and puts new windows in tabs. Hint: Undo Close Tab feature could save your life.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4) NoMouse&lt;br /&gt;&lt;br /&gt;NoMouse is my own custom FireFox extension for complete mouseless browsing. It is much more stable than the others and with way more features.&lt;br /&gt;&lt;br /&gt;Here is the link to my NoMouse extension:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://addons.mozilla.org/en-US/firefox/addon/7045"&gt;NoMouse&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strike&gt;Hit-a-Hint&lt;/strike&gt;&lt;br /&gt;&lt;br /&gt;&lt;strike&gt;Buggy, but still the best keyboard navigation extension for FireFox. This assigns a numeric ID to every clickable element on the page, allowing you full keyboard control over any page. Much easier to use than the FireFox Accessibility Plugin, and not nearly as buggy as FireFox Mouseless Browsing Extension. Hint: install keyconfig to improve the usability of this extension.&lt;/strike&gt;&lt;br /&gt;&lt;br /&gt;&lt;strike&gt;keyconfig&lt;/strike&gt;&lt;br /&gt;&lt;br /&gt;&lt;strike&gt;Change keybindings for most FireFox extensions. This is more useful than it sounds.&lt;/strike&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5) Google Toolbar for Firefox&lt;br /&gt;&lt;br /&gt;There is only one reason I use this: Google Bookmarks. This has a nice little button to add a page to your google bookmarks. This can come in handy once you start having over 10k+ bookmarks. Hint: disable all other features.&lt;br /&gt;&lt;br /&gt;6) NoScript&lt;br /&gt;&lt;br /&gt;This is the 2nd best prevntion against XSS attacks for FireFox. The first is to set permissions.default.image to "3" in about:config, but that will disable any third party images from loading which you may not want. Use the whitelist in NoScript and turn everything else off. Despite what the detractors say, you will probably encounter only 1 out of every 100 sites that absolutely need JavaScript to run (aside form the 20 or so that you will have in your everyday usage).&lt;br /&gt;&lt;br /&gt;7) Tamper Data&lt;br /&gt;&lt;br /&gt;Somewhat lacking in features, but nevertheless does a good job of allowing you to see HTTP traffic as it gets sent to the server. Please note that this does not show FULL HTTP traffic, but it still gives you a lot of information. If you need to view raw traffic, you may want to consider running &lt;a href="http://www.wireshark.org/"&gt;WireShark&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;8) Web Developer Toolbar&lt;br /&gt;&lt;br /&gt;This is slowly becoming less relevant due to the ass-kicking nature of FireBug, but is still very useful for disabling stylesheets, editing css, and other little miscellaneous knick-knacks that you need about once a week. Forecast: Obselete in 12 months.&lt;br /&gt;&lt;br /&gt;9) MeasureIt&lt;br /&gt;&lt;br /&gt;Performs a simple pixel measurement anywhere within the FireFox window. Very useful.&lt;br /&gt;&lt;br /&gt;10) ColorZilla&lt;br /&gt;&lt;br /&gt;Gives the color value of any pixel within the FireFox window. You will use this more than you realize.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1931489360431959261-6999557717459547807?l=blog.aphexcreations.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.aphexcreations.net/feeds/6999557717459547807/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1931489360431959261&amp;postID=6999557717459547807' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/6999557717459547807'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/6999557717459547807'/><link rel='alternate' type='text/html' href='http://blog.aphexcreations.net/2007/10/mandatory-firefox-extensions-for-web.html' title='Mandatory FireFox Extensions for Web Developers'/><author><name>Brendon</name><uri>http://www.blogger.com/profile/17253776647489907462</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04839470412706495604'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1931489360431959261.post-1986908512463823761</id><published>2007-10-23T18:52:00.002-07:00</published><updated>2007-10-25T01:08:46.698-07:00</updated><title type='text'>Javascript: Passing Variables by Reference</title><content type='html'>Now, before I get 3000 emails from people saying, "LoLz, ur such teh ghey! OMG, thats not p@ssing by ref3rence!!!", I want to preface this by saying that it is not possible to actually pass a variable by reference in Javascript, but we certainly can achieve the same functionality.&lt;br /&gt;&lt;br /&gt;Here is the code..&lt;br /&gt;&lt;br /&gt;&lt;pre style="color:green;"&gt;&lt;br /&gt;function foo(_) {&lt;br /&gt; _.val = "Hello World";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;foo(_={val:null});&lt;br /&gt;&lt;br /&gt;alert( _.val);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;So, why is this needed? Sometimes you may want a function to return more than one value. For example, you may want it to return a status code as well as a status message:&lt;br /&gt;&lt;br /&gt;&lt;pre style="color:green;"&gt;&lt;br /&gt;function getStatus(_) {&lt;br /&gt; _.statusMsg = "Hello World";&lt;br /&gt; return 1;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;statusCode = getStatus(_={statusMsg:null});&lt;br /&gt;&lt;br /&gt; if( statusCode === 1 ) {&lt;br /&gt;  alert(_.statusMsg);&lt;br /&gt; }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Why do I use the underscore? Because it looks cool. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1931489360431959261-1986908512463823761?l=blog.aphexcreations.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.aphexcreations.net/feeds/1986908512463823761/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1931489360431959261&amp;postID=1986908512463823761' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/1986908512463823761'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/1986908512463823761'/><link rel='alternate' type='text/html' href='http://blog.aphexcreations.net/2007/10/javascript-passing-variables-by.html' title='Javascript: Passing Variables by Reference'/><author><name>Brendon</name><uri>http://www.blogger.com/profile/17253776647489907462</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04839470412706495604'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1931489360431959261.post-2509535322597565906</id><published>2007-10-22T21:26:00.000-07:00</published><updated>2007-10-22T21:52:14.028-07:00</updated><title type='text'>Writing PHP Command Line Apps: Getting Command Line Arguments</title><content type='html'>If you go to the php.net manual on CLI php, you will see a lot of really bad code snippets for getting the command line arguments for a PHP application. Most of them are half assed attempts at a quick shot of coder fame. Well, here is the godfather of all functions to properly grab the command line arguments...&lt;br /&gt;&lt;pre style="color:green;"&gt;&lt;br /&gt;/**&lt;br /&gt; * Parses out command line args&lt;br /&gt; * @author Brendon C.&lt;br /&gt; * @copyright Copyright 2007 Brendon C&lt;br /&gt; * @license This code can be used and distributed&lt;br /&gt; *  provided you keep this header in tact&lt;br /&gt; * @param args (Array)[String]&lt;br /&gt; * @return (AssociativeArray)&lt;br /&gt; */&lt;br /&gt;function getArgs() {&lt;br /&gt; $args = $_SERVER['argv'];&lt;br /&gt; $out = array();&lt;br /&gt; $input_index = 0;&lt;br /&gt; $last_arg = null;&lt;br /&gt; $last_arg_type = null;&lt;br /&gt; for($i = 1, $il = sizeof($args); $i &lt; $il; $i++) {&lt;br /&gt;  if( (bool)preg_match("/^--(.+)/", $args[$i], $match) ) {&lt;br /&gt;   $parts = explode("=", $match[1]);&lt;br /&gt;   $key = str_replace( "-", "_", preg_replace("/[^a-z0-9-]+/", "", $parts[0]) );&lt;br /&gt;   if(isset($parts[1])) {&lt;br /&gt;    $out[$key] = $parts[1]; &lt;br /&gt;   }&lt;br /&gt;   else {&lt;br /&gt;    $out[$key] = true; &lt;br /&gt;   }&lt;br /&gt;   $last_arg = $key;&lt;br /&gt;   $last_arg_type = 0;&lt;br /&gt;  }&lt;br /&gt;  else if( (bool)preg_match("/^-([a-zA-Z0-9]+)/", $args[$i], $match) ) {&lt;br /&gt;   for( $j = 0, $jl = strlen($match[1]); $j &lt; $jl; $j++ ) {&lt;br /&gt;    $key = $match[1]{$j};&lt;br /&gt;    $out[$key] = true;&lt;br /&gt;   }&lt;br /&gt;   $last_arg = $key;&lt;br /&gt;   $last_arg_type = 1;&lt;br /&gt;  }&lt;br /&gt;  else if($last_arg !== null) {&lt;br /&gt;   if($last_arg_type === 1) {&lt;br /&gt;    $out[$last_arg] = $args[$i];&lt;br /&gt;   }&lt;br /&gt;   else {&lt;br /&gt;    $out["-".(string)$input_index] = $args[$i];&lt;br /&gt;    $input_index++;&lt;br /&gt;   }&lt;br /&gt;   $last_arg = false;&lt;br /&gt;   $last_arg_type = 2;&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt; return $out;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now, let's look at an example of how to use this...&lt;br /&gt;&lt;pre  style="color:green;"&gt;&lt;br /&gt;php test.php \&lt;br /&gt;"Cant wait for PHP 6" --with-foo -abc "Hello World" -ABC0 \&lt;br /&gt;--bar='test' "PHP is an unfortunate reality"&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;If you run getArgs, your return object is going something like this...&lt;br /&gt;&lt;pre  style="color:green;"&gt;&lt;br /&gt;Array(&lt;br /&gt; -0 =&gt; "Cant wait for PHP 6",&lt;br /&gt; with_foo =&gt; true,&lt;br /&gt; a =&gt; true,&lt;br /&gt; b =&gt; true,&lt;br /&gt; c =&gt; "Hello World"&lt;br /&gt; A =&gt; true,&lt;br /&gt; B =&gt; true,&lt;br /&gt; C =&gt; true,&lt;br /&gt; 0 =&gt; true,&lt;br /&gt; bar =&gt; "test"&lt;br /&gt; -1 =&gt; "PHP is an unfortunate reality"&lt;br /&gt;)&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1931489360431959261-2509535322597565906?l=blog.aphexcreations.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.aphexcreations.net/feeds/2509535322597565906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1931489360431959261&amp;postID=2509535322597565906' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/2509535322597565906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/2509535322597565906'/><link rel='alternate' type='text/html' href='http://blog.aphexcreations.net/2007/10/writing-php-command-line-apps-getting.html' title='Writing PHP Command Line Apps: Getting Command Line Arguments'/><author><name>Brendon</name><uri>http://www.blogger.com/profile/17253776647489907462</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04839470412706495604'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1931489360431959261.post-8813650504075263960</id><published>2007-10-18T04:27:00.000-07:00</published><updated>2007-10-22T22:51:36.325-07:00</updated><title type='text'>Enabling CakePHP 1.1 on Lighttpd 1.5</title><content type='html'>A lot of people out there are trying to figure out how to get CakePHP 1.1x running on Lighttpd 1.5. Here is the solution. Please follow it carefully:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;strong&gt;#### Disable BASE_URL ####&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt; a) Open the file "app/config/core.php"&lt;br /&gt; b) Make sure that the BASE_URL constant is commented out&lt;br /&gt; &lt;br /&gt;&lt;strong&gt;#### REDIRECT_URI fix ####&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt; a) Open the file "cake/basics.php"&lt;br /&gt; b) Go to the function "setUri"&lt;br /&gt; c) Find this line:&lt;br /&gt;&lt;br /&gt;   &lt;span style='color:green'&gt;if (env('HTTP_X_REWRITE_URL')) {&lt;/span&gt;&lt;br /&gt;    &lt;br /&gt;  Replace with this:&lt;br /&gt;  &lt;br /&gt;   &lt;span style='color:green'&gt;if( env('REDIRECT_URI') ) {&lt;br /&gt;    $uri = env('REDIRECT_URI');&lt;br /&gt;   }&lt;br /&gt;   else if (env('HTTP_X_REWRITE_URL')) {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;#### Add rewrite rules to lighttpd.conf ####&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt; a) Enable mod_rewrite in lighttpd.conf&lt;br /&gt; b) Add this to lighttpd.conf:&lt;br /&gt;&lt;br /&gt;   &lt;span style='color:green'&gt;url.rewrite-once = (&lt;br /&gt;    "^/(css|files|img|js|stats)/(.*)$" =&gt; "/$1/$2",&lt;br /&gt;    "^/(.*)$" =&gt; "/index.php?url=$1"&lt;br /&gt;   )&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1931489360431959261-8813650504075263960?l=blog.aphexcreations.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.aphexcreations.net/feeds/8813650504075263960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1931489360431959261&amp;postID=8813650504075263960' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/8813650504075263960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/8813650504075263960'/><link rel='alternate' type='text/html' href='http://blog.aphexcreations.net/2007/10/enabling-cakephp-11-on-lighttpd-15.html' title='Enabling CakePHP 1.1 on Lighttpd 1.5'/><author><name>Brendon</name><uri>http://www.blogger.com/profile/17253776647489907462</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04839470412706495604'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1931489360431959261.post-7197575014542952868</id><published>2007-02-26T03:06:00.000-08:00</published><updated>2007-02-26T03:24:34.934-08:00</updated><title type='text'>Regular Expression Tester Roundup</title><content type='html'>&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Favorites&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://projects.aphexcreations.net/rejax/"&gt;ReJax&lt;/a&gt; - Low featureset. Support for most engines. Easiest to use for basic matches.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://osteele.com/tools/rework/"&gt;ReWork&lt;/a&gt; - Most advanced featureset. Difficult Interface.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://bokehman.com/regex_checker"&gt;RexV&lt;/a&gt; - Best blend of features and interface.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;The Others&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://bokehman.com/regex_checker"&gt;Regex Checker&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.fileformat.info/tool/regex.htm"&gt;FileFormat.info&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.quanetic.com/regex.php"&gt;Quanetic&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="" style="display: block;" id="formatbar_CreateLink" title="Link" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="" onmousedown="CheckFormatting(event);FormatbarButton('richeditorframe', this, 8);ButtonMouseDown(this);"&gt;&lt;a href="http://www.regextester.com/"&gt;REGex Tester&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://mochikit.com/examples/mochiregexp/"&gt;MochiRegExp&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1931489360431959261-7197575014542952868?l=blog.aphexcreations.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.aphexcreations.net/feeds/7197575014542952868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1931489360431959261&amp;postID=7197575014542952868' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/7197575014542952868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/7197575014542952868'/><link rel='alternate' type='text/html' href='http://blog.aphexcreations.net/2007/02/regular-expression-tester-roundup.html' title='Regular Expression Tester Roundup'/><author><name>Brendon</name><uri>http://www.blogger.com/profile/17253776647489907462</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04839470412706495604'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1931489360431959261.post-772650957982050868</id><published>2007-02-26T02:50:00.000-08:00</published><updated>2007-02-26T03:03:23.841-08:00</updated><title type='text'>Most Disurbing Films Ever Made</title><content type='html'>Here it is.. I guarantee you haven't seen all of these...&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Eraserhead&lt;/li&gt;&lt;li&gt;Salo&lt;/li&gt;&lt;li&gt;House on Haunted Hill&lt;/li&gt;&lt;li&gt;Audition&lt;/li&gt;&lt;li&gt;Requiem for a Dream&lt;/li&gt;&lt;li&gt;Kids&lt;/li&gt;&lt;li&gt;Irreversable&lt;/li&gt;&lt;li&gt;Cannibal Holocaust&lt;/li&gt;&lt;li&gt;Visitor Q&lt;/li&gt;&lt;li&gt;Ichi the Killer&lt;/li&gt;&lt;li&gt;Saw&lt;/li&gt;&lt;li&gt;Tesis&lt;/li&gt;&lt;li&gt;Oldboy&lt;/li&gt;&lt;li&gt;American History X&lt;/li&gt;&lt;li&gt;American Psycho&lt;/li&gt;&lt;li&gt;Taking Lives&lt;/li&gt;&lt;li&gt;Lord of the FLies&lt;/li&gt;&lt;li&gt;Tetsuo&lt;/li&gt;&lt;li&gt;Naked Blood&lt;/li&gt;&lt;li&gt;Day of the Dead&lt;/li&gt;&lt;li&gt;Warzone&lt;/li&gt;&lt;li&gt;The happiness of the katakuris&lt;/li&gt;&lt;li&gt;The Untold Story&lt;/li&gt;&lt;li&gt;Baise-moi&lt;/li&gt;&lt;li&gt;FUDOH: THE NEW GENERATION&lt;/li&gt;&lt;li&gt;Ebola Syndrome&lt;/li&gt;&lt;li&gt;Urotsikidoji&lt;/li&gt;&lt;li&gt;All night long&lt;/li&gt;&lt;li&gt;La blue girl&lt;/li&gt;&lt;li&gt;Ricky O&lt;/li&gt;&lt;li&gt;I Spit On Your Grave&lt;/li&gt;&lt;li&gt;Henry: Portrait of a Serial Killer&lt;/li&gt;&lt;li&gt;Man Bites DogAftermath&lt;/li&gt;&lt;li&gt;Seventh Seal&lt;/li&gt;&lt;li&gt;Funny Games&lt;/li&gt;&lt;li&gt;Subconscious Cruelty&lt;/li&gt;&lt;li&gt;Guinea Pig: Flowers of Flesh and Blood&lt;/li&gt;&lt;li&gt;Guinea Pig: The Devils Experiment&lt;/li&gt;&lt;li&gt;Das Experiment&lt;/li&gt;&lt;li&gt;8MM&lt;/li&gt;&lt;li&gt;Happiness&lt;/li&gt;&lt;li&gt;The Elephant Man&lt;/li&gt;&lt;li&gt;O&lt;/li&gt;&lt;li&gt;Pink Flamingo&lt;/li&gt;&lt;li&gt;Maniac&lt;/li&gt;&lt;li&gt;The Last House on the Left&lt;/li&gt;&lt;li&gt;Kids&lt;/li&gt;&lt;li&gt;Natural Born Killers&lt;/li&gt;&lt;li&gt;The Holy Mountain&lt;/li&gt;&lt;li&gt;Gummo&lt;/li&gt;&lt;li&gt;El Topo&lt;/li&gt;&lt;li&gt;Man Behind The Sun&lt;/li&gt;&lt;li&gt;Begotten&lt;/li&gt;&lt;li&gt;Jacob's Ladder&lt;/li&gt;&lt;li&gt;Kissed&lt;/li&gt;&lt;li&gt;The Shining&lt;/li&gt;&lt;li&gt;Dawn of the Dead (2004)&lt;/li&gt;&lt;li&gt;The Deer Hunter&lt;/li&gt;&lt;li&gt;American Beauty&lt;/li&gt;&lt;li&gt;Deliverance&lt;/li&gt;&lt;li&gt;Boys dont cry&lt;/li&gt;&lt;li&gt;The Ring&lt;/li&gt;&lt;li&gt;Shallow Grave&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The Cook, The Theif, His Wife, Her Lover&lt;/li&gt;&lt;li&gt;Delicatessen&lt;/li&gt;&lt;li&gt;The Fly&lt;/li&gt;&lt;li&gt;Crumb&lt;/li&gt;&lt;li&gt;Funny games&lt;/li&gt;&lt;li&gt;Dead Ringers&lt;/li&gt;&lt;li&gt;Taxi Driver&lt;/li&gt;&lt;li&gt;Mulholland Drive&lt;/li&gt;&lt;li&gt;Seven&lt;/li&gt;&lt;li&gt;Scum&lt;/li&gt;&lt;li&gt;Straw Dogs&lt;/li&gt;&lt;li&gt;EVent Horizon&lt;/li&gt;&lt;li&gt;The Cube&lt;/li&gt;&lt;li&gt;City of God&lt;/li&gt;&lt;li&gt;Clockwork Orange&lt;/li&gt;&lt;li&gt;Schindlers List&lt;/li&gt;&lt;li&gt;CARRIE&lt;/li&gt;&lt;li&gt;THE REFLECTING SKIN&lt;/li&gt;&lt;li&gt;Dead Alive&lt;/li&gt;&lt;li&gt;Bully&lt;/li&gt;&lt;li&gt;Santa Sangre&lt;/li&gt;&lt;li&gt;CLOSET LAND&lt;/li&gt;&lt;li&gt;KEN PARK&lt;/li&gt;&lt;li&gt;GUMMO&lt;/li&gt;&lt;li&gt;Julien Donkey-Boy&lt;/li&gt;&lt;li&gt;Once Were Warriors&lt;/li&gt;&lt;li&gt;Sister My Sister&lt;/li&gt;&lt;li&gt;Baby of Macon&lt;/li&gt;&lt;li&gt;Bad Taste&lt;/li&gt;&lt;li&gt;Heavenly Creatures&lt;/li&gt;&lt;li&gt;Frailty&lt;/li&gt;&lt;li&gt;Freaks&lt;/li&gt;&lt;li&gt;Battle Royale&lt;/li&gt;&lt;li&gt;Nekromantik&lt;/li&gt;&lt;li&gt;Elephant&lt;/li&gt;&lt;li&gt;LIE&lt;/li&gt;&lt;li&gt;Dolls&lt;/li&gt;&lt;li&gt;Crash (David Cronenburg version)&lt;/li&gt;&lt;li&gt;Lost Highway&lt;/li&gt;&lt;li&gt;Ressurection&lt;/li&gt;&lt;li&gt;Donny Darko&lt;/li&gt;&lt;li&gt;Guinea Pig: Mermaid in Manhole&lt;/li&gt;&lt;li&gt;Cannibal Ferox&lt;/li&gt;&lt;li&gt;Inland Empire&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1931489360431959261-772650957982050868?l=blog.aphexcreations.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.aphexcreations.net/feeds/772650957982050868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1931489360431959261&amp;postID=772650957982050868' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/772650957982050868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1931489360431959261/posts/default/772650957982050868'/><link rel='alternate' type='text/html' href='http://blog.aphexcreations.net/2007/02/most-disurbing-films-ever-made.html' title='Most Disurbing Films Ever Made'/><author><name>Brendon</name><uri>http://www.blogger.com/profile/17253776647489907462</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04839470412706495604'/></author><thr:total>0</thr:total></entry></feed>