Dec 072011
 

I like to have the option of playing music on my headphones or outputting to the stereo – it really improves family life when they don’t always have to hear my dubstep ;) Unfortunately, the sound cards and devices you have available don’t always fit together nicely. For Linux users, ALSA gives you a lot of control and flexibility over audio devices. However, it is usually difficult to figure out exactly what needs to be done to output to multiple audio devices.

In my case, I have an onboard audio device with optical digital out. But onboard audio usually receives a lot of noise from the rest of the components on the motherboard – your headphones buzz when a hard drive seeks or you move your mouse pointer. I have broad musical tastes and orchestras sound pretty awful with static in the background. By adding an old-school Creative Labs SoundBlaster Live card, I can get exceptional quality output for headphones.

What caused difficulty was getting audio output to both the onboard and SoundBlaster audio devices at the same time. By default, Linux applications will send audio directly to one specific device. All you need is a properly structured ~/.asoundrc file to configure ALSA.

Continue reading »

Sep 032011
 

When plotting my typing performance, I wanted to demonstrate my baseline typing performance as well as the number of errors. For this, I discovered some quite useful capabilities in the CRAN package ggplot2.

DVORAK typing performance on Kinesis Contour Keyboard

results<-read.csv("./dvorak_vs_qwerty_typing_test_results.csv", header = TRUE);
png(filename="kinesis_dvorak.png", width=640, height=440, bg="#070707");
ggplot(results, aes(x=Trial, y=Kinesis.DVORAK)) + scale_x_continuous(name="Trial #", limits=c(1, 15), breaks=seq(1,15)) + scale_y_continuous(name="Words per Minute", limits=c(0,100), breaks=seq(0,100,by=10)) + geom_point(aes(x=results$Trial, y=(results$Kinesis.DVORAK + results$Errors)), color="#7b0000", pch=19) + geom_area(color="#004088", fill="#004088", alpha=0.5) + opts(title="Kinesis Keyboard - DVORAK Layout") + theme_bb() + opts(plot.title=theme_text(colour="#ffffff", size=14, vjust=1), axis.title.x=theme_text(colour="#ffffff",size=12,vjust=0), axis.title.y=theme_text(angle=90,colour="#ffffff",size=12), plot.background=theme_rect(colour="#070707", fill="#070707"), panel.background=theme_rect(colour="#666666"), panel.grid.major=theme_line(colour="#444444"), panel.grid.minor=theme_line(colour="#070707"));
dev.off();

Required packages: ggplot2, ggExtra

Download Data File

DVORAK vs QWERTY Typing Performance Results

 Posted by on 2011/09/03  Tip  Tags:
Aug 272011
 

The idea of bookmarklets is so simple that I suspect many people use them without realizing it. A bookmarklet is basically just a specially-crafted bookmark for your browser which performs special tasks. This can mean performing custom actions on the current page or generally improving your web browsing experience.

Technically, bookmarklets are short snippets of Javascript code which can do just about anything. They’ve been around for a long time, but I’ve only been using them a few years. With the increasing prevalence of cloud products and services, I expect their usage will only increase. Bookmarklets make it easier for you to do everything you need to with just a web browser. As such, I’m keeping a list of the most useful.

Continue reading »

Aug 142011
 

AN Hosting recently relocated to a Seattle datacenter. As part of this process, my site is now running on a much more modern server (AMD Opteron 6100-series Magny Cours vs. Intel Xeon 5400-series Harpertown).

Unfortunately, a new server and new install can mean software changes. AN Hosting has tightened up the security settings on PHP. Better security is always a good thing, but it means the Drupal command line utility drush no longer works out of the box. (For those that don’t know drush – please give it a chance. It provides near foolproof Drupal core/module/theme upgrades as well as command-line control of your Drupal sites.)

Continue reading »

Jun 272011
 

For administrators and power users, it’s often useful to log in as multiple users on the same web site. However, you can’t normally do this from one web browser – sites keep track of your whole session. Logging in as one user logs you out as the other user.

An obvious, but bulky, solution is to use one web browser for each log in (e.g. Firefox and Chrome). However, I’ve found that Google Chrome’s “incognito” feature works much better.

Continue reading »

May 282011
 

Web browsers have had bookmark bars for years, but I never used them until I switched to Google Chrome. I’ve always felt that the amount of screen real estate they consume is too great compared to the number of bookmarks that will fit (and I dislike having all my bookmarks in folders).

Screenshot of Google Chrome Bookmark Bar

What made me change my mind was icon-only bookmarks. When adding a new bookmark in Chrome, delete the Name field – leaving it empty. Chrome will insert the bookmark using the favicon provided by the website. As long as these icons are distinct, you end up with a compact bookmark bar.

Apr 252011
 

I recently purchased an HP Pavilion dm1z laptop after reading how many people were thrilled with the small laptop. It’s been described as a netbook-killer, and I tend to agree with that sentiment. The dm1z is light, power-efficient, quick and runs Linux well. However, there were a few tweaks I needed to put in place to get 32-bit Ubuntu 10.10 running perfectly.

This post was last updated 2011-09-07

Continue reading »

Feb 212011
 

Studies have shown that long periods of staring at TVs and computer screens damages your eyesight. You have to be mindful of your working conditions and take an appropriate number of breaks to give your eyes – and your body – a break. One of the easiest exercises I use is to alternate focus between near objects (a foot or two away) and far objects (the next room over or outdoors, if possible).

I’ve recently learned that there’s more at stake – your sleep. Your body’s internal clock (circadian rhythm) is primarily regulated by your environment. Stand outside in the sun and your body knows it’s day. Sit inside a dark room and your body believes it’s night. The quantity and type of light entering your eyes determines your body’s response.

Unfortunately, the light emitted by all your electronic devices (TV, computer, cell phone, laptop) is the wrong “temperature”. They tell your body that it is still day, even if it’s long past your bed time.

Continue reading »

Jan 222011
 

I’ve been enjoying Pandora Radio for several years. It has been a great way to discover new artists and even new genres of music. I doubt I’d ever have learned of the existence of Dubsteb without Pandora – see my Music, Movie and Book Recommendations page to hear samples of my latest discoveries.

However, the web client was built on Adobe Flash, which makes it a bit of a CPU hog. I’ve long known that playing Pandora used up a lot more CPU time than playing other music (roughly 50% of the CPU for Pandora vs ~1% of the CPU for an MP3 or OGG). Thankfully, I have found a way to reduce the CPU load considerably.

Continue reading »

Jan 142011
 

Yesterday I needed to install a telnet client to finish re-configuring my wifi router (telnet turns out to be a handy tool for testing services such as mail servers – don’t use it for remote shell logins). Because general use of telnet is very insecure and frowned on by admins everywhere, this turned out to be a bit of a pain on my Gentoo installation. It didn’t look like I could install a telnet client without also installing a telnet server, which I definitely don’t need!

Thankfully, I learned that I already had a telnet client installed: GNU screen! Besides being an all-round useful tool for shell sessions, screen is easy to use as a telnet client:
# screen //telnet [host] [port]

As an example of something telnet is still useful for, suppose you needed to test the basic functionality of your mail server:

# screen //telnet mail.example.com 25
helo
mail from:<eliot@example.com>
rcpt to:<postmaster@example.com>
data
This is the body of the test e-mail.  Make sure it ends with CRLF . CRLF

.

quit

Thanks to Google Postini for the details on SMTP sessions – I can never remember the details.