Sunday, December 2, 2007

Use ffmpeg to extract first image out of FLV

I found at least one other person trying to find a way to extract a JPG snapshot out of a flash video using ffmpeg.

The above article suggests using ffmpeg to extract a PNG, and then convert that to a JPG (since the JPG will be much smaller). Instead, just use the correct arguments to ffmpeg:


ffmpeg -i movie.flv-vcodec mjpeg -vframes 1 -an -f rawvideo -s 320x240 movie.jpg


With -vcodec mjpeg the important argument.

Monday, November 19, 2007

Rails' attachment_fu, :thumbnail_class and you

I was having a bit of trouble with attachment_fu that took a while to figure out, so I thought I'd post my solution for the next person.

I have a Photo model that I'm using to store pictures. Since attachment_fu will automatically resize, create thumbnails, and store pictures on the file system, it was an easy choice to use it. The things I found I didn't like about it:

  1. It stores thumbnails as separate records inside the photos table. This means you have to check if thumbnail.nil? each time you display the pictures, and you'll have to check parent_id.nil? to count your photos.

  2. You can't use your own model validations. For example, I wanted to use



validates_presence_of :name
validates_presence_of :description

But I'd always get validation errors because attachment_fu tries to save the thumbnail attributes when it creates or resizes a thumbnail. As you can imagine, this is a major problem.

:thumbnail_class to the rescue


Mike Clark's attachment_fu blog post mentions that you can use the :thumbnail_class argument to separate your model validations and attachment_fu's validations. Here's how to do it:

class Photo < ActiveRecord::Base
has_many :thumbnails, :foreign_key => 'parent_id'

has_attachment :storage => :file_system,
:content_type => :image,
:max_size => 10.megabytes,
:resize_to => '640x480',
:thumbnails => { :thumb => '100x100' },
:thumbnail_class => Thumbnail

# Validations
validates_presence_of :name
validates_presence_of :description
end

class Thumbnail < ActiveRecord::Base
belongs_to :photo, :foreign_key => 'parent_id'

has_attachment :storage => :file_system,
:content_type => :image
end

The killer for me initially was that I wasn't specifying has_attachment in the Thumbnail model. I always got this error:

