The budget geek in search of a cheap fix

November 17th, 2009

Some folks can plop down many hundreds of dollars on iPhones, the latest console game machines (and their pricey games) and Uber desktops. Once in a great while I get to spend a little money to geek out on some kind of technology too, though I have to be a bit more frugal. Usually it’s something old that is cheap on eBay. I’ll look for something that will run Linux and has some novel quirk. One of these was an old Itronix 250 military laptop. The device was waterproof, drop-onto-concrete-proof and weighed more that my 2 other laptop machines combined. I upgraded the processor, hacked in a wifi card and antenna, installed a few various versions of Ubuntu and tried with success to get all the features like touchscreen and graphics drivers working nice. Even though it wasn’t the latest gadget, it was cheap for thrills and exercising the Linux skills. When I sold it (for a bit less than all the time and money I put in) I felt I’d had a good deal of fun with it, like working on an old VW bug. One thing I wish I had tried on it was TinyCore Linux founded by one of the lead developers of the famous DSL project, Robert Shingledecker.  TinyCore takes the idea of a compact yet extensible graphical Linux desktop to the extreme at 10MB!  I think it would also work on an Alix3d3 machine I’m experimenting with.  Currently Voyage is running on the  Alix and humming along quite nicely as a “bulletproof” looping video display device running mplayer with a DVD iso file.  The Alix now looks a bit dated in the graphics compared to the new Ion based tiny PCs out there, but it is still more flexible in some ways and durable.  These little machines are cheap and fun to hack not unlike various wireless routers such as the venerable Linksys wrt54g of old (2.2 and earlier) and the Asus wl500w.  The latter I bought because it had a minipci slot instead of the radio being part of the main board and its usb ports to support the TB drive shared on my little network.  It was a great candidate for the OpenWRT firmware and I found others who had made it work well.  All these things are cheap and distracting, some have proven quite useful.  One thing that really makes it fun is the community.  Because others have written blogs, posted in forums, mailing lists or chatted in IRC, I never feel alone in the dark.   I think this is where the real entertainment value is, especially when we contribute to these conversations with our own experiences, questions, reviews, how-to’s etc.

Epic Fail

April 14th, 2009

When one of the oldest and largest telco providers in the world cannot figure out how to run a pair of copper wires to an apartment in Chicago.  When it places a long-time customer on hold for most of the duration of a call to check on the status of his order only to transfer to someone who can only tell him to check back later.  When this company never calls or emails with a reason the customers order for service being delayed.  When the online status check tool tells him the account number sent to him is invalid.

2.6.28.8 Kernel for Alix 3d3 with joystick module

March 18th, 2009

I wanted to add a kernel module for my Alix 3d3 but I figured I would just build a more current kernel for the Voyage Linux 6 installation instead.  Because I am a total weenie, I got excited about a cool program called KernelCheck.  It’s basically a GUI for building configuring and packaging (yes Debian packaging!) the latest greatest kernel from kernel.org.  I built the kernel from my Ubuntu machine using the latest config file from the Voyage kernel, enabled the joystick module and installed the resultant .deb in Voyage.  w00t!
linux-image-2.6.28.8-ultimate_2.6.28.8-ultimate-10.00.Custom_i386.deb

headers if you need ‘em :

linux-headers-2.6.28.8-ultimate_2.6.28.8-ultimate-10.00.Custom_i386.deb

enjoy!

More one-liners!

February 14th, 2009

I just noticed this one tonight, check out Command-line Fu for lots of great shell-j00ky!
Thanks again to NixCraft for the link!

How I love AWK, let me delimit the ways…

February 14th, 2009

tonight I came up with a super handy one-liner to handle a massive number of split files that were in groups:

ls -1 -Q *.001 | awk -F'.' '{print $1"."$2"\"""\ "$1"."$2".\?\?\?\""}' | xargs -l1 par2repair

see, I had a folder whose contents look like this:

