Updates from February, 2009 Toggle Comment Threads | Keyboard Shortcuts

  • steve918 11:53 pm on February 4, 2009 Permalink | Reply  


    I’ve been thinking about building a code snippet site for some time and just recently started using dzone snippets, but it didn’t really suit my needs.

    Today I discovered Snipplr and it is exactly what I was looking for. It has all the features I had in mind and more including a Textmate plugin, RSS feeds, a nice API and a clean easy to user interface. Now I just need to find/write a nice vim plugin.

    I’ve just got started using it, but here’s a link if so you can follow my snippet feed.

  • steve918 2:54 pm on February 4, 2009 Permalink | Reply  

    Fixing PHP after an OSX Update 

    Apple is very protective of their OS.

    So it should come as no surprise to find your carefully crafted PHP installation blown all to heck after an OS update.  Those of us that develop on custom PHP source builds have grown to dread any minor revision change (we’re the ones that can be found still running 10.5.2)

    If that bouncing Software Update icon in the dock strikes fear into your heart and interrupts your dreams at night.  This is for you.

    This solution requires you to have a hand-compiled version of PHP lying around somewhere on your OSX file system.

    Most of this has been reverse-engineered from these excellent instructions on build PHP from source from John Malis:

    Enabling, Compiling and Installing PHP on Mac OS X Leopard

    There are three issues at play here.  Many OSX updates do the following things:

    • Replace the stock Apache standard modules
    • Replace your Apache binary
    • Replace your PHP command line too (aka /usr/bin/php)

    So, we just need to revert those changes! Lets get started!

    (Standard disclaimer: These instructions are for fairly stock versions of OSX with Intel processors, your mileage may vary)

    Step 1: Backup!

    # Backup the main PHP Apache HTTPD module
    $ cd /usr/libexec/apache2
    $ sudo cp libphp5.so libphp5.2.6-apple.so
    # Backup Apache HTTPD Server Daemon
    $ cd /usr/sbin
    $ sudo cp httpd httpd.uni
    # Backup PHP Command Line interpreter
    $ cd /usr/bin
    $ sudo cp php php-apple
    # Stop Apache
    $ sudo apachectl stop

    Step 2: Replace the PHP module and the PHP & HTTP binaries

    # copy the compiled module from your source to the apache2 directory
    $ cd /src/php-5.2.6/ # replace with the directory of your own php source
    $ sudo cp libs/libphp5.so /usr/libexec/apache2/libphp5.so
    # Replace PHP Command Line Interface
    $ sudo cp sapi/cli/php /usr/bin/php

    OS X ships with a universal binary version of apache2 that we must trim in order to work with a 32-bit version of PHP. See here for more info

    $ cd /usr/sbin
    # Strip out the 64-bit support
    # NOTE: These steps only apply if you are running an Intel processor
    # with 32-bit versions of php and apache2. 
    $ sudo lipo httpd -thin i386 -output httpd.i386 # Intel
    # Copy to httpd
    $ sudo cp httpd.i386 httpd # Intel

    Thats it!

    To test it, you can restart Apache2 and test to make sure that your cli has the version number you expect

    # Restart Apache
    $ apachectl -t
    Syntax OK
    $ php -v
    PHP 5.2.6 (cli) (built: Jul  7 2008 23:43:57)
    Copyright (c) 1997-2008 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
    $ sudo apachectl start
  • steve918 8:03 pm on February 2, 2009 Permalink | Reply  

    Android Password Safe gets a new name and home 

    icon_safe I started Android Password Safe nearly a year before the first Android phone was available and put quite a bit of time into it and learned a lot along the way.

    In the few short months since the Android market opened it’s gates Android Password Safe has been installed over 30,000 times. Even though I haven’t done development on the project in months it’s growing faster than ever and is now part of the OpenIntents open source project. It’s new official name is “OI Safe“, has a spiffy new icon and is available for download in the Marketplace.

    I’m pretty excited about the direction of the project, but it feels a bit like my baby grew up and took off on it’s own. 🙂

  • steve918 6:12 pm on February 2, 2009 Permalink | Reply  

    Rules Editors 

    I’m always intrigued my rules-editing UI‘s in applications; Their purpose is typically to allow the end user to intuitively enter structured logic, but they rarely actually turn out to be intuitive given their complex nature.

    My intrigue has lead to the start of a small collection of screenshots. If you have some good screenshots of complex UI’s I would love to see them.





Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc