Category Archives: Uncategorized

Refresh Typeahead Suggestions

var $name = $('#name');
var nameEntered = $name.typeahead('val');
$name.typeahead('val', '').typeahead('val', nameEntered);

This is great if you add an entry behind the scenes and then want it to show up in the list of suggestions without having to re-trigger the suggestion refresh manually.


OS X Mavericks Breaks Apache/PHP

I had some issues with my local Apache/PHP dev sites after installing OS X Mavericks. To get back up and running again I had to do the following.

Re-enable PHP5
Uncomment the PHP5 module in the Apache configuration file httpd.conf. The following line should be uncommented:

LoadModule php5_module libexec/apache2/

Include the Virtual Hosts File
I have my virtual hosts configured using the httpd-vhosts.conf file so I had to uncomment the following line in httpd.conf:

Include /private/etc/apache2/extra/httpd-vhosts.conf

Setup the Directory Restrictions
Instead of tweaking the general settings in httd.conf, I specified what to open up right on my site’s virtual host settings in httpd-vhost.conf:

<VirtualHost *:80>
    DocumentRoot "PATH_TO_SITE
    ServerName site.local
    <Directory "PATH_TO_SITE">
        Options Indexes FollowSymLinks Includes ExecCGI
        AllowOverride All
        Order deny,allow
        Allow from all

Restart Apache

sudo apachectl restart