Entertainment Center Power Consumption

I used my Kill A Watt to measure the power consumption of various items in my entertainment center.

PVR

Antec case, Biotstar TF-7050M2 motherboard, Hauppauge tuners, 2.5″ Hitachi drive.

  • 80 watts peak at bootup
  • 65 watts nominal

Dell 2001FP 20.1″ LCD monitor

(not normally part of my entertainment center, but I was using it to reconfigure the PVR’s BIOS, so it was in the general area)

  • Monitor off: 1 watt
  • Monitor asleep: 3 watts
  • Monitor active: ?? watts

XBox 360

  • Off: 3 watts
  • Starting up: 160 watts
  • Loading GTA IV: 155 watts
  • In-game: 188 – 195 watts

Samsung 32″ CRT television

  • Off: 3 watts
  • Startup: 483 watts (momentary)
  • On: 92 watts
Posted in Electronics | Leave a comment

SSH Key Generation and Conversion With OpenSSH

Key Generation

Generate a DSA key:

ssh-keygen -t dsa

This will generate an RFC 4716-formatted key file similar to the following:

-----BEGIN DSA PRIVATE KEY-----
MIIBuwIBAAKBgQDijfpmyXBZpnq8EhEhSxeJz7fNxIlWYD6t7bviDZMARh8mLCr2
bug2J1K+Rl4qoLQJ7zRGlytwQ2krTCmvVahOjy9m/QW5936rCyVS19PRdJMEEMSN
vLQaMtpKbnHp0z8Xs/X1CkDmxThOlvRVjiObdd0U9eELLoo5VHauVHmufwIVAO7j
l4bxgVXeX09WJcyOXAUauNXHAoGAF20ESXgTvbbdxDECa2tfTi/j1/+emNV/+zuR
aq6xms/K0piZhMlkK3BD9PgHhXfqZuRT/Z9b8ja3nR34H2KL3UInCNV6kSq6h+MD
MLJnNQG4wADLYw3p5Tzz/hUwtfqpZ/9e7FpBdgfooS274GgPKTG8BFRiudIztPpK
4GueicoCgYEAy8hllDrFzQUqFG0kMe8r3dOFDjMQHf6ITttmAiScwEPg+a5D++Sq
bj42vkKSNgaYHc+Z8QPgerPehIkBde6wx0ukq0a8IXy8F86IasXz3wzotPeJsdKi
mynQKzhSm9Jzbk/SK/yh5NGhJzz1VmHsg+ir/qReguMHfqDGCI4kSFYCFDJKXQ4h
MteJHSlu62RrGwInRBOh
-----END DSA PRIVATE KEY-----

An accompanying, OpenSSH-formatted public key file should also be generated under the same file name with a .pub suffix. It should appear similar to the following:

ssh-dss AAAAB3NzaC1kc3MAAACBAOKN+mbJcFmmerwSESFLF4nPt83EiVZgPq3t
u+INkwBGHyYsKvZu6DYnUr5GXiqgtAnvNEaXK3BDaStMKa9VqE6PL2b9Bbn3fqsL
JVLX09F0kwQQxI28tBoy2kpucenTPxez9fUKQObFOE6W9FWOI5t13RT14QsuijlU
dq5Uea5/AAAAFQDu45eG8YFV3l9PViXMjlwFGrjVxwAAAIAXbQRJeBO9tt3EMQJr
a19OL+PX/56Y1X/7O5FqrrGaz8rSmJmEyWQrcEP0+AeFd+pm5FP9n1vyNredHfgf
YovdQicI1XqRKrqH4wMwsmc1AbjAAMtjDenlPPP+FTC1+qln/17sWkF2B+ihLbvg
aA8pMbwEVGK50jO0+krga56JygAAAIEAy8hllDrFzQUqFG0kMe8r3dOFDjMQHf6I
TttmAiScwEPg+a5D++Sqbj42vkKSNgaYHc+Z8QPgerPehIkBde6wx0ukq0a8IXy8
F86IasXz3wzotPeJsdKimynQKzhSm9Jzbk/SK/yh5NGhJzz1VmHsg+ir/qReguMH
fqDGCI4kSFY= user@hostname

Export Public Key in RFC 4716 Format

Given a private key, export its public key:

ssh-keygen -e -f private_key

This will generate a RFC 4716 output similar to the following:

---- BEGIN SSH2 PUBLIC KEY ----
Comment: "1024-bit DSA, converted from OpenSSH by user@hostname"
AAAAB3NzaC1kc3MAAACBAOKN+mbJcFmmerwSESFLF4nPt83EiVZgPq3tu+INkwBGHyYsKv
Zu6DYnUr5GXiqgtAnvNEaXK3BDaStMKa9VqE6PL2b9Bbn3fqsLJVLX09F0kwQQxI28tBoy
2kpucenTPxez9fUKQObFOE6W9FWOI5t13RT14QsuijlUdq5Uea5/AAAAFQDu45eG8YFV3l
9PViXMjlwFGrjVxwAAAIAXbQRJeBO9tt3EMQJra19OL+PX/56Y1X/7O5FqrrGaz8rSmJmE
yWQrcEP0+AeFd+pm5FP9n1vyNredHfgfYovdQicI1XqRKrqH4wMwsmc1AbjAAMtjDenlPP
P+FTC1+qln/17sWkF2B+ihLbvgaA8pMbwEVGK50jO0+krga56JygAAAIEAy8hllDrFzQUq
FG0kMe8r3dOFDjMQHf6ITttmAiScwEPg+a5D++Sqbj42vkKSNgaYHc+Z8QPgerPehIkBde
6wx0ukq0a8IXy8F86IasXz3wzotPeJsdKimynQKzhSm9Jzbk/SK/yh5NGhJzz1VmHsg+ir
/qReguMHfqDGCI4kSFY=
---- END SSH2 PUBLIC KEY ----

Convert Public RFC 4716 to Public OpenSSH Format

Convert the exported public key from RFC 4716 format to OpenSSH format (for use in an authorized_keys file, for example):

ssh-keygen -i -f public_key

This will generate OpenSSH-formatted output similar to the following:

ssh-dss AAAAB3NzaC1kc3MAAACBAOKN+mbJcFmmerwSESFLF4nPt83EiVZgPq3t
u+INkwBGHyYsKvZu6DYnUr5GXiqgtAnvNEaXK3BDaStMKa9VqE6PL2b9Bbn3fqsL
JVLX09F0kwQQxI28tBoy2kpucenTPxez9fUKQObFOE6W9FWOI5t13RT14QsuijlU
dq5Uea5/AAAAFQDu45eG8YFV3l9PViXMjlwFGrjVxwAAAIAXbQRJeBO9tt3EMQJr
a19OL+PX/56Y1X/7O5FqrrGaz8rSmJmEyWQrcEP0+AeFd+pm5FP9n1vyNredHfgf
YovdQicI1XqRKrqH4wMwsmc1AbjAAMtjDenlPPP+FTC1+qln/17sWkF2B+ihLbvg
aA8pMbwEVGK50jO0+krga56JygAAAIEAy8hllDrFzQUqFG0kMe8r3dOFDjMQHf6I
TttmAiScwEPg+a5D++Sqbj42vkKSNgaYHc+Z8QPgerPehIkBde6wx0ukq0a8IXy8
F86IasXz3wzotPeJsdKimynQKzhSm9Jzbk/SK/yh5NGhJzz1VmHsg+ir/qReguMH
fqDGCI4kSFY=
Posted in Cryptography, Technology | Leave a comment

Compiling X264 on Ubuntu

I noticed that HandBrakeCLI displayed this message:

x264 [info]: using cpu capabilities: none!

I thought that, perhaps, I could gain some performance by recompiling x264 directly for my AMD dual-core, 64-bit CPU. It turned out to be quite a task.

gpac

Get gpac (check the project’s download page for the latest version):

wget http://downloads.sourceforge.net/gpac/gpac-0.4.4.tar.gz

Unpack gpac:

tar xvzf gpac-0.4.4.tar.gz
cd gpac

make configuration script executable:

chmod u+x configure

Configure:

./configure

Compile:

make

X264

Install subversion:

sudo apt-get install subversion

Install yasm:

sudo apt-get install yasm

Retrieve x264:

cd ..
svn co svn://svn.videolan.org/x264/trunk x264
cd x264

Copy in gpac headers:

cp -R ../gpac/include/gpac .

Configure x264 and build:

./configure --enable-mp4-output --enable-shared --extra-ldflags=-L../gpac/bin/gcc
make
Posted in Technology | Tagged , , , , , , , , , | Leave a comment

Yay for Ft. Lauderdale Airport

Free, open wireless. Not like lousy Dallas airport, which only has T-Mobile Hotspots ($$$).

Posted in Travel | Leave a comment

Edirol MA-15D ‘Micro Monitor’ Speakers

A random YouTube video reminded me of one of the most disappointing product experiences I’ve ever had.

A few years back, my employer gave us each $500 to spend on office improvements, since we completed a project well under schedule. Since I like to listen to music while I code, and I’m picky about my audio, my first thought was to a good quality speaker setup.

I began researching the topic online. Unfortunately, it seems like most online reviews of these sorts of speakers are written by people with no audio experience beyond the pair that came with their Dells. I’m no fan of typical “audiophile” hocus-pocus reviews, but the online reviews I saw failed to mention noise levels, frequency response, or any other meaningful points of comparison.

In the end, I settled for what was touted as the best value in the ‘Micro Monitor’ world, the Edirol MA-15D. I ordered from MusiciansFriend.com, since they had the best price and a decent return policy.

I was extremely disappointed to find that the sound quality was quite miserable. First, the background hiss was intolerable. I don’t know if other people simply don’t notice it, or if they don’t realize it shouldn’t be there. I plugged the speakers into several audio sources to verify that the hiss was, in fact, from the Edirol’s built-in amplifier. Even with no source plugged in at all, the hiss was exactly the same.

Additionally, they distorted quite easily, and there was no transparency to the sound. Overall, they just seemed like very low-grade PC speakers. A step up from those crappy Dell pod speakers, but honestly not by much.

Luckily, MusiciansFriend.com had a good return policy. I sent the awful Edirols back, and ordered a pair of NHT SuperZero XU speakers, and began scouring Craigslist for a small amplifier. Ultimately, I found a small Rotel amplifier for around $150, which has provided me with fantastic sound for several years.

Posted in Technology | Tagged , , , , , , , , , | Leave a comment

Console Replacement for Windows

The Windows Console is an abomination. In this modern word of mice, cut and paste, and fast video output, it’s slow, painful to use, and ugly.

As it turns out, there’s an Open Source project called, appropriately enough, Console. This project aims to address these long-standing shortcomings of the Windows console.

SourceForge Console application screenshot

Great Things

  • Proper selection without having to go to the System menu and select ‘Mark’
  • Tabs!
  • Tab title updates with name of running executable
  • Customization of the UI: toggle tabs, status bar, menu bar, tool bar
  • Supports copy on select. This will be familiar if you use PuTTY. It means selected text is automatically copied to the clipboard.

Not-So-Great Things

  • Tab title isn’t customizable
  • Colors cannot be set on a per-tab basis
  • Context menu contains a duplicate of the full Window menu, even though you likely only want the Edit menu contents

Overall, I’m very impressed with the status of the project, and I look forward to contributing to it!

Posted in Technology | Tagged , , , , , , , | Leave a comment

Windows Vista UAC Goofiness

Windows Vista UAC is not always a predictable beast.

Today I found out that if an executable doesn’t set level="asInvoker" in its manifest, UAC confirmation will kick in if any of the following substrings appear in the filename:

  • setup
  • install
  • update

A digital signature does not affect this behavior.

Besides adding “asInvoker” to the manifest, another workaround is to rename the executable to remove the trigger word. For example, renaming MyProductUpdater.exe to MyProductRenewal.exe will (for now) bypass the UAC logic.

Note that this in no way bypasses the protections of UAC. Functions which perform some task which requires UAC-approval will simply fail. This will only be useful if you have an update tool which only updates user-owned resources, since that doesn’t require UAC-approval.

Posted in Technology, Win32 | Tagged , , , , , , , | Leave a comment

Hacking the Buffalo TeraStation Live

The Buffalo TeraStation Live is a NAS device which uses an embedded, ARM-based computer running a variant of Linux. Originally, I wanted to enable NFS, though later I stuck with CIFS/Samba. However, enabling SSH access proved invaluable for performing backups without having to worry about whether or not my Mac was able to automount the CIFS/Samba share.