file1 space [123456a].ogg.001
file1 space [123456a].ogg.002
file1 space [123456a].ogg.003
file1 space [123456a].ogg.004
file1 space [123456a].ogg.005
...
file1 space [123456a].ogg.par2
file1 space [5321fff].ogg.vol00+01.PAR2
file1 space [5321fff].ogg.vol00+02.PAR2
...
file2 space [5321fff].ogg.001
file2 space [5321fff].ogg.002
file2 space [5321fff].ogg.003
file2 space [5321fff].ogg.004
file2 space [5321fff].ogg.005
file2 space [5321fff].ogg.006
....
file2 space [5321fff].ogg.par2
file2 space [5321fffa].ogg.vol00+01.PAR2
file2 space [5321fff].ogg.vol00+02.PAR2...
file3...
and so on...

WHAT A MESS! If it looks familiar, you must be some kind of otaku!

At first I would manually join all the files in one group that end with a period and three numbers with a cat command

cat file1\ space\ [123456a].ogg.??? > file1\ space\ [123456a].ogg

but even with tab completion, it was tedious, and I would still have to check them with par2repair (usually with the help of pypar2) to make sure they were in good shape!

THERE HAS TO BE A BETTER WAY!!!

after some searching for scripts to join files and coming up with nothing that could handle multiple GROUPS of files, I noticed a blog post that mentioned par2repairs ability to join the split files into the missing file and verify in one step! Just give it a list of files to search from for pieces:

par2repair file1\ space\ [123456a].ogg file1\ space\ [123456a].ogg.???

that simplified the process enough for my feeble mind to formulate a line, but first I needed to rip the extensions off the filenames. Some folks seem to like the “basename” command, but I could not wrap my head around it. AWK could do it if I could use a period as the delimiter. Of course it can!

First lets list the first file of each group, wrap it in (-Q)uotes, and make sure there is one name per line:
ls -Q -1 *.001
which gave me:
"file1 space [123456a].ogg.001"
"file2 space [5321fff].ogg.001"
"file3 space [af23498].ogg.001"
...

now I want to pass that on to AWK, delimit vars by “.” and spit out just the first two vars(with the period added back in between!):
ls -1 -Q *.001 | awk -F'.' '{print $1"."$2}'
but it also truncated the end quote, DOH!
"file1 space [123456a].ogg
"file2 space [5321fff].ogg
"file3 space [af23498].ogg

Thats OK, I can have AWK add the quotes (spaces, wildcards, etc. all escaped) back in as well as the rest of the arguments I want to pass on to par2repair!
ls -1 -Q *.001 | awk -F'.' '{print $1"."$2"\"""\ "$1"."$2".\?\?\?\""}'

that looks like a mess but it’s just because of the escape sequences:
“/ ” is an escaped space character (like the %20 you might see in a URL)
“/?” is an escaped question mark (the wild card for a single character)
“/”" is an escaped double quote

so the above command gives an output of:
"file1 space [123456a].ogg" "file1 space [123456a].ogg.???"
"file2 space [5321fff].ogg" "file2 space [5321fff].ogg.???"
"file3 space [af23498].ogg" "file3 space [af23498].ogg.???"

which is perfectly formatted so that I can pipe each line of that (with the help of xargs -l1) to a separate par2repair command!
BAM!

ls -1 -Q *.001 | awk -F'.' '{print $1"."$2"\"""\ "$1"."$2".\?\?\?\""}' | xargs -l1 par2repair

now if you want to add a bit to delete the processed files, you are on your own!

Credits:
I got help for the AWK delimiting on NixCraft:
http://www.cyberciti.biz/tips/processing-the-delimited-files-using-cut-and-awk.html
A post on the Ubuntu forum that inspired me to come up with a better way..
http://ubuntuforums.org/showthread.php?t=321142
I’ll post the one-liner there now… :-)

Shell Shout-Outs: iftop

November 28th, 2008

Folks may shun the shell when using their computers but honestly, there are some great treasures to be found.  Today I’ll highlight a great little network bandwidth and connection monitor called iftop.
This handy terminal tool shows a near real-time display of connections to or from your computer through a network device. It will give you a nice little bar-graph representation as well!

iftop screenshot

You can install it in Ubuntu or Debian with a quick:

$ sudo apt-get install iftop

Then try this to see whats happening on your wireless card:

$ sudo iftop -i wlan0 -P

the “-i ” specifies your network device that you can find with:

$ ifconfig

enjoy!

New Home for the Blue Line Riders

November 23rd, 2008

The Blue Line Riders logo

 There are blue line riders and then there are The Blue Line Riders. Having been the former since moving to the Second City and now enjoying the latter while traveling to and from work as the former is only natural and so typically Chicago. If that were not enough, I’ve now been charged with building a new website for the most excellent Blue Line Riders! In case you’ve not had the pleasure of their sweet sounds upon your ears, you owe it to yourself to give a listen to the streaming mp3’s at bluelineriders.com.

A Mad Knight’s Tour

November 16th, 2008

Mad Knight’s Tour

I’ve been working on a game for my Web Art class and I think it’s far enough along to share.  It’s basically an interactive, but randomly generated story coupled with the classic game of Knights Tour on a very tiny board.  Mad Knight’s Tour is made in a single page (plus a file for CSS and some images) with JavaScript.  Enjoy!

Ubuntu 8.10 Intrepid Ibex Beta

October 12th, 2008

I must say that Ubuntu 8.10 is really shining on my tablet.  I made a live USB stick of 8.10 with the slick usb-creator app (works from 8.04 too) and booted up with correct resolution (1280×800), perfectly working wireless (intel4965agn adapter) that could connect with my university TTLS/PAP wifi network.  Even the SDHC card reaader is working with my 16GB card! Suspend also worked flawlessly and faster as well (2 or 3 seconds instead of 4 or 5).  Wireless comes back quickly too.  In Hardy I had to wait about 10 seconds before wireless came back online, now it reconnects almost instantly.

gimp26.png
The only major snag was having to manually futz with the xorg.conf to get my tablet to work.  Once configured, I played with GIMP, recently updated to 2.6!  GIMP is much improved for tablet support and has some nice options for changing brushstokes with not only pen pressure, but also velocity!  This is as close to painting on a real surface that I’ve seen in any non-custom paint program.

GNOME 2.24 Display Prefs
GNOME desktop configuration is much tighter with the Appearance preferences.  The new, darker, human theme is great for those who work in the late hours with lights low or in dimly lit cafes.  I eventually switched back to XFCE for desktop, because of fast rock solid panels (GNOME panels are still relatively sluggish, even with animation turned off and low delay settings).  GNOME does have a very nice way of altering the display settings though.

The main reason for trying 8.10 was the new kernel and wireless stack, and I must say that the increased hardware compatability is well worth it!

Still Alive

September 18th, 2008

Been busy with work and family lately.  I did finally upgrade all the machines to Ubuntu Hardy, I must say its been great, and am look forward to 8.10.  Intrepid Ibex is compelling with its updated wifi stack and hardware support in general.

It’s nice to not have to worry much about the OS I’m using.  I think GNU/Linux has several distros with mature desktop user design that will enable it to become ubiquitous on the desktop.  It’s fun to pop in a Ubuntu CD or USB stick a boot a modern, well equipped desktop into a machine that is not functioning with its original and often outdated system, and have everything working without an additional download!

I think we are getting back all the fun and sharing community that existed back in the earlier Amiga, C64 and neighborhood BBS days, but with added accessibility for newcomers, an atmosphere of conscientious freedoms, and a neighborhood that transcends not only distance but culture.  By conscientious freedom, I mean the awareness of responsibility we begin to feel as we understand the nature of Free Open Source Software.  Putting these beliefs in context with increasing endangerment and loss of our personal freedoms might make us more aware of what we need to do to restore hope and foster change.  Every bit helps.