Matt’s Blog Just another weblog

27May/101

How to Skip Pandora Commercials

Pandora has extremely intrusive commercials that are repetitive and at times extremely annoying. Most likely this is the case because I'm so tuned into my favorite song that I get excited with anticipation of what the next awesome song will follow. But, instead it's a commercial and my experience is ruined. So, I've discovered a rather crude but effective method of skipping these commercials.

If you're sitting at your computer and Pandora decides to interrupt your play with a commercial either during station play or when switching between stations, simply force your browser to refresh the Pandora website. On most browsers this can be initiated by pressing the F5 key. When the site reloads, Pandora plays the next track, immediately. I find this method especially useful when switching between Pandora stations to skip those really annoying video commercials.

As an added bonus, this same ability can be used to circumvent Pandora's skip limitation! Quite often Pandora plays a series of just terrible songs that quickly exhaust my skip limit. When Pandora prompts you that your skip limit has been exhausted, refresh the website to continue your listening pleasure.

Now, you can enjoy that next song you were anticipating and unlimited Pandora skips!

Filed under: Guide 1 Comment
2Mar/100

scanimage(1) command python wrapper

To reduce clutter and improve the efficiency of my home-office, I like to digitize all my "important" documents. To accomplish this task, I use a HP All-in-one scanner, an open sourced document management software called KnowledgeTree, and scanimage(1) from the SANE project.

It turns out that scanimage(1) is a fairly cumbersome command line program to use. I opted to avoid graphical scanning software because I don't want to be clicking around with the mouse when scanning large number of document sets. It turns out that I use a consistent set of options for all my document scanning purposes. The only options that to vary are the number of pages and whether the document set is single or double sided.

For the longest time, I was very happy with my simple bash script to store my command options to scanimage(1) and I would "manually" set any arguments (e.g. number of pages). This worked pretty well for single sided documents. After some time, I finally had it with the headache of modifying the command options manually when I wanted to scan double side documents and decided to write a python script that would wrap all this knowledge into a script. I call my script scan_pages.py. It has very simple usage:

scan_pages.py [-d | --double] total-pages

The script does three things. First, it manages the "--batch-count" and "--batch-start" command line options depending upon the parameters of the scan job. Also, it automatically calculates the number of pages that are to be scanned for a two-pass double sided scan job. It is only required to specify the '-d' flag and the total number of pages, both front and back, that are to be scanned. Lastly, the script will use the convert(1) command to trim any whitespace contained in the image that is not part of the original document.

If you use scanimage(1) you may find this script helpful. Let me know if you like it. You may download it here.

Filed under: Guide, Opinion No Comments
4Oct/090

Ubuntu 8.04 LTS Dynamic DNS with nsupdate

VMs are a perfect framework for exploring and testing new technologies. A recent technology I have been interested in is Hadoop and I wanted to experiment with it in a clustered configuration. Since I have limited hard resources available to construct a cluster, I decided that my nodes will be part of a VM deployment.

To reduce deploy problems, it is prefered that all the nodes in a cluster are as homogenous as possible. To assist in this effort, I have been working a VM clone script based on the information described here. One of my requirements in deploying identical systems is that cloned VMs should contain a proper DNS entry. After researching this topic, I came to the realization that nsupdate is the right tool. nsupdate is a maintenance utility to perform DNS zone updates.

My next task was to configure my Ubuntu 8.04 DNS bind server to allow for the ability to perform remote dynamic DNS updates (DDNS). The process of configuring nsupdate is pretty straight forward and requires the following modifications to your zone:


zone "my.zone" {
    type master;
    notify no;
    file "/etc/binhttp://en.wikipedia.org/wiki/AppArmord/my.zone.zone";
    allow-update { 192.168.0.0/24; 127.0.0.1; };
    journal "/var/lib/bind/my.zone.jnl";
};

The two new entries I had to add were the "allow-update" tag and "journal" tag. I decided that my initial DDNS deployment would use IP-based authorization since my private network security requirnments are not as stringent. However, I believe the correct approach would be to deploy authorization keys as described by this article.

The second element I had to add was the "journal" tag. This was because Ubuntu deploys apparmor which has a configuration for named. The configuration specifies the privileges the named process has on the system. Without the "journal" tag, named was attempting to write the journal file to /etc/bind which the apparmor configuration strictly prohibited. My syslogd would contain the below entry describing this error:

updating zone 'my.zone/IN': error: journal open failed: unexpected error

The apparmor configuration file for named (/etc/apparmor.d/usr.sbin.named), indicates that journal files typically live in /var/lib/bind and it explicitly allows the named process to write to this directory. With the above two changes, I am now able to perform dynamic DNS updates from my cloned VMs:

> server 127.0.0.1
> zone my.zone
> update delete foobar.my.zone. A
> update add foobar.my.zone. 86400 A 192.168.0.20
> show
> send
Filed under: Guide No Comments
15Sep/090

Jim Cramer raises Apple (AAPL) target price!

In today's episode of Jim Cramer's Mad Money, Cramer has raised the target price of Apple (AAPL) to $264. This article has a great recap of the todays episode. Cramer states that the FASB is proposing a change in a revenue recognition standard such that it will dramatically increase Apple's reported earnings. Thus, making the stock appear cheaper than it currently is, even though Apple's financial position has not changed.

This episode has been bothering me all day because of the fundamental error in Jim Cramer's arguments. He made two points to justify his recommendation 1) The accounting change will increase Apples P/E ration thus making it appear it's financial position has strengthened and 2) Investors are going to ignore the accounting change.

However, I doubt it. Though there are many ways that a stock's price can be calculated, it is fundamentally the present value of the future cash flows. One does not have to be a hedge fund manager to see that an accounting change does not increase the future value of cash flows. Secondly, as Cramer pointed out, Apple's Statement of Cash Flows has already recognized the cash flow from the sales of Apple's products and investors do not ignore this important financial statement.

I would think that this revenue has already been priced in Apple's stock.

Filed under: Opinion No Comments