Matt’s Blog Just another weblog

27May/102

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 2 Comments
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/091

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 1 Comment
28Mar/091

Intel Atom!

I've recently decided replace two of my home servers with an Intel Atom system. The Atom is a low-power CPU which comes in various flavors which you can read about at wikipedia.org. What I will tell you about is the huge success that my upgrade has been and how extremely happy I am with this processor. You will also find a detail listing of the various components that compose my system, how the system is being used, and my overall opinion of the processor.

Components

  1. Athenatech Black Steel A100BB.270 Micro ATX Media Center / HTPC Case
  2. Kingston 2GB 240-Pin DDR2 SDRAM DDR2 533 (PC2 4200) Desktop Memory Model KVR533D2N4/2G
  3. ECS 945GCT-D Intel Atom FCBGA 437 Intel 945GC Mini-DTX 200x170mm Motherboard/CPU Combo
  4. Transcend 4GB Compact Flash (CF) Flash Card Model TS4GCF300
  5. LG 22X DVD±R DVD Burner Black SATA Model GH22NS30
  6. Addonics CF - SATA HDD Adapter
Total Price: $251.44

I went with the ECS 945GCT-D motherboard because it comes with a PCI-e slot. This is a very useful feature which will increase the longevity of your system giving you room for any possible future upgrades. For me however, I'm using the slot to stow my external RAID controller card which is the core component of my 5 terabyte data storage solution. The motherboard claims it supports a maximum of 2gb of RAM--1gb stick in each slot. Though, I'm having no issues with a single stick. One last thing I'd like to mention is splurge and purchase the highest quality compact flash card you can afford. I experimented with several models and found them lacking in performance. Worse, a Kingston stick I first purchased had constant data corruption issues. Avoid! The CF card listed above will not disappoint featuring 45Mb/sec transfer rate.

I am extremely happy with the performance of this system. It makes absolutely no noise though it has a PSU fan and two small case fans. It is ideal for my home server needs and this box currently serves the following purposes:

  • MySQL Database Server
  • Apache/PHP Web Server
  • DNS Server
  • NIS Server
  • NFS Server
  • MythTV Front/Backend
  • SVN Server

All of the above services took a solid week and a half to match the flawless configuration of the systems it replaced. During this process, I experimented with several Linux distributions including Fedora Core 10, Ubuntu 8.10 Server, and Ubuntu 8.04 Server. Ultimately, I had the most success with Ubuntu 8.04. It was an interesting experience attempting to configure the system with FC10. I had configured almost all of the above services but failed to get sound working with MythTV. I won't get into the details of the problem but my conclusion is that Ubuntu has come a long way not just as a Desktop but as a Server. The configuration of Ubuntu was much easier not just because it is better documented but the overall higher quality of the packages offered by Ubuntu makes configuration of the above services a much better experience. It is worth mentioned that because I only have 4 GB of disk space on this system I could not afford to install unused packages (e.g. Ubuntu Desktop). The FC10 base install took ~1.4GB compared to Ubuntu 8.04 which took ~500MB. After installing all the necessary packages to support my configuration, my disk usage is:

/dev/sdg1              3753400   1723876   1840364  49% /

Which is perfect.

This $250 system is a perfect home server. I'll take it a step further and dare to mention that running X (specifically, LXDE) on the Atom system is just as responsive as on my dual-core box. Unless you need heavy computing power (e.g. gaming/video editing) you will be very happy with the Atom processor. I can't wait to build another one.

Filed under: Guide, Opinion 1 Comment