iandouglas.com | senior web architect

CAT | howto

Even while I had my iPhone as my primary mobile device, I had been interested in a car dock of some kind that didn’t involve a suction cup to my windshield or dashboard that could power the device and play audio into my car speakers. A coworker at Armor Games has a neat device, and forwarded a link to it at mwave.com: The Pixxo PF-C001 All-in-One Hands-Free Car Kit and Charger for iPhone or iPod w/ FM transmitter. It’s $15-$25 at mwave.com, $27 on eBay at the moment, and there are several similar items on Amazon for $15+. I went to Fry’s Electronics looking for something similar and only found iPhone-related gear. While the Pixxo device has an additional USB port on the side of the FM Transmitter, it would be inconvenient to have to use that to charge the primary device that’s being docked once my Nexus One arrived. What to do?

First off, my apologies for lack of photos. I thought about documenting it while I worked, but it was late last night. However, I do need to replace some of my handiwork with proper stuff like heat shrink and insulated wires to cut down on some radio interference.

First, I cut the iPod/iPhone adapter from the Pixxo unit, and saw that there were 8 wires (red, black, white, green, yellow, brown, purple and orange). Next, I cut a micro USB cable and saw that while it was well shielded on the outside, inside the foil insulator were only four wires (red, black, white and green). I twisted the matching wires together, taped it up enough that nothing was shorted, and tested it in the car, and my Nexus One started charging. w00t

Only thing left was to trim the wires back as far as I felt comfortable, shorten up the micro USB plug, and get everything taped up better. Which worked like a champ, except that I had no electrical tape, and I’m sure that as good as blue 3M Painter tape is, actual electrical tape or heat shrink would do a much better job.

Then, I shortened and spliced a stereo 3.5mm audio cable, as the one that shipped with the Pixxo unit was about two inches two short.

The net result:

(hosted at picasa)

, ,

I learned a little something about nginx, a small footprint web server that is ideal for serving up mobile sites, or sites where you don’t want the heavy usage of Apache. Today, I needed to solve a problem where we redirected iPhone/iPod users to a different URL. Since nginx doesn’t use the old-style mod_rewrite rules, I had to learn how to enable redirection in the server.

Since nginx was already compiled with redirection support, I simply had to locate the correct configuration file and add a few lines of code, and away it went.

First, I checked out /etc/nginx/ and opened the site configuration file within the /sites-enabled/ path. For this example, let’s say the site was m.iandouglas.com:

# vi /etc/conf/nginx/sites-enabled/m.iandouglas.com

In here, I’d look for the ’server’ block and add my redirection rules:

server {
	listen      80;
	server_name m.iandouglas.com;
        root /var/www/m.iandouglas.com/public;

	# redirect iPhone/iPod users to the new iphone site
        if ($http_user_agent ~* '(iPhone|iPod)') {
                rewrite ^/$ http://m.iandouglas.com/iphone/index.html;
        }
.
.
.

Then a simple nginx restart:

# /etc/init.d/nginx restart

… and we were all set.

,

CNET posted a HOWTO video on how to enable a much broader Control Panel setup by creating a folder with a specific filename.

In a nutshell, create a folder in the root level of any drive, and call it “GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}” (without the quotes).

quick and simple: edit /etc/hosts
(or on Windows machines: C:\WINDOWS\system32\drivers\etc\hosts)
and add the following:

0.0.0.0 www.facebook.com facebook.com apps.facebook.com
0.0.0.0 www.myspace.com myspace.com
0.0.0.0 www.digg.com digg.com

etc. Add as many sites as you want. When you want to stop being productive at work, simply comment out those lines (like during a lunch break). Just be sure to uncomment the lines when you need to be productive again…

,

Get Adobe Flash playerPlugin by wpburn.com wordpress themes

 

March 2010
S M T W T F S
« Feb    
 123456
78910111213
14151617181920
21222324252627
28293031  

Archives

Theme Design by devolux.org