Google Translate for Free

Google recently switched over to a paid model only. There is however a way to still get your translations for free.

The link below downloads a javascript file that includes a JSON string with your requested translation.

Simply format the link to your needed translation and you will be saying Hello there in every language. Congrats!

Thursday, March 1st, 2012 API Services, Javascript No Comments

Restart Zend Server on Mac OSX

From the terminal:

sudo /usr/local/zend/bin/ restart

Monday, February 6th, 2012 Unix/Linux No Comments

Doctrine Generate Models from DB

Automatically generating the models for a project based off of existing database tables is extremely handy. I’ve had to do this several times and the available options are key, especially when generating these for a Zend Framework layout. The following stack overflow entry is very helpful:

* Doctrine CLI script

define('APPLICATION_ENV', 'development');

define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));

set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
realpath(APPLICATION_PATH . '/../library/Doctrine'),

require_once 'Zend/Application.php';

// Create application, bootstrap, and run
$application = new Zend_Application(
APPLICATION_PATH . '/config/default.ini'


APPLICATION_PATH . '/modules/default/models/DbTable',
'pearStyle' => true,
'generateTableClasses' => true,
'baseClassesDirectory' => '',
'classPrefix'=> 'Model_DbTable_',
'classPrefixFiles' => false,
'baseClassPrefix' => 'Generated_'

Tuesday, November 15th, 2011 Doctrine, Zend Framework No Comments

How do I get the domain name from a full URL in MySQL?

I too had that same question friend. It is actually quite simple thankfully!

This little snippet should do the trick for you:

SELECT count(visit_id) as total_visits,
SUBSTRING_INDEX(TRIM(leading "http://" from TRIM(url_column_from_table)),'/',1) as url_visited
FROM url_visits


Thursday, August 11th, 2011 MySQL No Comments

Setting up your MAMP Environment for Zend Tool

I wanted to get a bit more familiar with Zend Tool and so I set out setting it up on my machine.

I am currently using MAMP Pro, with PHP 5.3.5.

You will need to copy the Zend library folder into:


And your Zend ‘bin’ folder contents into:


Then setup an alias in your terminal to reference the the file – to do so, run the following commands:
cd /etc
sudo vi profile

—- Then go down to the end of the file and paste:

alias zf=/Applications/MAMP/bin/php5.3/bin/
export PATH=/Applications/MAMP/bin/php5.3/bin/:$PATH
export ZF_HOME=/Applications/MAMP/htdocs

This will set your default project path to be in the htdocs folder, and your php version to reference the 5.3 instance in MAMP.

Save the file by hitting the Escape key, then type:

This will save and exit the file. Go ahead and close your terminal, and re-open it.

Try typing:
zf show version

You should now be greeted with the current version of the Zend Framework that the script is connected with.


After attempting to create a new zend framework project, I ran into a problem with the home path not being picked up correctly… So I had to set it at a deeper level within OSX – please see:


Thursday, June 30th, 2011 Uncategorized No Comments

SFTP OSX to Unix – Uploading/Downloading files remotely

I have needed this several times and always seem to forget the exact syntax and method to get the job done.

This website provides a great run-down!

Thursday, June 23rd, 2011 Unix/Linux 1 Comment

Multi Table Delete Syntax for MySQL

Today I needed to do a little clean-up in one of my applications that I re-vamped. There were several tables that had entries that were no longer relevant to the code base so I went about deleting them and any entries that were dependent upon them. It would have been a huge pain to have to go through each table and figure out which entries were associated, so luckily MySQL provides a simple solution. I did have to mess around with this a bit before it would work, mainly due to my prepending the database name in front of the table, ‘db_name.tb_name’, and for some reason that was not well liked… So I instead specified the database I wanted to execute this query on, and removed the database name and it worked like a charm. I needed to remove all references to a module that was no longer within the framework.

The actual query is the following:

DELETE aa, ac, am, aua, aga, ausp, agsp, asp, mi, a
FROM acl_action AS aa
INNER JOIN acl_controller AS ac ON (ac.acl_controller_id = aa.acl_controller_id)
INNER JOIN acl_module AS am ON (am.acl_module_id = ac.acl_module_id)
INNER JOIN acl AS a ON (a.acl_action_id = aa.acl_action_id)
LEFT JOIN acl_user_acl AS aua ON (aua.acl_id = a.acl_id)
LEFT JOIN acl_group_acl AS aga ON (aga.acl_id = a.acl_id)
LEFT JOIN acl_subprivilege As asp ON (asp.acl_id = a.acl_id)
LEFT JOIN acl_group_subprivilege AS agsp ON (agsp.acl_subprivilege_id = asp.acl_subprivilege_id)
LEFT JOIN acl_user_subprivilege AS ausp ON (ausp.acl_subprivilege_id = asp.acl_subprivilege_id)
LEFT JOIN menu_item AS mi ON (mi.acl_id = a.acl_id)
WHERE am.acl_module_id = 1;
Friday, June 10th, 2011 MySQL No Comments

HTML 5 Webkit Desktop Notification Code (Google Chrome Support Only… for Now.)

I was on gmail the other day and it prompted me to allow desktop notifications for my chat.. Hm, YES! It’s very helpful to have a popup come up as though it were built-in to the OS. Get’s your attention right away. So my next thought went to… How can I leverage this same benefit for my users? So I found a site that gave a great tutorial on how to do it, my example supplements it a bit, but the other is definitely worth a peek!

    if (!window.webkitNotifications) {
        alert('Sorry , your browser does not support desktop notification. Try Google Chrome.');

    function sendPermissionRequest(callback)

	function displayNotification()
		if(window.webkitNotifications.checkPermission() > 0){
		} else {

    	    var icon  = 'link_to_logo.png';
            var title = 'Routy Development';
            var body   = 'Kapow!';
            var popup = window.webkitNotifications.createNotification(icon, title, body);
            }, '15000');


	function displayHtmlNotification()
        if (window.webkitNotifications.checkPermission() > 0) {
        } else {
            var popup = window.webkitNotifications.createHTMLNotification('');
            }, '15000');

A few links that I had to also browse to when finding/installing this gem:

Friday, March 25th, 2011 Javascript, jQuery No Comments

Website Tour w/ jQuery Improved! Site Tour Plugin

Website Tour With jQuery

Recently I needed the ability to give an overview of some changes made on one of my web projects. I ran across the tutorial provided by CODROPS, and decided that it wasn’t quite as easy and modular as I would have liked…

So I re-did it!

Download the code from GitHub and enjoy!

Original code:

View the source code to really get an idea of how it works.

I added a feature that will save a cookie when the user ends the tour, or if they click remind me later, it will popup the next visit. It is also only a line to instantiate. VERY easy to use on multiple pages now.


Thursday, March 24th, 2011 jQuery No Comments

jQuery Image & Photo Galleries and Slideshow Plugins

Coin Slider

Slick Slider

Wednesday, February 9th, 2011 jQuery No Comments
[ad code=1 align=center]