Wednesday, December 9, 2009

gPhoto2 Image Capture on the Mac.

This is a good place to start
gPhoto Primer.


  • Install X11 and the Developer Tools from the OS Install Disc
  • Download the Most Recent MacPorts for your Platform (It used to be called DarwinPorts) and install.
  • Install gPhoto
  • sudo port install gphoto2
  • Install proctools
  • sudo port install proctools
  • I didn't bother with trying to upgrade gPhoto to the most recent version.


  • Make sure nothing else has access to the camera, and kill any other possible gphoto instances.
  • pkill PTP
  • pkill gphoto2

Setup Camera:

  • gphoto2 --set-config capture=On
  • gphoto2 --set-config whitebalance=4
  • gphoto2 --set-config zoom=5
  • gphoto2 --set-config assistlight=Off
  • gphoto2 --set-config iso=0
  • gphoto2 --set-config canonflashmode=off
  • gphoto2 --set-config focusingpoint=0

For Testing Purposes

  • gphoto2 --set-config canonimgquality=0
  • gphoto2 --set-config canonimgsize=3

For Production

  • gphoto2 --set-config shootingmode=3
  • gphoto2 --set-config aperture=18
  • gphoto2 --set-config shutterspeed=25
  • gphoto2 --set-config iso=0
  • gphoto2 --set-config canonimgquality=1
  • gphoto2 --set-config canonimgsize=1

Toggle Focus

  • gphoto2 --set-config focuslock=on
  • gphoto2 --set-config focuslock=off

Take Infinite Photos Every 2 Minutes

  • gphoto2 --capture-image --interval=180 --frames=0

Wednesday, November 11, 2009

Upgrade Flash Player in Ubuntu

Download some kind of thing from Adobe.
(There are lots of options)

Find a somewhere in the archives you downloaded.
Replace the copy of in /home/user/.mozilla/plugins

Thursday, August 20, 2009

Dumping a DOMElement in PHP

Reference this post:

$xml = $domElement->ownerDocument->saveXML($domElement);

Thursday, July 30, 2009

Getting PHP_AUTH_USER and PHP_AUTH_PW in Dreamhost

Dreamhost runs PHP as a CGI module, so you have to work around Apache.
It's a pretty easy fix though.

Friday, May 29, 2009

Custom PHP.ini for Loading Zend Framework with Dreamhost

Creating a custom php.ini is really easy.
Just follow these directions:
Just check your phpinfo() to see what Configuration File is getting loaded after words to make sure you changes took hold.

Thursday, May 28, 2009

Example PHP and AS3 encrypt and decrypt

Still testing this out, but it looks pretty good. I need to update it to use AES-256, but that should be hard.

Hindsight is 20/20: This method is a worthwhile starting point, but AES-256 needed some additional tweaking. Will post update when I know I have all the kinks worked out and tested.

Wednesday, May 27, 2009

Installing Mcrypt in Ubuntu Desktop for PHP5

Open the Synaptic Package Manager. Search for php5-mcrypt. Start installation. Agree to any additional libraries it might need. Finish Install.

sudo /etc/init.d/apache2 restart
from the command line to restart Apache.
Mcrypt will show up when you execute
in php.

Locating PHP.ini in Ubuntu

cd etc/php5/apache2
gedit php.ini