Enable Telnet Logins

As this guide details, acp_commander is used to enable telnet logins and deploy addons.tar to the TeraStation. What the guide doesn’t mention is that acp_commander may fail, I had to run it several times before it succeeded. Here is the output from my successful run:

macbook:~/TeraStation jeff$ java -jar acp_commander.jar -t 192.168.1.9 -o -addons
ACP_commander out of the linkstationwiki.net project.
Used to send ACP-commands to Buffalo linkstation(R) LS-PRO.

WARNING: This is experimental software that might brick your linkstation!


Using random connID value = 07CAA8F945F3
Using target:   raid/192.168.1.9
Authenticate:   OK (ACP_STATE_FAILURE)
Installing addons.tar ...
creating directory...   OK
Didn't find  locally, looking at
http://downloads.linkstationwiki.net/Uploads/LSPro/Binaries/
java.io.FileNotFoundException: /192.168.1.9/share/acp_commander/addons.tar (No such file or directory)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.(FileOutputStream.java:179)
        at java.io.FileOutputStream.(FileOutputStream.java:70)
        at acpcommander.FileSystem.copyFile(FileSystem.java:44)
        at acpcommander.acp_commander.main(acp_commander.java:862)
start telnetd...        OK (ACP_STATE_OK)
Reset root pwd...       Password changed.


You can now telnet to your box as user 'root' providingno / an empty password.
macbook:~/TeraStation jeff$ 

Note that, in this run, addons.tar wasn’t successfully retrieved and deployed. addons.tar provides wget, su, and joe.

Add Software

The TeraStation Live uses an ARM processor just like the Linksys NSLU2. The NSLU2 has a great community, so there are a large number of pre-built modules available.

Posted in Linux, Technology | Leave a comment

XML + XSLT Won’t Render in Firefox

In an attempt to create some easily customizable Kanji flashcards, I put all the class handouts into an XML file and wrote an XSLT file to transform it into HTML.

Internet Explorer was able to render the resultant HTML table, but Firefox would simply show me unformatted text. Ultimately, the problem turned out to be with my xsl:stylesheet declaration.

Good

This declaration worked under both IE and Firefox:

   <?xml version="1.0" encoding="utf-8" ?>
   <xsl:stylesheet version="1.0"
                   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                   xmlns:h="http://www.w3.org/1999/xhtml">

Bad

However, this version would only render under Internet Explorer:

   <?xml version="1.0" encoding="utf-8" ?>
   <xsl:stylesheet version="1.0"
                   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                   xmlns="http://www.w3.org/TR/xhtml1/strict">
Posted in Technology | Tagged , , , , , | Leave a comment

How Many Chocolate-Covered Espresso Beans to Kill Me?

Someone at work left an open tub of Trader Joe’s chocolate-covered espresso beans in the break room. Unable to resist their chocolaty siren’s call, I soon myself munching them down like Skittles. Since I’m unavoidably somewhat morbid, this got me thinking, just how many of these would it take to kill me?

Well, this required a bit of research…

How Much Caffeine Is Lethal?

According to Wikipedia, the LD50 (median lethal dose, i.e. the dose at which 50% of subjects die) in humans is estimated to be around 150 to 200 milligrams per kilogram of body mass.

I weigh on the order of 180 pounds. (actually, slightly more) That’s 81.65 kilograms. Given 150 to 200 grams per kilogram, that works out to 12247.5 – 16330 milligrams.

So, it would take between 12.25 and 16.33 grams of caffeine to kill me.

How Many Beans?

Acccording to this coffee FAQ, a chocolate-covered espresso bean contains 3 – 5 milligrams of caffeine. So, it could take anywhere from 2,450 and 5,443 chocolate-covered espresso beans to kill me.

How Many Tubs?

27 beans adds up to 2.0 ounces. Since a container of Trader Joe’s chocolate-covered espresso beans is 14 ounces, that makes approximately 190 beans per container.

So, I would have to eat between 13 and 29 tubs in order to die of caffeine overdose.

Outstanding Questions

What is the timeframe in which all these beans would have to be consumed?

What is the actual physical volume of all these beans?

Posted in Funny | Tagged , , , , , | 2 Comments