Tuesday, March 30, 2010

Other: Fax Re-dux

I had to fax another form today. This one had some vital information which was in smaller-than-average print and as I was previewing it before sending, I noticed that a lot of the print was practically illegible. I decided to try converting the BMP to a B&W PBM using the Gimp, then using pnmtotiff. Much better.

Wednesday, March 24, 2010

Other: Faxy Lady

Well, it's official! I am soon to be gainfully employed! I just faxed in my signed offer letter! So, of course, I got to practice and refine my FreeBSD faxing skills. Here's an update:

  • I decided to see if my crappy scanner would work with SANE. The docs said the model was supported and worked reasonably well, and in fact the program did recognize the scanner and got it to make scary noises, but it would just hang after the physical scan stopped, so I gave up because I didn't much care and just scanned under Windows. This time I decided to save it in BMP, just because NetPBM supports it and it's not a lossy format.
  • Now, here's the sweet part. The fax was four pages, named p#.bmp. I got this conversion thing down now:
    > bmptoppm p1.bmp | ppmtopgm | pamditherbw | pamtopnm | pnmtotiff -g3 -rowsperstrip 2500 > p1.tif
    > bmptoppm p2.bmp | ppmtopgm | pamditherbw | pamtopnm | pnmtotiff -g3 -rowsperstrip 2500 > p2.tif
    > bmptoppm p3.bmp | ppmtopgm | pamditherbw | pamtopnm | pnmtotiff -g3 -rowsperstrip 2500 > p3.tif
    > bmptoppm p4.bmp | ppmtopgm | pamditherbw | pamtopnm | pnmtotiff -g3 -rowsperstrip 2500 > p4.tif
    > tiffcp -c g3 p[1-4].tif fax.g3
  • Then I copied it over to the old machine with the hardware modem and boom! (Well, actually, I wondered why the modem couldn't dial and eventually realized I had accidentally unplugged the phone line when I was messing around with stuff last week. But once I plugged it in again, boom!)

Tuesday, March 23, 2010

News: It's That Time Again

Today is Free Cone Day at Ben & Jerry's! Run!

Transpo-stuff:


Dumbass techno-stuff:
  • If The Godfather had been written in the Internet age, Michael Corleone would have gotten busted while in hiding because he had a compulsion to update his Facebook page, just like this real-life Mafia boss. Dumbass.
  • However, the Dumbass of the Week Award is split between two complete morons who decided they needed to tweet death threats against the President. Um, threatening to kill the PotUS is a Federal offense, and unless you enjoy receiving visits from pissed-off Secret Service agents, I wouldn't recommend it. But then again, taking my sage advice and being a dumbass are antithetical.


Misc-o-stuff:
  • The title of this book may be Fifty Dangerous Things (you should let your children do), but let's face it, there are probably some lessons in there some adults still need to learn.
  • This woman bought a McDonald's Happy Meal, put it on a shelf behind her computer for a year, and then found that a year later, it shows no signs of decay. Not only that, but even vermin didn't to try to get at it. Um, gross.
  • Boing Boing posted about an artist who dresses her baby up as famous dictators and snaps her picture. Nina Maria Kleivan claims that she wants to remind people that we are born neither good nor evil. I think the underlying reality she is really tapping is that babies are amoral dictators who will take over your lives.
  • Boing Boing also posted some Victorian slang terms, one of which I will now use in a sentence: "I spent 30 minutes on hold with the DMV yesterday listening to the tune the old cow died of." And, you know, Muzak isn't free. My tax dollars pay for that crap which serves no purpose other than to induce physical pain.
  • Artist Diem Chau carved these amazing Chinese zodiac animals from her Crayola crayons. Wow.

Tuesday, March 16, 2010

News: The ZOMG It's So Cuuuute! Special Edition

Poor Woman's Korilakkuma Laptop
FAIL: Amigurumi + laptop + scotch tape != Korilakkuma netbook
I know I just posted some news not two days ago, but I just saw this and could not keep it to myself: a Korilakkuma touch-screen netbook! Awwwwwwwwwwwwesome! (They incorrectly call it Rilakkuma, but you can tell it's actually Rilakkuma's little sidekick by the cream color and particularly by the red button.)

A few other things:

Sunday, March 14, 2010

News: Week Whatever

Roads and rails:

Whiteboard Jungle:
  • As a systems engineer, I apparently have the best job in America. Well, if I were employed.
  • This is just balloonacy awesomeness:

Miscellany:

Friday, March 12, 2010

Other: Faxing in the Geekiest Way Possible

I don't own a fax machine. I almost never need one. However, today I need to fax some forms to my future (crossing fingers) employer. Yes, I could go down to the local copy shop and pay an absurd amount, but I'm cheap. However, I having successfully faxed stuff in the past using FreeBSD, but it's so rarely done that I have to mess around each time to remember how to do it. I'm writing this post as much for my benefit as anyone else's.
Background:
  • I have an old computer which I used to dual-boot with FreeBSD (which has the 6-year-old FreeBSD 5.2.1 installed but isn't worth upgrading), but is now my lame Windows XP box for stuff that won't run on FreeBSD. (I still cannot for the life of me get Flash to work on FreeBSD since I upgraded to 8.0, for instance.)
  • I also have a desktop, now running FreeBSD 8.0, which I use for Real Stuff, like email and playing Puzzle Pirates (cough).
  • The old computer has a PCI hardware modem card, which I had to purchase when I bought it as (a) I was still dialing up, and (b) FreeBSD (and Linux) has a very hard time dealing with the winmodem (aka software modem, aka losemodem) that has been standard for years. (If you're really interested, you can read about the difference here.) The newer desktop has a built-in losemodem. (I could move the hardware modem card from the old computer to the new one, but I'm too lazy to open up both computers.)
  • I first figured out how to do this because I wanted to get tickets for Rachael Yamagata at the Troubadour last year. TicketBastard wanted to charge me almost as much in fees for 4 tickets as the tickets would cost themselves! Screw that. The only other ways to get tickets were to try to get some at the box office the night of the show (and it ended up being sold out) or to fax an order to the venue directly. I felt extremely smug when I got my ticket confirmation!

There's a lovely open-source package around for Unix-like operating systems called efax, which handles the whole faxing thing from the command-line. (I'm old-school and generally avoid GUIs when possible because they confuse me. Seriously.) efax, however, needs a very specific TIFF file format. Here are the FreeBSD ports you will need to have installed:

  • efax
  • tiff
  • netpbm
  • ghfaxviewer (optional)

Anyway, without further ado, here's how I got my paper forms faxed to where they needed to go. I assume this process would also work on Linux. (For brevity and to save myself embarrassment, I've left out all the dead-ends.)

  1. Scan in the files if they're hard copies. I have a crappy scanner which is easier to use under Windows. I saved the file in the tiff format, unable to remember if efax would like it. (efax did not.)
  2. Copied those files over to my FreeBSD-8.0 machine, which I was going to use for the re-formatting.
  3. My scanner software wrote the files with 8 bits/sample, but efax (and its formatting program efix) can only deal with 1 bit/sample. I couldn't find a program, either command-line or the GIMP, which would let me change that.
  4. Converted the tiff files to PBMs (ASCII format, not Raw) using GIMP. I might have been able to do it with a combination of tiffbw (to make a grey-scale file as efax doesn't like color PNM files, only b&w PBMs) and tifftopnm (which only makes b&w PBM files if the input file is B&W) programs, but I already had GIMP open.
  5. I needed to fax two pages. It would probably have been easier to send them one at a time, as I had done in the past, but this time I wanted to figure out how to send them both at the same time. The TIFF format can, fortunately, handle multi-page files.
  6. Converted the PBM files back to tiff, in the Group 3 (fax) compression format, using the following command:
    pnmtotiff -g3 -rowsperstrip 2500 file1.pbm > file1.g3
    pnmtotiff -g3 -rowsperstrip 2500 file2.pbm > file2.g3
    I used a big value for rowsperstrip because efax can't handle multi-strip TIFF files, so you want to make sure pnmtotiff can fit everything in one strip. Anything over 2500 should be enough; pnmtotiff will just write as many rows under the number as it needs to.
  7. (Skip this step if you only have one page to fax.) Ran the following to concatenate the files into a multi-page TIFF file:
    tiffcp -c g3 file1.g3 file2.g3 fax.g3
    You can add as many input files to the command line as you want; the last file is the output file.
  8. You can preview the file using a package like ghfaxviewer, which was the only FreeBSD port I could find which handled multi-page G3 tiff files.
  9. Here I copied the final file over to my old FreeBSD box with the hardware modem.
  10. If you need to figure out the device file for the modem, FreeBSD seems to name it /dev/ttyd#. I just ran efax through those files until I found one it liked:
    efax -d /dev/ttyd4
    efax: Fri Mar 12 13:25:16 2010 efax v 0.9a-001114 Copyright 1999 Ed Casas
    efax: Fri Mar 12 13:25:16 2010 efax v 0.9a-001114 Copyright 1999 Ed Casas
    efax: 25:16 compiled Mar 3 2009 22:24:04
    efax: 25:16 opened /dev/ttyd4
    efax: 25:17 using AEIGPM560LKTF1 AEIGPM560LKTF1 AEIGPM560LKTF1 in class 2
    ^Cefax: 25:19 Error: terminating on signal 2
    efax: 25:19 done, returning 5 (terminated by signal)
  11. Now send it!
    efax -l "+1 555 555 1234" -d /dev/ttyd4 -i "L2 M2" -t 15555555678 fax.g3
    replacing the formatted phone number for -l with your number, the -t argument with the target number, the -d option with your modem's device file, and "fax.g3" with your file's name. You may also have to tweak the modem options in the -i argument.
  12. efax should print out a bunch of progress lines, ending with
    efax: 28:53 done, returning 0 (success)
  13. Call or email the recipient to make sure they got the fax, because you never know.

Wasn't that fun? Hours of work to save me $2! (But, hey, I get to feel proud of myself in that nerdy way, and next time it won't take me as long because I won't have to go through all the trial-and-error to figure this out for the third time.)

Sunday, March 7, 2010

News: New News

On the road:
Random stuff:
Kitty funnies:
Funny Pictures of Cats With Captions
see more Lolcats and funny pictures
funny pictures of cats with captions
see more Lolcats and funny pictures
When I first got Pandora, writing utensils would disappear. As that happens to everyone, I didn't think much of it, until one day when I was looking in a closet and found a cache of pens in the corner. Dipity also likes to carry stuff around, including the AAA battery I saw her with last night, but she doesn't have a hiding place for stuff. She'll just drop the things in random spots.

WTF stuff:

Tuesday, March 2, 2010

Knittin' Crap: 2 Sweaters, 16 Days

Ravelympics Cardigan
4353989691_62e66d6ec2_o 4353989863_618a74afa3_o
I finished the cardigan about 7½ hours before Ravelympics officially ended Sunday at 11:59PM PST. That means I made two entire sweaters from start to finish in a 16-day period. The last day of work was hard. I was burned out. You have to understand, while I do finish about at least 95% of the projects I start, I don't usually finish them in a week. Or even a month. Sometimes it takes years. One sweater in 8 straight days? Quite an accomplishment for me. Another sweater in the following 8 days? Insane. I mean, it's nice to have finished sweaters, boom!, but it lessens the drawn out anticipation. I have lots of works-in-progress because I like the variety and expectation.

(I did learn that I just need to start as a matter of course making the armholes in Japanese patterns bigger. Even though the bust sizes fit, there's something weird about my shoulders. They aren't broad and they aren't muscular, but the height of them, the circumference if you measured around the armpit to the top of the shoulder and back, seems to be a tad larger than whatever passes for normal for Japanese knitters.)

Anyway, so if I look cranky or dazed in that last picture, which I took yesterday, just remember, I was coming off of 16 days of knitting psychosis. (BTW, the cardigan is a double medalist, both in the sweater category, and in the multiple techniques category for the knitted body and crocheted spiky edging.)

Labels!