Tuesday, January 31, 2012

Writing a .iso to a USB drive in Linux

I've recently been attempting to test the lastest LTS release of Ubuntu: 12.04 Precise Pangolin on a touchscreen laptop recently retired from active service in my agency. I grabbed my .iso and tried first with UNetbootin, only to be dumped rather unceremoniously to a (initramfs) prompt with BusyBox.

After failing in my first attempt I decided to try some advice I found here: simply umount /dev/sdc1 (or whatever) then cat diskimage.iso > /dev/sdc1. While this did appear to create a good disk, I was unable to boot it at all.

Then after reading the bootable USB creation instructions on the Ubuntu page I decided to try the Mac methodology since I've used dd for this purpose before and I see no reason why this wouldn't work on Linux. Strangely though, it did not.

The eventual solution I found was to rename the .iso to .img and use usb-imagewriter from the ubuntu repositories. *shrugs*

Sunday, January 22, 2012

Laptop S-video in Black & White

One of my media computers is connected to one of our TVs via s-video -> RCA. This has proven to be a right fine solution and even though it's a rather old machine (P4, 512Mb RAM) it's proven sufficiently powerful to play 720p content over the network. Unfortunately for some reason outside my control it recently began only displaying video in black and white on the s-video port. I did some preliminary research on Google and found all kinds of weird and incorrect answers.

In the end it turns out the video output had been set for PAL color instead of NTSC. The actual fix for this will vary by graphics chipset so I won't go into much detail here, but just in case someone else is wondering why their s-video output switches to black and white: check the color encoding!

Friday, January 20, 2012

HTML5 Benchmarks

I've been looking at HTML5 benchmarking sites this morning and thought I'd post them all together:

This last one in the list is particularly interesting as it not only provides a direct comparison of these different animation techniques but also has configurable CGI parameters to change many of the variables involved. Fun!

Thursday, January 19, 2012

SVG in Android Browser

I learned to my disappointment today that my favorite android browser Dolphin HD doesn't support Scalable Vector Graphics (SVG).  Luckily Firefox does!  I'm currently giving the beta version a try for checking the bandwidth usage monitor in DD-WRT, but it seems quite quick for general browsing as well.

Setting up SPAN for packet sniffing on a Cisco Catalyst

The documentation on this subject is extensive and like all things Cisco somewhat archaic. I'm posting this here in an attempt to simplify and as a reminder to myself the next time I need to do this. Telnet in to your switch and issue the following commands:

1) enable
2) configure terminal

3) no monitor session all
4) monitor session 1 source interface fastEthernet0/1 both
5) monitor session 1 destination interface fast/Ethernet0/10
6) end

Command 3 clears any existing SPAN sessions. You can change the port number at the end of command 4 to the port of the uplink on the switch to monitor all traffic.  Alternately you can specify a range of ports. Change the port number at the end of command 5 to the port on which you intend to set up your sniffer. In order to turn the SPAN off then rerun the first three commands. That's basically all there is to it. Now plug in a laptop to the monitor port and run dumpcap on the ethernet interface.

Friday, January 6, 2012

CPU & RAM Info in Linux

I'm posting this because I've found myself having to look it up more than once. If you find yourself on an unfamiliar Linux system and need the CPU or RAM information you can simply cat /proc/meminfo for RAM, or cat /proc/cpuinfo for CPU. Easy as pi!

Thursday, January 5, 2012

jQuery quickSearch Dynamic Row Count

I just spent an hour struggling to find a solution to what seemed to be a fairly simple problem. I have a webpage comprised primarily of a large table and a textbox which uses a jQuery plugin quickSearch to filter the table. What I wanted then was a dynamic count of the rows returned by quickSearch. In the end this was accomplished wih the following code in the HTML:
Results: <p id="count"></p>
And the addition of this argument to the quickSearch function directly after the "loader:" argument:
onAfter: function() {
document.getElementById("count").innerHTML=($('tr:visible').length-1);
}
Now, if one's quickSearch use were doing something other than simply setting rows to hidden then this example may not work exactly as shown, but this may be useful for other applications as well.

Wednesday, January 4, 2012

Android FOSS Market

I'm always in the market for free Android software (free as in beer and/or speech). Today I came across F-Droid which is a new market catering solely to FOSS software. They have an app as well as a convenient mobile interface for downloading packages. androidVNC is already listed as well as a number of other very useful applications. I'm sure this resource will only grow with time.

Monday, January 2, 2012

Sanyo 2016 Rehab

Lately my interest in vintage stereo equipment has been waxing (no pun intended). In this vein I recently purchased a Sanyo 2016 receiver from Craigslist. I had been informed by the seller that the volume know was a little scratchy and might need to be cleaned. When I got the unit home and plugged in for testing, however, I found that all of the knobs were in terrible shape. I had crackling, drop outs in one or either channel and overall very poor sound quality. After a bit of research I found this thread which suggests using a product called DeOxit. I purchased the DeOxit at my local Radio Shack and used it as described in the linked thread. I am now proud to say the receiver works as well as I could have ever hoped for. My only regret is not buying the bigger bottles as I have a pair of vintage Pioneer SE30 headphones in need of similar treatment.