Sep 07

“absmiddle” is a non-standard value for an images tags align property.
While widely implemented, it isn’t a part of the HTML 4.x spec.

This helpful property caused the image to be shifted down to rest on the same line as elements around it.

Example of image without align property

Image button without the align property set.

Image button with proper alignment.

Here is a CSS way to make an image have the same settings as the absmiddle property.

IMG.absmiddle {
vertical-align: middle;
margin-bottom: .25em;
}

Thanks to George on code2design.com for this tip.

Tagged with:
Jul 28

its shorter than you think.

It won’t be the same without you missy.

Jul 18

The end result is to take a based install of ubuntu 10.x desktop and make it ready for php web development.

These commands download about 500MB of software.

Run it line by line as root or make a bash script out of it.


#!/bin/bash

#All of these steps must be done as root.
if [ "$(whoami)" != 'root' ]; then
echo "This script must be run as root."
exit 1;
fi

#Add the zend repo to apt.
echo "deb http://repos.zend.com/zend-server/deb server non-free" >> /etc/apt/sources.list

#Add zend's signing key to the apt key ring so we can use the zend repo.
wget http://repos.zend.com/deb/zend.key -O- | sudo apt-key add -

#Add yogarine's repo so we can download the latest version of eclipse and the php development tools.
add-apt-repository ppa:yogarine/eclipse/ubuntu

# Update your repo cached software list.
apt-get update

#Install eclipse with php development tools (latest), zend server (apache, php, and php control panel), mysql (cli client and server) in a single command.
apt-get install eclipse-pdt zend-server-ce-php-5.3 php-5.3-extra-extensions-zend-server-ce mysql-server mysql-client phpmyadmin

Post install Tasks:

Reboot your computer.
Eclipse will install openJDK and you must restart to complete the installation.

Visit http://127.0.0.1:10081 to complete the setup of your zend server control panel.

Setup your document root.
I usually make a directory in var for my workspace and point eclipse to that location like so.

cp /var/www/*.php ~/workspace/
sudo rm -f -r /var/www
#Replace $USER with your login name.
sudo ln -s -v ~/home/$USER/workspace/ /var/www

To access the debugger from PDT, add the following get variables to your request:

http://localhost/test/info.php?debug_host=127.0.0.1%2C127.0.0.1&start_debug=1&debug_port=10000&original_url=http%3A%2F%2Flocalhost%2Ftest%2Finfo.php&send_sess_end=1&debug_stop=1&debug_start_session=1&debug_no_cache=1310991085348&debug_session_id=1000

Jun 24

Or how to get your stuff off an ESXi ‘free edition’ box.

FTP server

There are many ways to get at your datastores on an ESXi box.
The web interface. You could enable support mode and scp files around. Or you could even use the datastore browser in the vsphere client.

I however was looking for a way to move these large data files onto another linux storage server.
In my case, the web ui and scp were extremely slow. At their current rate, it was going to take days to copy all my stuff off.

That’s when I came across Dave’s article on how to enable a FTP server on an ESXi box. Again using static binaries. Lovely.

I condensed the process in to a shell script. Just download this archive.
Unzip and run the install.sh script in the recovery console.

This will copy the files into the correct locations, change their permissions and add them to the inetd.conf file.
Remember; with ESXi, these changes only persist until the next reboot.
Any user account in ESXi will be able to login via FTP.

Disclaimer:
Its FTP folks. Don’t try this on an untrusted network.
Your info is going across the wire in plain text.
…its going so fast… Should be done by tomorrow.

Tagged with:
Apr 15

On March 8th, the reCaptcha team announced they’re changing their API URL, effective Apr. 11th, 2011.

As others have pointed out, really poor communication from reCaptcha guys. Use your blog, put it on slashdot, reach out to the communities listed on your site. Don’t just yank the rug out from under folks. A month isn’t anywhere near long enough for this important change to trickle out to all the folks integrating with your service. Paypal gave a year and a half worth of notice to is developer community before switching its api urls and that wasn’t long enough either.

Really minor change for zend framework users or other scripting languages.
ZF hasn’t offically said when they’ll update their code. There is a bug report for it.

Here is what change to get ZF ReCaptcha service working again:
Open:
/ZendFramework-1.11.0/library/Zend/Service/ReCaptcha.php


/**
* URI to the regular API
*
* @var string
*/
const API_SERVER = 'http://www.google.com/recaptcha/api';

/**
* URI to the secure API
*
* @var string
*/
const API_SECURE_SERVER = 'https://www.google.com/recaptcha/api';
/**
* URI to the verify server
*
* @var string
*/
const VERIFY_SERVER = 'http://www.google.com/recaptcha/api/verify';
[/code]
#The old urls are still working but are being redirected.

ReCaptcha has already reflected this in their documentation.

Tagged with: