Has Your Windows Mobile 6.1 QuickGPS Stopped Working?

A few months ago, I had a very sudden and strange thing happen to the QuickGPS app on my Windows Mobile HTC Touch Cruise smartphone.  My GPS signal would take forever to get a signal and when I opened QuickGPS and clicked Download now I got the error “Connection failed. Please try again later”.  Needless to say, later didn’t help. It also said:

Download time: Not yet downloaded
Valid time: Expired

It happened if I was connected over 3G, GPRS, or through USB/ActiveSync. All other data networking is fine.  But nothing worked.   After many hours of googling I found this page. Basically, for some reason one or more of the phone’s registry settings are busted and need to be fixed (at least it was in my case).  I grabbed an application that let you edit the registry on the phone and then verified these registry settings – and my problem was fixed!

[HKEY_LOCAL_MACHINE\Software\HTC\QuickGPS]
"RemindTime"="02151010034724"
"Bias"=dword:fffffed4
"ExpiredTime"=dword:00002760
"folder"="\Windows\"
"region"="US"
"INIDate"="20060531"
"remind"=dword:00000001
"actSync"=dword:00000001
"auto"=dword:00000000
"NotifyID"=dword:00001960
"INIFile"=""
"path"=""
"EEFile"="xtra.bin"
"curRegion"=dword:00000000
"curIP"=dword:00000000
"pwd"="1"
"authname"="1"

If editing the registry doesn’t sound like your kind of thing, someone in the forum of the above link has a cab file that makes the changes for you.

How To Install Phusion Passenger on a CentOS/cPanel Box

The Usual Disclaimer
Please beware that even if these instructions work, that they may break your setup.  While these worked fine for me, you should take extreme care applying them to your situation.  Follow these instructions at your own risk. They work fine for me on a CentOS 4.6 box with cPanel 11.23.4-R26138 and WHM 11.23.2.

First off, Phusion Passenger only works with Apache 2.x so if your server doesn’t have that thats the next thing you’ll have to do.  T o upgrade Apache, go to your main control panel at https://server.ip.address:2087/ and click the “Apache Update” link on the left.  If given the option, I highly recommend that you choose Apache 2.2 instead of 2.0.

Next, download Passenger. Assuming you already have Ruby and RubyGems installed on your server, simply run (as root) gem install passenger. This will pull the passenger library and code down to the server and place it with your other RubyGems.  It’s important to know that this does not install Passenger into Apache, so obviously its non-operational.  If you don’t have Ruby and RubyGems, you’re way too far down the line with reading this article and need to get up to speed with actually getting those on to your box.  Google can help with that!

At this point it’s probably useful to have the Passenger User Guide up on screen, just for reference.

Third, you need to compile and install the Passenger module within Apache. This sounds worse than it is, but before you do it, it is important to set a couple of environment variables to make it work properly.  In your SSH console type thrse two commands into it:

export APXS2=/usr/local/apache/bin/apxs
export APR_CONFIG=/usr/local/apache/bin/apr-1-config

Next, run:

passenger-install-apache2-module

It might take a few minutes, but if everything goes well you’ll eventually end up with Passenger telling you to add a few lines to your Apache configuration file (the code you get may differ slightly):

LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-2.0.2/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-2.0.2
PassengerRuby /usr/local/bin/ruby

However, despite what it tells you, do not put it in the httpd.conf file – cPanel can rewrite that file and your changes can be lost breaking your passenger configuration and virtual site.  Instead, add it to /usr/local/apache/conf/includes/pre_virtualhost_global.conf – this file might not exist until you make it, but that’s okay.

Lastly restart Apache and if you didnt get any critial errors, you should be in business.  I have had issue on other servers where the Rails app failed to load because the RubyGems version was too old, so keep your eye on the error_log file if Apache starts but it still doesn’t work.  Also refer to the Passenger User Guide for further configuration and usage information.

Solve uninitialized constant ApplicationController in Rails 2.3

So I am casually writing my Ruby on Rails application, like I have a million times before on the newest version of Rails (which at time of writing, was version 2.3).  So I open up an blank project with some code I use in all my Rails apps, and copy over the relevant files, and replace the application_crontroller.rb with application.rb.

But as it turns out, there were some major changes with 2.3, not the least being that the application controller is no longer called application.rb Now it’s referred to as application_controller.rb.

So it’s easy to fix, just rename the file or, it you’re into scripty goodness, run:

rake rails:update

Be sure to update your server stack before deploying. Obviously if you rename the file to get it working on Rails 2.3 and upload to a Rails 2.2 server you’ll be in trouble. Don’t forget that Rails 2.3 also requires a new version of Phusion Passenger!

How to recover from Windows Server 2003 Event IDs 1168 and 1003

Recently at the office we had a brown-out with devastating consequences.  All our servers are managed by UPSes and on this particular occasion, at the precise moment of this brownout the UPS failed and server lost power abruptly.  This caused some error in Directory Services, becasue after the boot the Windows Server 2003 (and primary domain controller) showed a message during bootup (but after logon) saying “The Active Directory is rebuilding indices”, just before network connection preparations. It hadn’t done this before.

After several hours waiting for this to go away (the server seemed responsive during the process so we left it) nothing changed.  We forcibly reboot the machine and it booted into Safe Mode automatically.

After several reboots and a scheduled CHKDSK /f on bootup, nothing changed, so we booted into Directory Services Repare mode to investigate further.  Now, looking through the event log showed that even more things were going wrong including the computer name being missing the domain being all messed up and an array of other issues, the most worring being several Event Id’s 1168 and 1003.

After a bit of googling I found this page, and based on my own knowledge condensed and modified the solution to work in my case:

  • First, boot the machine into Directory Services Repair Mode
  • Next, open a command window.
  • Then, type the command: cd %SystemRoot%\Ntds
  • Execute the command: Esentutl.exe /p Ntds.dit for me this took 8.3 seconds to execute.

Basically, the esentutl.exe is a utility used to perform various administrative actions on any databases using  Microsoft Proprietary Database format.  The Directory Services Database uses this format.  The ‘/p’ argument tells the utility to perform a “repair” on the second argument, which obviously is the database file.

Warning: The Ntds.dit file is the heart and soul of Active Directory on your domain.  Take extreme care with this file because if you don’t have an adequate backup of the system state on the domain controller, you may irrecoverably corrupt your domain.  This would be bad.

In my case, everything went smoothly, and the domain was back up after a reboot back into “normal” mode.  Obviously, we changed the UPS with a working one.  Who says network admins never get a happy ending?

Apple’s Magic Mouse Now Running Properly Under Windows

As I’ve indicated earlier, I am a massive fan of Apple’s Magic Mouse.  While it does carry a heavy price tag, I thought it was completely worth it.  But a sad draw-back was that under Windows (pecicially Boot Camp), the mouse only works as a standard 2 button mouse.

But thanks to a little hackery from Apple’s Bluetooth Update (located here) the Magic Mouses driver was extracted via WinRar resulting in a 32bit version and a 64bit version that you can install on any ordinary Windows PC that will enable all the scrolling ‘magic’ of the Magic Mouse.
lasertracking_20091020

Explore the Twitterverse with Mentionmap

I’ve just stumbled across a neat little web application which allows you to visually explore your Twitter network. It allows you to discover which people interact the most and what they’re talking about, as well as traverse the Twitter-verse and finds links to people you might otherwise not have found. Think “six degrees of separation” for your Twitter followers.

The visualization runs right in your browser and displays data from the Twitter API.  According to the maker, Asterisq, it works like this:

Mentionmap loads each user’s Twitter status updates (tweets) and finds the people and hashtags they talked about the most. The data is displayed using Constellation Framework, a graph visualization library for Actionscript.

In this data visualization, mentions become connections and discussions between multiple users emerge as clusters.

Clicking a user will display their network of mentions as well as details from their profile. You can also search for friends by typing their Twitter user-names into the search box.

Mentionmap - A Twitter Visualization

I think this visualization is really neat, and I’d really recommend you check it out and have a play.  I found it very interesting to see the relationships between the people I primarily converse with on Twitter.

MagicPrefs – Making the Magic Mouse Even More Magical

500x_magicprefs
MagicPrefs is a free menubar application which aims to improve the functionality and configuration options of the Apple Magic Mouse.

  • It features the ability to bind a variable number of finger clicks, taps, swipes, pinch and other gestures to functions like Middle Click , Hold Down Both Mouse Buttons , Spaces , Expose, Dashboard etc.
  • Touch Sensitivity implements a single point control for a number of factors impacting the algorithms of the taps, swipes, pinche and other gestures.
  • Tracking Speed adds the ability to increase the maximum mouse speed by a extra 200%.
  • Also featured is a real-time display of the fingers touching the surface of the mouse that you can enable to test

You can download it, here for free.

(Via Gizmodo)

10 Absolute *must have* WordPress Plugins

Akismet

Akismet checks your comments against the Akismet web service to see if they look like spam or not and lets you review the spam it catches under your blog’s “Comments” admin screen.

3

Google Sitemap Generator

This plugin will generate a special XML sitemap which will help search engines like Google, Bing, Yahoo and Ask.com to better index your blog. With such a sitemap, it’s much easier for the crawlers to see the complete structure of your site and retrieve it more efficiently. The plugin supports all kinds of WordPress generated pages as well as custom URLs. Additionally it notifies all major search engines every time you create a post about the new content.

2

Echo

Echo is the next generation commenting system. It’s the way to share your content, and watch the live reaction. You can quickly embed Echo on WordPress, Blogger, or any website and turn your static pages into a real-time stream of diggs, tweets, comments and more.  It’s not free, but it *is* cheap and worth every dollar.

echo

WordPress Super Cache

This plugin generates static html files from your dynamic WordPress blog. After a html file is generated your webserver will serve that file instead of processing the comparatively heavier and more expensive WordPress PHP scripts.

12

Easy AdSense

Easy AdSense provides a very easy way to generate revenue from your blog using Google AdSense. With its full set of features, Easy AdSense is perhaps the first plugin to give you a complete solution for everything AdSense-related.

11

Google Analytics for WordPress

The Google Analytics for WordPress plugin automatically tracks and segments all outbound links from within posts, comment author links, links within comments, blogroll links and downloads. It also allows you to track AdSense clicks, add extra search engines, track image search queries and it will even work together with Urchin.

10

Add to Any: Share/Bookmark/Email Button

Help readers share, save, bookmark, and email your posts and pages using any service, such as Facebook, Twitter, Digg, Delicious, and over 100 more social bookmarking and sharing sites. The button comes with AddToAny’s customizable Smart Menu, which places the services visitors use at the top of the menu, based on each visitor’s browsing history.

6

Twitter Tools

Twitter Tools is a plugin that creates a complete integration between your WordPress blog and your Twitter account.

17

Broken Link Checker

This plugin will monitor your blog looking for broken links and let you know if any are found.

14

FD Feedburner Plugin

The Feedburner Plugin redirects the main feed and optionally the comments feed to Feedburner.com. It does this seamlessly without the need to modify templates, setup new hidden feeds, modify .htaccess files, or asking users to migrate to a new feed. All existing feeds simply become Feedburner feeds seamlessly and transparently for all users. Just tell the plugin what your Feedburner feed URL is and you’re done.

If you used blogger, you no doubt integrated your feed with Feedburner, seeing as Google bought it and integrated it, as it adds some wonderful
functionality to your feed with the ‘Add to Del-ici-ous… Digg… Email…. Technorati’ etc, but also its AUTOMATIC pinging to different news services, and sites to tell them you have new content. It also splices in flickr, del-ici-ous or furl, it adds Google Adsense to your posts and so much more. So you will more than likely want to keep this and so it lets you redirect your wordpress feed to your own unique wordpress feed, therefore keeping the AUTOMATED updates and subscribers are none the wiser it is coming from a different blogging platform.

Just need to go into feedburner configuration under appearance to set the feeds and redirects (took me a while to find it, prob should have read
installation. ;o)