VMWare and USB 3

It took me a while to figure out why my external Seagate harddrive wasn’t working on Windows 7 and VMware Fusion 5. As it turns out, VMware Fusion 5 does not support USB 3.0 with Windows 71.

What is not intuitive — and frankly doesn’t make sense — is that VMware Fusion 5 will not automatically revert to USB 2.0 to attempt to support it.

The solution to this is to run your USB 3.0 capable device through a USB 2.0 hub, such as an Apple Keyboard with Numeric Keypad.

See also: http://communities.vmware.com/thread/415658


  1. you need Windows 8, per their features list “Microsoft Windows 8 required for USB 3 support” 

One Site To Rule Them All

I’ve spent a good chunk of time this week transitioning AFdN from a standalone WordPress site to be part of the ferguson.pw WordPress Multisite cluster.

This is more cool for me than you because I now only have to manage one WordPress installation for everyone, rather than two or more installations. Huzzah!

Some lessons learned:

  • Multisite cookies are the suck. Towards the end of the migration I ran into an issue where draft post previews were not working. I started running through my checklist of things that could be the cause, but nothing made sense. I eventually created a new user — notandrew — to see it was an issue limited my “super-administrator” capabilities and to my surprise notandrew could see the previews just fine. So I nuked all cookies for ferguson.pw domain and lo and behold everything worked.
  • When migrating a Standalone WordPress site to a Multisite and mapping the domain back to the original URL you can use the following Nginx rewrite to prevent breaking anything1:
            #rewrite for WordPress single site to multisite
            location /wp-content/uploads/ {
                    rewrite "^(/wp-content/uploads)/([0-9]{4}/[0-9]{2}/.*)" $1/sites/$blogid/$2;
            }

    Note: this is also predicated on using the Nginx Map{..} directive.

  • There’s a long standing bug with Nginx regarding the use of alias versus root. In the end I was able to use alias2 to host a special directory for TweetNest. Here’s the solution I ultimately arrived at:
            location /tweetnest {
                    alias /path/to/example.com/html/tweetnest;
    
                    rewrite  ^/tweetnest/sort /tweetnest/sort.php;
                    rewrite  ^/tweetnest/favorites /tweetnest/favorites.php;
                    rewrite  ^/tweetnest/search /tweetnest/search.php;
                    rewrite  ^/tweetnest/([0-9]+)/([0-9]+)/([0-9]+)? /tweetnest/day.php?y=$1&m=$2&d=$3;
                    rewrite  ^/tweetnest/([0-9]+)/([0-9]+)? /tweetnest/month.php?y=$1&m=$2;
    
    
                    location ~ \.php$ {
                            fastcgi_split_path_info ^(.+?\.php)(/.*)?$;
                            fastcgi_pass unix:/var/run/php5-fpm.sock;
                            fastcgi_index index.php;
                            include /etc/nginx/fastcgi_params;
                    }
    
            }
    

I also took the opportunity to clear out some cruft and update some look and feel stuff: redish/orangish theme, update profile, etc. Nothing should be broken, but you never know. Enjoy your weekend.


  1. in theory 

  2. which I believe is the correct way 

Countdown Timer v3.0.6

Sometime in June of 2012 I released version 3.0 of Countdown Timer. Before that, the last major release was version 2.4 in April of 2010.

I’ve just been busy with other things1. The other reason was that the program had grown from it’s modest roots as a single 321 sloc2 program to a multiple files (80% PHP / 20% JS) with 1,450 sloc. Managing all the files, testing, and integration is — well — hard and not fun. And no one pays me to do it.

It’s taken some time, but I’ve more or less completely redesigned how I develop PHP. I’ve switched to using Aptana, Git Hub, and FirePHP — a PHP integration into FireBug. This was a multimonth project to slowly learn a new way of developing, but it’s been fun! I just spent most of May 2012 essentially rewriting how Countdown Timer works. All the logic is ultimately the same, much of it was converting function and variables into appropriate classes. I’m somewhat particularly happy about being able to extend the DateTime class and use that, although the lastest bug fix release (v3.0.6) was released because of my new found hatred for the DateTime class.

Another big change from 2.4 was taking advantage of some of WordPress’ core i18n3 updates which make handling date and time information a bit easier. Version 3 (and the subsequent dot fix updates) haven’t been a big flashy update, things are more or less where you left them, but you should hopefully see some little things that make you smile and make your life easier. It’s always a challenge to keep making something truly better, but I still have a couple of things I want to implement. However, Countdown Timer is on GitHub and WordPress TRAC, I don’t want this to be code that’s hidden in a cave, so please fork, patch, push and pull away.

Anyway, version 3.0.6 is now out. It fixes some crazy bug with that developed sometime after PHP 5.2 was released that caused the “white screen of death.” There were three issues that I found:

  • WordPress is calling the sanitize callback twice…not sure if this is new behavior or not, but it was breaking things because the second time it was being called it was trying to sanitize a different type of input. I’ll probably need to rewrite the sanitize function in the future.
  • The DateTime class has been expanded and some of the new functions clashed with stuff I had written. PHP can’t overload functions, so instead it just barfs.
  • For some reason, if certain, presumably optional, methods of the new PHP DateTime class are missing, PHP will also barf. In particular, date4, timezone_type5, and timezone.

Anyway, several hours were spent backtracing the errors and providing suitable fixes. So, enjoy!

As per tradition:

Read more or download version 3.0.6!

Also, please consider that I spend several dozens hours making updates for each release…have you donated recently?


  1. which is to say that Countdown Timer has been pushed lower down my priority list 

  2. source lines of code 

  3. internationalization 

  4. which was never supposed to be exposed 

  5. also maybe a bug?