undefined method `temp_path=' for #thumbnail:0xb69a9514

So save yourself by putting has_attachment in both models. Make sure to define any attachment_fu arguments in your Photo model, and leave the Thumbnail model bare. You'll also want to make sure you have the normal attachment_fu schema in both models:

t.column :parent_id, :integer
t.column :content_type, :string
t.column :filename, :string
t.column :thumbnail, :string
t.column :size, :integer
t.column :width, :integer
t.column :height, :integer

I've found that everything seems to be working as normal going this route. My model validations work and the thumbnails are not polluting the photos table. If you want to find the Photo for a particular Thumbnail, keep in mind that parent_id now refers to the id in the Photo model:

t = Thumbnail.find .... # find your thumbnail
p = Photo.find(t.parent_id)

And for the ultimate ease-of-use relationship, just use:

t = Thumbnail.find .... # find your thumbnail
p = t.photo # get a photo
p.thumbnails # get all thumbnails

This works since we defined the has_many relationship in the model.

Let me know if you have any problems with this method or if it helped you!

Sunday, November 4, 2007

Serve home directories to internal IPs only with lighttpd

Recently, I decided I wanted to share home directories via HTTP to everyone on my home network. This is an easy way to share files with Windows machines where you don't have any type of sshfs-like support. The problem was that this file/web server also faces the Internet. Obviously I don't want to share our personal files to anybody who cares to look. After a bit of playing, I came up with this configuration:

$HTTP["remoteip"] != "192.168.1.0/24" {
$HTTP["url"] =~ "^/~" {
url.access-deny = ( "" )
dir-listing.activate = "disable"
}
}

This allows any host with an IP in the 192.168.1.1-254 range view any URL that begins with /~username. It denies everyone else with a 403 - Forbidden message. Note that for some reason, listing the conditions in the opposite order (url first, remoteip second) did not produce the correct results.

Finally, make sure that you have both the appropriate modules enabled:

server.modules += ( "mod_access", "mod_userdir" )

Wednesday, October 24, 2007

Google IMAP will be a Yahoo mail killer!

If you haven't heard already, Google with be and is offering IMAP for their Gmail service! You might not have it available on your account immediately, but it should be within a few days or a week.

I'm one of the lucky ones that already has IMAP set up. I tried it out in Thunderbird and the setup was quite smooth. The only problem I ran into is that some of my old chats came up with a timestamp of 2:33am this morning. So, they were out of order and weird, but it wasn't that big of an issue.

The real point I wanted to make in this post is that this will be a killer (imo) for Yahoo mail. Back in the day when I signed up for Yahoo mail, they were on the leading edge for features and interface. I remember when they moved to the interface they have which they now call their 'classic' interface, and I have saved HTML pages that show what their REAL classic interface looks like.

But until now I have not had a reason to move to Gmail. While I do have a Gmail account, I don't use it as my primary account because there was no real advantage to switch to it. Some of the features might be nicer and sexier, but webmail is still webmail. Now that Gmail offers IMAP along with a host of other features that set it apart from other webmail clients, there is a huge reason to move to Gmail. For this reason, Yahoo will lose many 'techie' customers it hasn't already lost unless it offers the same feature.

In case you're curious, here are the settings:

Incoming: imap.gmail.com
Outgoing: smtp.gmail.com
Username: username@gmail.com
SSL: yes

Have fun!

Saturday, October 20, 2007

LDS General Conference Podcast RSS feed

LDS General Conference audio and video is available via podcast!

After watching conference the LDS General Conference at the beginning of October, I really wanted to download all the talks via an RSS feed. I didn't see one available right away, so I considered making my own. Fortunately, I found that an official podcast does exist. Its just not publicized well by the Church.

MP3 audio: http://feeds.lds.org/ldsgccomplete_eng

Video: http://feeds.lds.org/ldsgccomplete_eng_mp4

This should get you the most recent General Conference. If you haven't used RSS before, you just need to give either (or both) of the above feed URLs to a podcast downloader (such as iTunes). The downloader will download all the current talks, and theoretically, will download the new talks next conference.

As an unrelated side note, feeds.lds.org is actually hosted by feedburner. Thanks to ldswebguy for originally posting these podcast feeds.

Friday, October 19, 2007

Verizon FIOS and running a Linux operating system

Despite the well known fact that Verizon Can't Do Math, I have to say that I am surprised to find that their FIOS service is pretty good. I've had it for over a month, and haven't noticed it go down or have any speed problems.

More interestingly, I've actually found that they are pretty Linux-friendly. Actually, Linux-friendly might be too strong - lets just say that they have not locked me into using Windows for their service. I did have to use activatemyfios.verizon.net, which has a Windows/OS X only Firefox extension. But other than that, I haven't felt the vendor lock-in blues.
Here are some good points:

  • As far as I can tell, Verizon only blocks port 80. I run both SSH and HTTPS from my home box.

  • Once I spoofed the correct MAC address, I was able to use my own non-Verizon router

  • There is no PPPoE authentication or the like

  • My IP address has not changed since I started the service

  • Latency is very low (about 12ms to Google)

  • Service has not gone down


I don't use their phone or TV services, so I can't comment on those. My guess would be that services like Vonage or Skype would work pretty well on my FIOS connection.

Bad points:

  • The backup battery is supposedly pretty weak. It only provides voice service during a power outage, not Internet. For that, you'd have to use a UPS. Fortunately, I haven't had the power go out.

  • It took forever to get the service installed. Even though the previous house owner already had FIOS installed, they couldn't come out for 2.5 weeks.


Verizon does pretty well here. So if you're thinking about switching - I would recommend it.

Thursday, October 18, 2007

How to create a lookup table in Ruby on Rails

I'm a big fan of the Rails way, but sometimes the simple things get you. I like to set up "lookup tables" in Rails, ie. tables in the database that hold commonly used, (often) fixed values. For example, if I have a Car model, I might want to define a Car type model. This would have two purposes:

  1. Give me the ability to associate a type with the Car model (ie. Car.type => 'sport')

  2. Pre-load common values into the database (ie. sport, coupe, sedan, etc)


New version of Rails available

If you didn't know already, there is a new version of Rails out there.

And I'm not referring to the Rails 2.0 preview. This is Rails 1.2.5, which contains fixes for a JSON XSS (cross-site scripting) vulnerability. I'm not horribly familiar with the details, but the site does say that you don't have to worry about it if you're not using JSON. Probably a good idea to upgrade anyway.

Monday, October 15, 2007

Who the heck is 142.166.3.122 and 142.166.3.123 (radianrss-1.0)?

I've been perusing through my logs lately and found the user agent "radianrss-1.0" numerous times. I'd never heard of this program (maybe an RSS reader?), so I did a google search. The only commentary I found was this post speculating that 142.166.3.123 was possibly involved in the compromise of katester.net.

Interestingly enough, the rest of the search results are the traffic statistics pages of various Wordpress blogs around the Internet. There doesn't seem to be a clear answer for what "radianrss" is, or why 142.166.3.122-123 is constantly indexing all of my blog posts.

Sunday, October 14, 2007

If you're not already, START USING DD-WRT!


==========================================================

____ ___ __ ______ _____ ____ _____
| _ \| _ \ \ \ / / _ \_ _| __ _|___ \|___ /
|| | || ||____\ \ /\ / /| |_) || | \ \ / / __) | |_ \
||_| ||_||_____\ V V / | _ < | | \ V / / __/ ___) |
|___/|___/ \_/\_/ |_| \_\|_| \_/ |_____|____/

DD-WRT v23 SP2
http://www.dd-wrt.com

==========================================================

I installed dd-wrt on my Linksys WRT54g because I was having problems with the Sveasoft Alchemy firmware. The wireless was dropping constantly, which can be real annoying when you're trying to do a video call on Skype. My suspicion was that the firmware image was too large and too many services were trying to be run at once, and the unit was running out of memory.

Once long ago I had problems with the Alchemy firmware getting an IP address from my DSL connection. I managed to get syslog working (shouldn't have been hard, but it didn't work well with Alchemy) and the errors seemed to point to the fact that the unit was running out of memory. It would eventually work, it just took 20 minutes to get an IP address after it booted. Then it would stay up for months.


dd-wrt status page


I guess I've just been out of the loop with regard to the newer firmwares. dd-wrt has much of the same basic functionality in their 'mini' version as the Sveasoft Alchemy fully featured version did. And to think that at point I paid for Alchemy because I wanted a more featureful, stable firmware :|

The wireless issues have gone away, and the web interface has a much more polished feel to it. I like logging into the router just to look at the interface and see the random stats. It also gives you status on the signal strength of the wireless clients, which can be very useful!

The dd-wrt firmware is famous for being able to do client mode bridging, i.e. act as a transparent wired-to-wireless bridge. I'm looking forward to trying that out some day.

By the way, although my unit will broadcast at a power of 251mW, I read on the dd-wrt wiki that 84mW is ideal for most hardware in terms of getting the best signal-to-noise ratio. At 84mW, I get a SNR of somewhere between 30-40, so I feel like that is probably pretty accurate information, considering I probably only need a SNR of 10-15 to get a very good wireless signal.

Try out dd-wrt today!

Slow SSH logins in Ubuntu Feisty (7.04)

There are two major reasons (I know of) that can cause extremely slow SSH logins - anywhere in the range of 15-30 seconds. It doesn't seem like a long time, but it takes forever to wait that out sitting at the terminal.

Say no to GSSAPIAuthentication


For some reason, GSSAPIAuthentication is turned on by default in Ubuntu Feisty (7.04). If you ssh -v somewhere.com, you'll see this in the output:
...
debug1: Local version string SSH-2.0-OpenSSH_4.3p2 Debian-8ubuntu1
debug1: An invalid name was supplied
Cannot determine realm for numeric host address

debug1: An invalid name was supplied
A parameter was malformed
Validation error

debug1: An invalid name was supplied
Cannot determine realm for numeric host address

debug1: An invalid name was supplied
A parameter was malformed
Validation error

debug1: SSH2_MSG_KEXINIT sent
...

There are two ways to fix it. You can edit either /etc/ssh/ssh_config to include
GSSAPIAuthentication no

Or, you can edit ~/.ssh/config and add the same line. The only difference is that /etc/ssh/ssh_config will affect all systems users - probably a good thing.

Slow/broken DNS lookups


Each time you log into an OpenSSH server, it will typically perform a reverse-lookup on your IP address and store it in wtmp (try running the command "last"). If that DNS lookup times out, you'll be in for a big delay. Whats worse, OpenSSH has a habit of performing the lookup 3 or 4 times, further extending the delay to 30 seconds or more.

Its generally best to fix the source of the problem by fixing whatever problem exists in your DNS infrastructure. This could be as simple as pointing /etc/resolv.conf to the correct nameserver.

If you're really in a bind, you can pass the -u0 flag to sshd. Unfortunately, the sshd man page does not reveal any config file options to accomplish the same thing. But, the -u0 flag will stop sshd from performing any lookups that are not absolutely necessary as part of the authentication mechanism.

Saturday, October 13, 2007

Use ps2pdf to create PDFs from any Linux application

If you want to share a PDF of a web page or any other document with another person, PDF is usually the way to go. There are free PDF printers out there for Windows, but fortunately the necessary software is probably already installed on your Linux distribution. Just use ps2pdf.

First, print from your application (ie. Firefox) and make sure to check "Print to file":

Print to file

Press Print, save the file as filename.ps , and then run the following command:

$ ps2pdf filename.ps

The resulting file will be filename.pdf.

This is also a good way to convert old PS files (which can get pretty large) to the smaller PDF format. And, if for some reason you want to go the other direction, you can always use the pdf2ps utility.

Friday, October 12, 2007

Rails' ruby script/console has tab completion!

While I recently found out about Ruby's 'methods' method, I also found that Rails' "ruby script/console" will do tab completion:

>> a = Array.new
=> []
>> a.
Display all 157 possibilities? (y or n)
a.fetch a.method a.slice
a.__id__ a.fill a.methods a.slice!
a.__send__ a.find a.min a.sort
a.all? a.find_all a.nil? a.sort!
a.any? a.first a.nitems a.sort_by
a.assoc a.flatten a.object_id a.split
a.at a.flatten! a.pack a.subclasses_of
a.b64encode a.freeze a.partition a.sum
a.blank? a.frozen? a.pop a.suppress
a.class a.gem a.pretty_inspect a.taguri
a.clear a.grep a.pretty_print a.taguri=
a.clone a.group_by a.pretty_print_cycle a.taint
a.collect a.hash a.pretty_print_inspect a.tainted?
a.collect! a.id a.pretty_print_instance_variables a.to_a
a.compact a.in_groups_of a.private_methods a.to_ary
a.compact! a.include? a.protected_methods a.to_default_s
a.concat a.index a.public_methods a.to_formatted_s
a.copy_instance_variables_from a.index_by a.push a.to_json
a.daemonize a.indexes a.rassoc a.to_param
a.dclone a.indices a.reject a.to_s
a.decode64 a.inject a.reject! a.to_sentence
a.decode_b a.insert a.remove_subclasses_of a.to_set
a.delete a.inspect a.replace a.to_xml
a.delete_at a.instance_eval a.require a.to_yaml
a.delete_if a.instance_exec a.require_gem a.to_yaml_properties
a.detect a.instance_of? a.require_library_or_gem a.to_yaml_style
a.display a.instance_values a.respond_to? a.transpose
a.dup a.instance_variable_get a.returning a.type
a.each a.instance_variable_set a.reverse a.uniq
a.each_index a.instance_variables a.reverse! a.uniq!
a.each_with_index a.is_a? a.reverse_each a.unloadable
a.empty? a.join a.rindex a.unshift
a.enable_warnings a.kind_of? a.select a.untaint
a.encode64 a.last a.send a.values_at
a.entries a.length a.shift a.with_options
a.eql? a.load a.silence_stderr a.yaml_initialize
a.equal? a.map a.silence_stream a.zip
a.extend a.map! a.silence_warnings
a.extend_with_included_modules_from a.max a.singleton_methods
a.extended_by a.member? a.size

Unfortunately the same thing doesn't work for the irb. Of course you can always

a.methods.sort

to see the same information.

Wednesday, October 10, 2007

Convert has_and_belongs_to_many to a has_many :through association

So there are plenty of resources out there to learn how to use has_many :through associations.

I followed them over and over again but couldn't get my code to work. I knew I had the basic structure setup correctly, since the examples are pretty straightforward, and the concept is not difficult. My has_and_belongs_to_many code originally looked like this:

class Soda < ActiveRecord::Base
has_and_belongs_to_many :distributors
end

class Distributor < ActiveRecord::Base
has_and_belongs_to_many :sodas
end

Of course there was also a many-to-many join table migration:

class DistributorsSodasJoinTable < ActiveRecord::Migration
def self.up
create_table :distributors_sodas, :id => false do |t|
t.column :soda_id, :int
t.column :distributor_id, :int
end
end

def self.down
drop_table :distributors_sodas
end
end

This works quite nicely:

>> Soda.find(1).distributors
=> []

Later found that I needed to add attributes in the join table to associate extra fields on the Distributors <-> Sodas relationship. has_and_belongs_to_many does not have a Rails way to access those extra fields in the join table. I've successfully done it through SQL, but much guilt and remorse lead me to finally learn has_many :through.

This was my best initial attempt:

class Soda < ActiveRecord::Base
has_many :distributors_sodas
has_many :distributors, :through =>; :distributors_sodas
end

class Distributor < ActiveRecord::Base
has_many :distributors_sodas
has_many :distributors, :through => :distributors_sodas
end

class DistributorsSodas < ActiveRecord::Base
belongs_to :soda
belongs_to :distributor
end

All goes well until I try to do a quick test:

>> Soda.find(1).distributors
NameError: uninitialized constant Soda::DistributorsSoda
...
from (irb):4

Umm... what? I never tried to instantiate an object of the type Soda::DistributorsSoda. Instead, I was simply trying to use the DistributorsSodas ActiveRecord object, right?

It turns out that has_many :through (apparently) can't handle using the join tables created by has_and_belongs_to_many. Its just a naming issue - has_many :through will work fine using a one-to-many join table like distributor_sodas (note the missing 's' on distributor). If you need a many-to-many join, you have to rename the table to fix the (pluralization?) problem. I deleted the DistributorsSodas model and created the Store model.

class Soda < ActiveRecord::Base
has_many :stores
has_many :distributors, :through => :stores
end

class Distributor < ActiveRecord::Base
has_many :stores
has_many :sodas, :through => :stores
end

class Store < ActiveRecord::Base
belongs_to :soda
belongs_to :distributor
end

This proved a much better result:

>> Soda.find(1).distributors
=> []

In the end, the association naming convention actually make more sense. I was bummed to have to change the table/model names though.

Please comment if you know how to create the association without changing the model name.

Monday, October 8, 2007

Use Mozilla Firefox under WINE to reach those Windows-only sites

Being denied based on operating system

Its long been known that you can use something like the User Agent Switcher to make it appear like you're using a different operating system than you really are. This can be useful on some websites that insist you need to run Windows - when in fact Linux or practically any other operating system will work fine.

But for those sites that are actually telling the truth, you can often run Firefox under WINE with very good results. Just head over to www.getfirefox.com and download the Windows binary. The site actually does its own OS detection, so you'll probably want to choose "Other Systems and Languages." Once you have it, make sure you have WINE installed. I also installed the MS truetype fonts because it looks terrible otherwise.

# apt-get install wine msttcorefonts

And then start the installer

$ wine Firefox\ Setup\ 2.0.0.7.exe

You'll go through the normal install process, and when you're finished you'll see a new Firefox icon on your Linux desktop:

Windows Firefox on my Linux desktop

Double-click it and you should be good to go! If you want to visit a site with audio, you'll want to run winecfg, visit the Audio tab, choose your settings (I just left the defaults) and click Apply. Otherwise you might run into some issues with Firefox crashing. If its any consolation, Firefox will crash on certain sites powered by Move Networks in Windows, too, if there is no audio driver installed. This is probably related to the Firefox extension you must install to view the site.

Sunday, October 7, 2007

Apt-get DOES have an option for automatic security updates

I recently wrote about the cron job that I run to keep my Debian and Debian-like servers up to date automatically.

It turns out that apt-get (or libapt, more specifically) has a mechanism to automatically download and install security updates. This will work across package management applications (apt-get, synaptic, aptitude, etc) and is very simple to setup. Edit /etc/apt/apt.conf.d/10periodic to include the following:

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "0";
APT::Periodic::Unattended-Upgrade "1";


Your distribution should already have a cron job (usually in /etc/cron.daily/apt) that runs every day and updates as per these configuration options. To see the entire config, run

$ apt-config dump

For those interested, this configuration setting is what Synaptic sets when using its "Install security updates without confirmation" option.

Thanks to g for pointing this out.

Saturday, October 6, 2007

The new Ubuntu is coming already

If you didn't already know, Ubuntu 7.10 Gutsy Gibbon will be coming soon!



Maybe I'll finally get suspend support for my dual core Dell XPS desktop?

Any guesses if the Ruby and Rails packaging will be any better?

Thursday, October 4, 2007

Using syntax enable and other vim commands in Ubuntu and Debian

So I ran into the strangest thing today. Vim complains because I tried to use 'syntax enable' in my .vimrc.

$ vim myfile.rb
Error detected while processing /home/solipsistic/.vimrc:
line 1:
E319: Sorry, the command is not available in this version: syntax enable
Press ENTER or type command to continue

Apparently Debian-like distributions don't package the full version of vim by default. They pack a 'lite' version.
# apt-get install vim

And you'll be rolling again.

Tuesday, October 2, 2007

Installing Mongrel on Ubuntu Feisty with rubygems

When I recently re-installed Ubuntu 7.04 (Feisty), I found that I couldn't build the native fastthread gem (a required dependency). If you get this error:

Building native extensions. This could take a while...
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:1


ERROR: While executing gem ... (RuntimeError)
ERROR: Failed to build gem native extension.
Gem files will remain installed in /var/lib/gems/1.8/gems/fastthread-1.0 for inspection.

then you need the ruby development libraries and the build-essential package. I've found that these commands will make sure mongrel (and rails) is installed correctly:

$ sudo apt-get install ruby1.8-dev rubygems build-essential rails
$ sudo gem install mongrel --include-dependencies

Monday, October 1, 2007

Using the Ubuntu Feisty Live CD as your primary OS

I had one of the most dreaded computer woes happen last week - my hard drive crashed.

Well, it didn't crash completely. I have about a 70% boot rate. It makes a load noise like the bearings aren't well lubricated when the drive won't boot. I figured it was better (and less frustrating) to stop using the drive and just wait until the new hard drive arrived.

Luckily, I use unison over SSH to backup my files, so everything was already mirrored on my Debian file server at home, even though I was across the country when the failure occured. I've reminded myself that I needed to have my data backed up if something catastrophic ever happened to my laptop. In my mind the scenario was that my laptop was going to be run over by a truck (gotta think big), but I knew the hard drive crash was probably inevitable. Unison is a good tool to sync two file systems, however it does work best if you manually sync. If you want something to automatically back up files, set up rsync as a cron job on your system.

Coping with the problem


At first, I thought I should just go without my laptop for a few days (oh the horror!). Newegg ships fast, right? I should have known myself better than that. I immediately started thinking of how to run my system with a broken hard drive. Naturally, the idea of using a Linux Live CD came to mind.

To preserve the old hard drive, I physically removed it from the laptop. After that, I remembered I had ordered some Ubuntu 7.04 pressed CDs a while back so I popped one in.

To my surprise, Ubuntu 7.04 (Feisty) as a Live CD rivals my normal hard drive install in terms of performance! The bootup time is quite slow, but once it has started, it runs nicely. Since I spend a lot of time using Firefox, I don't experience the spin-up-spin-down as often as I remember in previous Live CD usage. I think Feisty must also do a good job of caching programs in RAM when you first access them because I hardly ever hear the CD drive spin up unless I'm starting a new program.

The other nice thing is that the laptop fan almost never turns on. The old hard drive ran somewhat noisy and warm, causing the fan system to kick on about 75% of the time. I've really enjoyed the cool, quiet performance of running on a Live CD. The laptop is absolutely silent.

The only real obstacle I've faced is that I can't shutdown my laptop unless I want to spend time re-setting up my Thunderbird profile and re-installing Firefox extensions. I guess you can't have everything.

Why not switch completely?


If this setup works so well, I thought to myself, why not just switch to always using a Live CD and save $60 on a new hard drive? After thinking about it, I've decided that I would be willing to switch if a few conditions were met:

  1. A decent amount of persistent storage were possible

  2. I could install updates and new software without losing them each time I reboot

  3. Most or all of the OS could be loaded in RAM at boot


I could probably accomplish #1 with a USB drive and a persistent home directory. I think #2 would be harder with the USB drive - like what happens when you move between systems with the same flash drive - but still possible. In the end, I think I would be happiest by buying a Compact Flash to IDE adapter and a large (16GB or more) Compact Flash card. These are nice because you get the cool, quiet operation and persistent operation. I considered doing this instead of getting a new hard drive, but in the end I figured I would get much more storage but the price (80GB @ $60 or 16GB @ $150 or more). In the future I think many laptop hard drives will be completely flash based memory.

As for #3, I wish that Ubuntu Feisty had the ability to use the "toram" kernel boot option and load the OS into RAM during boot. I've done this with Knoppix CDs in the past. The speed increase is amazing. Granted, less RAM is available for program execution, but RAM is cheap enough these days that the productivity gain is worth the extra couple of dollars.

All in all, I give the Ubuntu Feisty Linux Live CD a surprisingly high thumbs up for everyday use.

Silly Verizon and their creepy new router

I recently signed up for the Verizon FIOS service. Its nice, but probably not in the way you'd think. I only have 5 mbps down / 2 mbps up, which is the basic plan, and in my opinion, the only plan that makes financial sense. I just can't see myself paying $180 per month for home internet service.

The nice part about the service is the latency. I have a 12ms ping to Google. I doubt most people get that at home on their cable or DSL lines. The best I've ever had at home was 40ms. At any rate, the low latency helps web pages load that extra bit faster (and it is noticeable).

The one thing about their service is their router. Apparently, I'm not the first one that thinks it is a little creepy. Verizon has customized it to provide their IPTV (cable) service as well as perform the normal router functions. I decided to use my Linksys WRT54G instead.

If you want to use their IPTV services, I'm willing to bet that you can chain their router behind yours. Just make sure to either change your router's DHCP subnet to something other than 192.168.1.0/24, or change the Verizon router to use a different subnet (ie. 192.168.2.0/24). Most consumer routers will puke if you try to give them a non-routable IP address on their WAN interface in the same subnet as the one they are supposed to give to their own clients. Rightly so, I guess. Please comment about your experience with chaining the Verizon router below your own.

While setting up my own router, I noticed a few things:

  1. Verizon sets up your router with a random ESSID (network name) and WEP encryption. My tech wrote down the WEP key when she installed the service.

  2. Even if you do stick with the Verizon router, please switch to WPA. WEP is easy enough to crack and won't keep your data secure from a moderately skilled attacker.

  3. The default login credentials for the router are admin/password. I've also heard some people having success with using "password1" as the password. Please change this the first time you log in.

  4. Verizon uses MAC filtering, so you must spoof/clone the MAC on your router to match the Verizon router.

  5. There is a MAC address printed on the outside of the router. Unfortunately, this is NOT the MAC address used by the WAN interface on the router. Instead, you must log into the router and choose the "System Monitoring" section (upper-right corner). This will give you what they call a "Broadband MAC Address."


Verizon Router Broadband MAC

Once I used the correct MAC address, I was able to get onto the FIOS network using my own router with no problems. They say your own router may not perform as well as theirs, but I didn't notice any difference.

One last thing: You might notice that each time you type a character in the password field, several characters will appear. A brief look at the code suggests that they are hashing the data as you type. While it is incredibly annoying to have those characters randomly appear, at least they are using BSD-licensed code from a reputable source. Thank you Paul Johnston!

Friday, September 28, 2007

Use OpenDNS for faster and more secure browsing

I ran across opendns.org the other day and decided to try it.

There was a definite speed boost! I have Verizon FIOS and the OpenDNS servers are more responsive than Verizon's DNS servers. I've noticed that most pages now load in about 3/4 of a second (time to look up the DNS name, fetch the page, and render it). I use fasterfox to time it.

OpenDNS also provides some interesting reports. You can turn off the DNS logs if you like (privacy and all), but I found them useful. I have a cron job that runs every 5 minutes and fetches my mail via POP and mails it to another account. The cron job had done over 24,000 DNS lookups of the same IP address in the last 8 days. My router is supposed to be caching those requests (isn't that why you run local DNS?), but its easy to see that caching is not happening.

Also, OpenDNS gives you the ability to block domains, and automatically will block phishing and pornographic sites if you want. This can be pretty useful, for kid-safe and normal-user-safe browsing.

I've been pretty happy with using the service so far - especially since it is free. The only thing I've noticed is that I haven't seen any *nix update clients. Anyone found one that they like?

Update: here are some screenshots from their interface

Recent Activity

Recent Activity

Unique Domains

Unique Domains

Top Domains

Top Domains

Sample blocked domain

Blocked domain

Thursday, September 27, 2007

Ruby has a "methods" method to see all available methods

So it turns out that Ruby has a few methods that can really help you figure out what you're doing when you're working with sparsely documented APIs or you just want a quick reference.

I've used the "inspect" method for a long time. You can basically see all of the class members and sometimes other useful information. For example:

irb(main):001:0> s = "My String"
=> "My String"
irb(main):002:0> s.inspect
=> "\"My String\""


irb(main):003:0> a = [1, 2, 3]
=> [1, 2, 3]
irb(main):004:0> a.inspect
=> "[1, 2, 3]"


The inspect method can give you a good idea of what data is in a particular object. But what if you want to see all methods an object holds? Well duh.... use #methods.


irb(main):001:0> require 'pp'
=> true
irb(main):002:0> s = "My String"
=> "My String"
irb(main):003:0> pp s.methods.sort
["%",
"*",
"+",
"<",
"<<",
"<=",
"<=>",
"==",
"===",
"=~",
">",
">=",
"[]",
"[]=",
"__id__",
"__send__",
"all?",
"any?",
"between?",
"capitalize",
"capitalize!",
"casecmp",
"center",
"chomp",
"chomp!",
"chop",
"chop!",
"class",
"clone",
"collect",
"concat",
"count",
"crypt",
"delete",
"delete!",
"detect",
"display",
"downcase",
"downcase!",
"dump",
"dup",
"each",
"each_byte",
"each_line",
"each_with_index",
"empty?",
"entries",
"eql?",
"equal?",
"extend",
"find",
"find_all",
"freeze",
"frozen?",
"grep",
"gsub",
"gsub!",
"hash",
"hex",
"id",
"include?",
"index",
"inject",
"insert",
"inspect",
"instance_eval",
"instance_of?",
"instance_variable_get",
"instance_variable_set",
"instance_variables",
"intern",
"is_a?",
"kind_of?",
"length",
"ljust",
"lstrip",
"lstrip!",
"map",
"match",
"max",
"member?",
"method",
"methods",
"min",
"next",
"next!",
"nil?",
"object_id",
"oct",
"partition",
"pretty_inspect",
"pretty_print",
"pretty_print_cycle",
"pretty_print_inspect",
"pretty_print_instance_variables",
"private_methods",
"protected_methods",
"public_methods",
"reject",
"replace",
"respond_to?",
"reverse",
"reverse!",
"rindex",
"rjust",
"rstrip",
"rstrip!",
"scan",
"select",
"send",
"singleton_methods",
"size",
"slice",
"slice!",
"sort",
"sort_by",
"split",
"squeeze",
"squeeze!",
"strip",
"strip!",
"sub",
"sub!",
"succ",
"succ!",
"sum",
"swapcase",
"swapcase!",
"taint",
"tainted?",
"to_a",
"to_f",
"to_i",
"to_s",
"to_str",
"to_sym",
"tr",
"tr!",
"tr_s",
"tr_s!",
"type",
"unpack",
"untaint",
"upcase",
"upcase!",
"upto",
"zip"]
=> nil


Useful, huh?

Tuesday, September 25, 2007

Get a free $25 by saving with ING Direct

Have you ever looked at the interest rate you get on your savings account? If you're with most banks, its probably less than 1% - much less. I've seen rates as low as a quarter of a percent.

Places like ING Direct are great low-risk way to get some interest on that emergency stash you've been saving. Normal banks love it when you save in their "savings" accounts because they pay so little interest. ING Direct classifies itself as a "high interest savings" account. They currently pay 4.30% APY - much better than my bank (and probably yours).

How it works


ING's banking demo is probably the best way to learn about their services. If you want something faster, read this:

  1. You give them your personal information, and they establish an electronic link between your bank account and their savings account.

  2. You transfer money between your bank and ING by using their online interface. It takes a few days to transfer money between accounts.

  3. The money in ING earns 4.30% interest.

  4. You make more money on your savings.


Its a simple system and has served me well over the past few years. My money is only a few days away if I need it. In 2006, I made over $180 dollars by putting money in this account that would have sat in my bank otherwise.

Want free money?


If you decide to sign up with ING Direct and you will be depositing $250 or more, you can get $25 free by having a ING Direct member refer you. Of course I'd be happy to help you get that free money. Email me at ing-savings@layer2.org with your first and last name and I'll send you a referral link pronto. I get $10 if you decide to sign up. It's true - I'm not joking!

If you like, I can also refer you for the Electric Orange checking account (see below). The reward is the same.

Need faster access?


If 3-4 days isn't fast enough for you, ING now has an Electric Orange checking account. The interest rate isn't as high (3.50% APY for deposits under $50k), but you do get instant access to your money via a MasterCard debit card. I'd personally rather have the higher interest rate, but some people might find the Electric Orange account makes a good replacement for their existing checking account.

Best use of the account


I'm no financial advisor, but it seems to me that its not the best idea to invest large sums of money with ING Direct. I went to our mutual fund advisor today and I don't think a single fund had less than 6% interest for the last year. Some had over 20%. While you have to choose a mutual fund for its performance over time (10 years or longer), it is clear that most mutual funds are going to perform better than ING Direct, although with slightly more risk.

If you're investing over $10k, you're probably past the point of saving money for emergency purposes and saving more for retirement or other financial goals. I think ING makes a good vehicle to get more out of your everyday dollar, but don't forget the power of a more traditional investment option.

Automatic updates in Debian Linux (etch)

UPDATE: I found a better way to do this

I have half a dozen Debian Linux boxes in various places that I administer. Some are file servers, some are meant to do rsync backups, and some have lost their purpose and I simply keep them around because they are on a fast Internet connection. These are not critical in any way, but they are often useful to have around as an entry point into a network or to host some simple service.

I've searched the Internet for a good way to keep these boxes up to date without having to administer them all the time. After all, I don't want to SSH to n boxes once a week (or more) just to run apt-get update && apt-get upgrade. And what if some critical hole is found in SSH and I can't patch the box in a reasonable time? Or, more likely, what if I just don't hear about the critical hole and the box gets exploited days later?

Most Debian administrators seem to think that using a tool like cron-apt is the best way to go about things. Cron-apt downloads all available updates and sticks them in apt's cache, but does not install them. This does make it quicker to manually update since the packages are already present on the system. If I administered these boxes for a living, I would be plenty happy with the way that cron-apt downloads the packages and sends you an email when new packages are ready to install. But since I want the minimal fuss, I chose a different way.

Ideally, Debian would have a tool that did something similar to Synaptic's GUI interface.

Synaptic Auto Update

This automatically installs security updates and leaves the rest to the user. I'm not quite sure what mechanisms it uses, but I've used this shell script to accomplish the same thing for over a year.

#!/bin/sh
/bin/date >> /root/autoupdate
/usr/bin/apt-get update >> /root/autoupdate
/usr/bin/apt-get upgrade -y -t security >> /root/autoupdate
/usr/bin/apt-get autoclean

I drop this script into /etc/cron.daily/autoupdate and forget about it. It logs all actions it takes to /root/autoupdate, so I can look back and see what has automatically been installed. It also only installs security updates, although I usually leave off the "-t security" part and let it install everything. In my experience, the stable version of Debian (currently etch) has very few updates that break anything, especially if you haven't customized your configuration files heavily. I've been running this script in several places over the last year and each box will generally install everything except for kernel upgrades, since they usually require a reboot.

A lot of Debian administrators are nay-sayers to this type of approach. This is probably because they've seen many a non-stable distribution break horribly with something like this. If this were a production level box with many users depending on it, I'd also take the approach of manually installing updates. But when I actually want to do something else with my life than manually run apt-get on boxes I occasionally use, this is the perfect solution.

Monday, September 24, 2007

Friends don't let friends use First Step Internet

A long time ago, in a dream, really a nightmare, I had this terrible ISP - and then I realized that it wasn't a dream at all. It was real.

The ISP was First Step Internet. When I was in college, I used to live in this apartment complex that bundled Internet with their lease agreement. It was really a good idea, because it puts your Internet bill into your rent, so you have more predictable monthly expenses. It also forced your roommates to help pay for Internet. For some reason I always had roommates that didn't want to pay because they didn't need the Internet. And at $15 a month, you really couldn't beat it since most other offerings were at least $25 per month. When you're in college, $10 per month is a lot of money.

But the service from First Step Internet was terrible.

In the beginning, I was actually pretty excited. They came and wired all the rooms in the apartment complex with CAT5 cables, and we were eventually given the OK to plug in and use the Internet. There was no proprietary setup with a lot of ISPs like Verizon - just get an IP address from the DHCP server and you were connected.

It was initially opened up a week or two before the school year started. When I was first testing the line, I was happy with it since I was getting about 3 megs down and 1 meg up. While not the best, I definitely couldn't complain for $15/3 roommates = $5 per month.

But as soon as everyone came back for the school year and plugged into their computers, the service came to a screeching halt. Here is one of the results I got from their speed test results:

Slow First Step Internet

Can you imagine only getting 85kbps to your ISP, and trying to share that among 3 people? Just think about the speed you would get to basically any site on the Internet. Now magnify that by about 10 times and you will get an idea for the pain that we felt while using their service. This screenshot was taken about 1am, so its not like their lines were busy. This was a good speed test. I've seen them 35kbps and below on their broadband lines.

There were many problems with their service, and I am going to list some of those that I experienced.

  • Very slow link speeds (as seen above)

  • Very high latency (150ms+ ping to Google.com was common)

  • We were not given a public IP address. Instead I had a non-routable IP in the 192.168.x.y range. I talked with their technical support and they absolutely would not give me a public IP address or even forward a single port to my machine for SSH.

  • They used default/weak passwords or vulnerable switches/routers. Someone from our apartment complex was obviously as frustrated as I was and hacked their equipment. Unfortunately they weren't too smart and when First Step tracked them down they had their network privileges revoked.

  • They subjectively blacklisted certain apartments for using too much bandwidth. When I sent them the screenshot above the tech confirmed my apartment was blacklisted, and that is why I was getting slow speeds. He then later told me that when they put in the bandwidth rules, they put them in backwards so that I had 85kbps down and something like 300kbps up. Not only did they severely limit the speed, they put the rules in backwards to make the service even more unbearable? What kind of ISP is this?

  • Their switches limited bandwidth by switch port and NOT by throttling the connection to the remote site you were connecting to. So, if I wanted to share a file with my roommate or play a LAN game, I was still limited by the 85/300kbps rule.

  • Even though First Step has a dedicated wireless link to my university, I still could not get under 200ms pings to the CS department Solaris servers. WTF?

  • First Step was at their worst when I contacted them about a problem I knew at least a dozen people in the apartment complex were having. For some reason they couldn't access Hotmail through Internet Explorer. It worked fine with Firefox - but Internet Explorer would simply stop loading the page after the initial log in. Since I run Linux I never experienced the problem myself, but I tried for weeks to get them to understand that many people that I knew were having this issue. I even considered starting a petition, having people sign it and sending it to them. Finally I sent them a packet dump detailing all of the problem frame numbers and showing the difference in behavior between IE and Firefox. They came back a few days later saying that their MikroTik router had a bug in its firmware.

  • My entire apartment complex (200+ people) was served Internet by a single DSL line. This was a direct quote from one of their techs after a long conversation about why my service was so slow.


At the end of the day the worst part of everything was that their service was consistently bad. Their techs were about the skill level I would expect - able to help most home users with general Internet problems. But sometimes I did feel like they were trying to fool me by telling me that the Internet was fine and 200ms pings were normal.

Man, I'm glad I don't even live within range of First Step Internet anymore. They are hazardous to your health.

There is a reason mitsubishisucks.com exists

At first I was kind of surprised to find the site mitsubishisucks.com

But after owning a Mitsubishi for about a year and a half, I can tell you - it is justified! Mitsubishi has a problem with creating defective products and not supporting their customers when things go bad. Let me tell you about all the problems I've had with my 2002 Mitsubishi Galant.

Broken motor mounts


I don't know how the heck this happens. I think that the mounts must have at least been damaged when I bought the car and progressively got worse over time. I drive the car pretty conservatively, so I'm not sure what I could have done to have caused this to happen.

Basically, the whole car shakes when the engine is under load. While passing another car moving between 60-80mph on the freeway, the car would feel normal until you let off the gas - at which point it felt like you were hitting a small animal (or large pothole) while the engine shifted back and forward and the transmission made a huge thunk. I literally thought I was going to lose the transmission when it was happening.

After a couple of hundred dollars to fix the motor mounts, it seems there is some permanent damage. See the next section.

Transmission shifts rough from 2nd to 3rd gear


I've owned my fair share of cars (and driven plenty more), and even though I did lose the transmission on one of them, it was never as rough shifting as this one. There was actually less noise and discomfort during the shift when the transmission failed than each rough shift I have with the Mitsubishi.

Each time I slowly accelerate to about 30mph, especially while the engine is cold, there is an extremely rough shift from 2nd to 3rd gear. It is rough enough that everyone in the car notices it and makes the car uncomfortable to drive. While it is hard to describe exactly how hard the shift is, I would say that if I had some type of drink sitting on the center console, it would undoubtedly be knocked over during the shift.

I had the transmission flushed back in December with the $150 "special" Mitsubishi transmission fluid with no effect.

I also wonder if the broken motor mounts contributed to or caused this problem. Before fixing the motor mounts, this rough shift problem was much worse, since the rough shift was accompanied by a general slosh of the engine moving back and forth. Since replacing the motor mounts the effects of the rough shift take less time, but it is still quite pronounced. It seems logical to me that hundreds of bad shifts with a loose engine could cause transmission problems. I'm not a mechanic though, so I don't really know.

Brakes squeak constantly


Every single time I brake I hear loud squeaks from the brakes. Loud enough to hurt your ears (the pitch is the worst) and to have people occasionally look over at you after you stop at a red light.

I've taken the car to at least 3 different brake shops. While these people are normally plenty happy to sell you new products, they all tell me that this is normal brake noise. Well, not quite in those words. Essentially they've all said that the brakes look normal on inspection, usually accompanied with some advice that brakes will squeak in the winter time, after a big rain, and when the car hasn't been driven in a while. My Mitsubishi's brakes squeak every single day of the year, whether or not it rained, even in 90 degree weather, and almost always at the same "level" on the brake pedal.

Fortunately I know I'm not crazy on this one:

http://www.mitsubishisucks.com/cars/complaints/data/1004/10043504.html

http://www.mitsubishisucks.com/cars/complaints/data/1006/10068148.html

http://www.mitsubishisucks.com/cars/complaints/data/76/766297.html

http://www.mitsubishisucks.com/cars/complaints/data/801/8014395.html

http://www.mitsubishisucks.com/cars/complaints/data/1000/10008481.html

There are also some reports of the brakes failing altogether - not something that makes me feel good.

UPDATE 12/30/09: Commenter Josh says that Wagner brand Thermoquiet pads won't squeak. I may be going for those soon since I started driving this car again and its driving me crazy.

Paint peeling


This is probably the worst of all the problems I've had with the car. The paint is fading like crazy all over the car and it looks terrible. The pictures below show how bad it is. There are quite a few others having the same problem, although most of their cars are black while mine is silver. I talked with a dealer in Spokane, Washington and the manager said that he had seen this paint problem on dozens on Mitsubishi cars. The best information I've come across is that there was a bad clear coat put on the car, causing the defect and peeling after a couple of years. All of the paint has to be stripped off the metal and re-applied. You can't just paint over the affected parts or it will just fade again.

Mymitsubishipaintproblem.com looks like it was a good resource at one point to help people affected with this problem to communicate with Mitsubishi. As of now (September 2007) the site's domain name is parked and no longer has any information about the problem. Thankfully Google cache had the page and I was able to save some snapshots of it. Later, I found that the actual content of the page is still available at http://philipherold.typepad.com/my_weblog/ and the "old news" section is available at http://www.philipherold.com/news.html . I also zipped up the contents of the page and put it in this file.

Mitsubishi Paint 3Mitsubishi Paint 1Mitsubishi Paint 2Mitsubishi Paint 4Mitsubishi Paint 5

There is also quite a long list of people complaining about the same paint problem happening to their Mitsubishi cars:

http://www.autoweb.com/content/research/forums/index.cfm/action/Posts/fid/5374

http://mitsubishit.blogspot.com/

And some other links:

http://www.local6.com/problemsolvers/9625337/detail.html

http://www.mitsubishisucks.com/cars/complaints/data/1003/10037435.html

Water being sprayed into passenger cabin


UPDATE 12/30/09: After fixing the heat (see next section), I found a possible fix. When taking apart the lower dash and center console for the heater control valve, I noticed part of the airway assembly nearest the center console was clogging up with leaves and debris. Its worth cleaning it out if you are experiencing this problem and can't easily get under the car.

----------

This summer we got to visit the pool more than we wanted to. Each time I turned left with the air conditioning on, water sprayed under pressure into the passenger cabin. Mostly it fell onto the passenger side and formed quite a pool of water, although it did drip on my feet by the gas pedal sometimes.

We took it to a local mechanic and he said that the problem was caused by the cabin air intake. It does not have an air filter, and therefore leafs and other gunk from the road tend to accumulate inside the cabin air system. Eventually enough junk in the system clogs the drain and the water has no place to go but into the passenger cabin.

Mitsubishi has released a modification to their original design that includes an air filter for the cabin air intake. Of course they won't just fix it for you. The part is less than $100, but the billable time for a mechanic to get to the spot buried in the firewall to replace it is like 5-8 hours. At $70/hour, I was quoted a price about $600 to get it fixed. Do you think anyone is going to want to pay that much money to fix a problem Mitsubishi should have fixed in the design stage of their car? Not me.

For now I had the mechanic get under the car and clean as much junk out of the cabin air system as possible. It hasn't been leaking since, but I only had to use the air conditioning for a couple of weeks before it cooled down enough outside so that I don't need the air conditioning. I can't wait to see what will happen next summer :( I'm sure the problem will resurface, right along with the bad smell and mold that accompanied the first leak.

See the pictures and notice the water spots:

Water in the cabin 1Water in the cabin 2Water in the cabin 3Water in the cabin 4

Again, others have this exact same problem:

http://en.allexperts.com/q/Auto-Air-Conditioning-1591/AC-Leak.htm

http://en.allexperts.com/q/Auto-Air-Conditioning-1591/C-Leak.htm

http://en.allexperts.com/q/Mitsubishi-Repair-824/water-condensation-c-inside.htm

http://www.autosafety.org/showconsumercomplaint.php?compid=7152&failure=-1&Make=15&modelid=216&offset=0

Heater does not work


UPDATE 12/30/09: This problem is most often caused by a defective heater control valve. If your heat isn't working, it is very likely that you need to replace the heater control valve prior to replacing the heater core or flushing it! Don't let your mechanic talk you into the more expensive option until you know you need it. He can test it by removing the lower part of the dash and manually moving the control valve arm.

I replaced the heater control valve myself with one I bought off ebay (about $150 shipped) with success! I just needed the valve, some lithium grease, about two hours and a bit of flexibility to get underneath the dash. I found excellent step-by-step instructions for replacing the valve here: http://fixmymitsu.wordpress.com/2008/10/10/heater-control-motor-my-heat-doesnt-work-and-i-hear-a-clicking-sound/ .

Another useful tip: if you're in the opposite situation (i.e. heater control valve is stuck in the "on" position), making the car unbearably hot because the heat is always on, you can press the recirculate button to temporarily halt the flow of heat from the engine. The setting won't stick between car starts, but at least you'll be able to drive around without all windows down in the dead of winter.

------------------

Recently there was a cold morning and I decided to turn on the heater in my Galant. It turns out that was a mistake. As soon as I switched the temperature gauge from cold to hot, I heard a clicking noise like a piece of paper in a fan (although much louder) from behind the dash. It stopped after a few seconds. I immediately turned off the fan, and after a few minutes tried it again. The fan blows air just fine, and the air conditioning still works, but no hot air comes out at all.

I did some searching on the 'net and found that this is probably related to a bad heater control valve. I guess they get stuck when they haven't been used all summer and then get switched to 'on' at the beginning of winter. Geez, can anything else go wrong with this car? I haven't yet taken the car to a mechanic for this one - I'll post an update when I find out what the bill will be.

In the meantime, you can read about other people having problems with their Mitsubishi heat:

http://groups.google.com/group/alt.autos.mitsubishi/browse_thread/thread/e3d90a70b4327f21/3c56e4c5d9d86549%233c56e4c5d9d86549

http://en.allexperts.com/q/Mitsubishi-Repair-824/Heater-problem-1.htm

http://townhall-talk.edmunds.com/direct/view/.ee9e6cb/2249

Erratic idle when transmission is in gear


UPDATE 12/30/09: I've seen this problem a few times since I last posted, but heard the likely cause is dirty fuel injectors and throttle body. Get that fuel injector cleaning service if you're seeing this one.

---------------------

The latest problem has only surfaced in the last week or two. In the past I have occasionally seen the car idle quite badly, but this only happened maybe once per month. For the last week it can hardly idle while sitting at a stop light. This seems to only happen once the car has warmed up. My Galant will start nicely and drive on the freeway nicely anytime, but as soon as I slow down to below 25 miles per hour or I come to a stop at a red light, it begins to puke. It is so bad I've actually had problems with power steering loss as I go around a corner. The car hasn't died on me yet, but I'm expecting it to soon since I lose enough power that the lights go out and the tachometer drops to zero before it regains power. I have to give the car a lot of gas to keep going.

The Galant also shifts and revs in strange ways. It will shift when it doesn't need to and drop two gears when it only needs to go one, or just be in the wrong gear altogether.

As soon as I stick the car in neutral or park, it recovers and will idle just fine.

I haven't found many others having this issue on their Mitsubishi cars. Most posts say too much air/not enough gas or the like related to a rough idle. Hopefully the mechanic will find something out.

Conclusions


As you can see I've had quite the list of problems. Once I took it to a mechanic and even he couldn't believe all of the problems I've had. Beyond the problems, the biggest thing I've learned from this experience is that Mitsubishi will not take care of their customers. For example, the people that I've seen that have had their paint problems fixed by Mitsubishi had to fight tooth and nail to get it done (like complain to their local TV station). Mitsubishi won't take care of them when they have problems, and for this reason I am unhappy with them.

Sometimes the best way to make yourself known is to vote with your dollar. This was definitely my first and last Mitsubishi. I wish I still had my 1994 Honda Civic, since I had less problems with it. There were two reasons I sold it: 1. No air conditioning, 2. My wife can't drive a manual transmission.

Hopefully you read this article because you were considering to buy a Galant and now know that you shouldn't. If you stumbled across this page because you are already having a problem with your Mitsubishi, please comment below and post any relevant information with regard to problems and fixes.

Monday, September 17, 2007

Simple network uptime test

Trying to troubleshoot an intermittent network problem? Just want to know if you ISP is dropping packets or going down altogether?

So many times I've search the 'net for a simple network uptime script. I always wanted to know the exact time the network went down (and came back up) so that I could track down the cause of the problem. Here is a dead-simple script that will do just that:

#!/bin/bash
## connect_test.sh ##
## This script continually pings an IP address / hostname and reports *only*
## when it is unable to reach the destination.
##
## Example: ./connect_test.sh www.google.com

if [[ $1 == "" ]];
then
echo "Please provide an IP/host to ping"
exit
fi

while [ true ]; do
p=`ping -c 4 $1 > /dev/null 2>&1`
if [[ $? != 0 ]];
then
d=`date`
echo "Unable to reach $1 at $d"
sleep 1
fi
done

It works best if you open up multiple terminal windows and try to connect to different portions of your network simultaneously. For example:

./connect_test.sh [my neighboring workstation]
./connect_test.sh [my gateway]
./connect_test.sh [my ISPs DNS]
./connect_test.sh [random domain - ie. google.com or yahoo.com]

This way, you can determine exactly where the failure is AND you have a record of the time it occurred. Hope that helps!

Sunday, September 16, 2007

Advantages of being a WINE developer

I've often thought that it would be neat to contribute to a high-profile open source project. You know, something like Joomla that plans to solve all the world's problems. I recently learned that contributing to the WINE project is just what I needed.

For the uninformed, WINE is a project that allows Microsoft Windows programs to be run in Linux. It sounds like a lofty goal - and it is - but sometimes its actually quite useful. For example, I once had to contribute changes to a Word document that had all kinds of complex formatting - and OpenOffice couldn't handle it. To be fair, OpenOffice could open it fine, but the formatting was inconsistent with what is normally displayed in Word and basically corrupted the layout for anyone that viewed the document later. Long story short, I had no choice but to edit the document with Word, running Windows XP. In true Microsoft fashion, Word running on Windows XP did crash several times before I was able to finish my edits to the document. While I wasn't sure whether to blame Microsoft or my professor for creating that extra-complex document layout, I do know I was yearning to experience those kind of program crashes while running my operating system of choice!

WINE let me do just that. Word 2000 actually runs quite well using WINE on Linux. I don't think the newer versions have the same success though.

More to the point, WINE can run any Windows executable. It may not be perfect, but you have to thank the WINE developers for trying:

Yes, No, Cancel?

This is a picture of the free product Personal Ancestral File available from familysearch.org. It helps you keep track of your ancestors. What it wants me to do now is anyone's guess, but it should be clear to you why I want to be a WINE developer. I want the privilege of saying "You won't believe the fun I had today...."

First post on blog.layer2.org

Welcome to my new WordPress blog! This is the site I'm planning on using to write about my thoughts and experiences with technology and other aspects of life. I plan on writing a lot about Ruby, Linux, computer networking and other things. Hope you enjoy reading!