≡ Menu

Bell Striker Jamming Carriage on an Olympia SM9

Olympia SM9 portable typewriter

I recently purchased a 1978 Olympia SM9 portable typewriter, and though by 1978 the quality of Olympia typewriters had started to decline, in the opinion of some, I still expected a solid, reliable, German typewriter. When I started typing on this typer, everything seemed to work fine, but occasionally the carriage would jam towards the end of a line, before the right margin stop. The type would still hit the page, but all in the same spot, as the carriage would not move. Hitting the margin release and wiggling the carriage would free it, but there was no guarantee as to whether I could reach the end of the next line without jamming again.

This was a bit worrying, as jamming carriages can be a symptom of serious mechanical problems in a typewriter. Still, this typer appeared to be in great shape, and appeared to have been professionally serviced sometime. I ran a few more test lines to see if I could identify the problem; I noticed that the jamming seemed to occur right after the bell was struck, and sure enough, on the next jam, I could see that the striker was getting caught on a carriage screwhead. Somehow, the striker was leaning too far backwards and occasionally it would catch on this screwhead on the carriage and cause it to jam. Gently bending the striker forward so it stood straight up-and-down fixed the problem and all was well. Well, now I just need to clean the type and fix the return spring on the margin release.

Looking down the carriage rail from the right side. The bell striker (center), if leaning too far backwards, will catch on the carriage screw, causing it to jam.

{ 0 comments }

Moving to Virginia with a Car

As with my previous article on moving to Washington DC with a car, here are my notes on moving to Virginia with a car. Virginia actually requires more stuff than DC, annoyingly.

I moved to northern Virginia, specifically Arlington, and my impression is that the police around here are also very interested in making sure you register you car within 30 days. They also have patrols to look for out-of-state vehicles.

If your car was purchased within the last 12 months, you’ll need to pay a one-time Virginia sales/use tax (something like 4.05%). Also, in many localities (cities/counties), you need to pay Personal Property Tax annually that’s based on the value of the car; I paid $33 for a 15 year old car.

Driver’s License, Title, and Registration
If you line up all your ducks in a row, you can take care of driver’s license, title, and registration all in one trip to the DMV. There’s a separate thing for paying Personal Property Tax and getting a parking permit (optional), but that’s locality (city/county) based and can be done online.

Vehicle Insurance
You need to have Virginia vehicle insurance. I just called my previous company and they set me up. Don’t forget to cancel your old policy when your new policy goes into effect! They should refund you for any premium payments you made for the portion of the policy after your cancellation date.

Vehicle Inspection
In Virginia there are two inspections you need to have done:

  1. An emissions inspection every two years is required for registration in the counties of Arlington, Fairfax, Loudoun, Prince William, or Stafford, or in the cities of Alexandria, Fairfax, Falls Church, Manassas, or Manassas Park. If you were inspected within the last twelve months and have the certificate from one of the following states: Arizona, California, Colorado, Connecticut, District of Columbia, Georgia, Illinois, Indiana, Maryland, Massachusetts, Missouri, New Jersey, New York, North Carolina, Ohio, Oregon, Pennsylvania, Tennessee, Texas, Utah, Washington, Wisconsin, you don’t need to be inspected for a year.
  2. An annual safety inspection is required by the state police; you get a decal that goes on the middle of the bottom of your windshield. If you fail, you get a rejection sticker and have to get the problems resolved and reinspected with 15 days.

Unlike DC, the inspection facilities are not run by the government and are typically privately run garages. I did the Yelp thing and looked for a place with good reviews. I ended up with Community Car Care in Alexandria, which is decent.

When you pass emissions, you get a print-out/certificate of your test results. Keep this – the DMV gets it electronically, but it helps to have it in case something goes wrong. And your next state might accept it.

Documents
For your driver’s license, there’s a whole laundry list of things you need:

  1. Proof of Identity (2 required) – typically a passport, birth certificate, and/or out-of-state ID.
  2. Proof of Virginia Residency – Lease was fastest for me. Renter’ insurance, utility bills and bank statements are acceptable as well. They, of course, have to reflect your Virginia address.
  3. Proof of Legal Presence – typically the same documents as proof of identity, but has to show you have a legal right to be in the US.
  4. Proof of Social Security Number – typically your Social Security Card
  5. Proof of driving ability – your previous license
  6. Driver’s license application

The Virginia DMV also has a Document Guide page to help ensure you have all the right documents.

For title and registration, you need to have:

  1. The title from your previous state or registration card from your previous state. Virginia DMV will give you a VA title. Don’t lose this! You’ll need it the next time you move!
  2. Proof of address – same as the proof of Virginia residency you used for your driver’s license.
  3. Proof of purchase price – only needed if you purchased your car in the last 12 months. This is to collect sales tax on your car. Otherwise, you’ll be asked to sign a statement that you purchased your car over a year ago.
  4. Inspection certificate – needed if you’re using your out-of-state inspection that was done within the last 12 months. I lost mine, so I had to go get an inspection done. The DMV will temporarily register your car for 30 days while you get that done, and then you need to reregister. Fortunately, this can be done online.
  5. Application for Title and Registration – new titles/new tags. Select how many years you want to register your car (one or two). It will ask if you want an electronically recorded title. This is good if you plan to stay in Virginia long term, but if you expect you might be moving, get a paper title so you don’t have to request one when you move.

I don’t believe that they asked for proof of vehicle insurance when I was at the DMV, but you are required to have it and on the registration form you do have to certify that you have sufficient insurance.

Going to the DMV
There are a number of DMV offices. Go early, before opening if possible and preferable on a weekday. Also note that while most offices are open on Saturday, they’re only open from 8am to noon. The initial line is for the information desk, where they will give you a number based on what services you need. They will also check to see if you have the right paperwork. Then there’s a waiting room where you wait until your number is called. You will be instructed to go to a specific counter. They accept cash, check, money order, or major debit/credit card.

Personal Property Tax and Parking Permit
As I mentioned above, many localities require you to pay personal property tax on your car annually. Many of them, like Arlington, handle this online. You get a decal that goes on your windshield that local police look for. They also handle parking permits, if required in your area and you have to park on the street.

{ 0 comments }

Moving to Washington D.C. with a Car

A few notes on moving to the District (DC) with a car. DC, I presume due to the high rate of transiency, is really strict about having people register their car within 30 days. The have ROSA (Registration of Out of State Automobiles) teams that go out at night, particularly Sunday night, to look for cars that are parked in DC consistently over a 30 day period. If you really do live outside DC, you can file for a ROSA exemption. However, this article assumes you are moving to DC.

Parking
In the short term, you probably need a place to park your car. If you don’t have off-street parking where you live, you’ll have the joy of finding a spot on the street. Depending on where you live, this can be challenging. Much of DC is covered by Residential Permit Parking (RPP), which allows residents to purchase a parking permit which allows them to park in a particular zone. Here’s the map, with zones from 1-8. You can ignore the letters after the zone. Important to note that people without permits typically can only park for two hours per zone per day. It doesn’t matter if you move your car. As long as it’s in the same zone, you have a max of two hours total per day. The exceptions are metered spots (as long as you pay), the few spaces that don’t require a permit (some blocks), and after hours (weekends, holidays, and after 8:30pm until 7am the next morning).

You can only get a RPP if your car is registered in DC, for $35 per year (in 2015). What is useful to note is that you can get a visitor parking permit good for up to 15 days from the local police station if you have proof of DC residency, such as a lease. If you’re temporarily staying with someone in DC, they can get a visitor parking permit for you.

Another note about parking – street sweeping. Most streets are swept twice, once on each side, typically on different days. There are signs posted indicating the day of the week and the time window for sweeping; your car must not be parked there during those hours! Parking enforcement shows up in force to ticket violators! Street sweeping is suspended during the winter and holidays, so you don’t have to worry about it then, but don’t get caught when they start up again in the spring!

And another gotcha is Temporary No Parking signs. Residents can get Temporary No Parking signs for things like moving and special events from the city. They have to be put up 24 hours in advance for metered spaces and 72 hours in advance for non-metered spaces. This means that you need to check on your car at least every 3 days to ensure someone hasn’t posted a No Parking/Reserved sign.

Driver’s License, Title, Registration, and Parking Permit 
If you line up all your ducks in a row, you can take care of driver’s license, title, registration, and parking permit all in one trip to the DMV.

Vehicle Insurance
You need to have DC vehicle insurance. I just called my previous company and they set me up. Don’t forget to cancel your old policy when your new policy goes into effect! They should refund you for any premium payments you made for the portion of the policy after your cancellation date.

Vehicle Inspection
You have to take your car to the DC inspection station to have it checked for safety and emissions. It’s good for two years. There is one Vehicle Inspection Station for the city, located in southwest DC. They’re pretty fast, with inspections taking 10-15 minutes, but the lines do get long. I recommend going early on a weekday; it’s best if you can get there before they open. There will be a line of cars waiting. Appointments are possible as well, but those get scheduled further out.

Assuming you pass, you’ll get an inspection sticker on your windshield and a print-out/certificate of your test results. Keep this – the DMV gets it electronically, but it helps to have it in case something goes wrong. Also, there’s also a chance you might move to Virginia or Maryland and I know at least Virginia will honor a DC inspection, as long as it’s within a year and you have the certificate.

Documents
For your driver’s license, there’s a whole laundry list of things you need:

  1. Proof of Identity – typically a passport, birth certificate, or state ID that meets REAL ID standards (star on your drivers license).
  2. Proof of DC Residency (2 required) – Lease and renter’s insurance was fastest for me. Utility bills and bank statements are acceptable as well. They, of course, have to reflect your DC address.
  3. Proof of Social Security Number – typically your Social Security Card
  4. Proof of driving ability – your previous license
  5. Driver’s license application

For title and registration, you need to have:

  1. The title from your previous state. DC DMV will give you a DC title. Don’t lose this! You’ll need it the next time you move! If there is a lien on your car, you have to submit a request for title.
  2. DC driver’s license – the DMV processes the driver’s license first so you have this
  3. Proof of valid odometer statement – your inspection certificate covers this
  4. Proof of vehicle insurance in DC – from your insurance company; the thing you typically keep in the car.
  5. Inspection certificate
  6. Certificate of Title/Registration and Tag application form – new titles/new tags. Select how many years you want to register you car (one or two) and if you want a parking permit.

The DC DMV also has a Document Verification Guide page to help ensure you have all the right documents.

Going to the DMV
There are a number of DMV offices. Go early, before opening if possible. The initial line is for the information desk, where they will give you a number based on what services you need. They will also check to see if you have the right paperwork. Then there’s a waiting room where you wait until your number is called. You will be instructed to go to a specific counter. They accept cash, check, money order, or credit card (VISA or MasterCard only).

{ 1 comment }

Communicating with I2C devices with the LinkM


I was recently looking for a USB to I2C adapter and mostly I found rather expensive ($100-300) development kits which tend to be large-ish boards. Considering I2C communication can be done with a fairly basic microcontroller, I thought these were poor solutions. I eventually tripped across the LinkM, which is, on the surface, a USB controller/programmer for the BlinkM programmable LED devices. However, the BlinkM uses I2C as it’s communications bus and the LinkM is essentially a USB to I2C adapter. It’s pretty cheap ($30) and small, with a nice plastic housing and a simple female header connection. All the code is open source, from the client-side API to the firmware on the LinkM microcontroller. In addition, the client-side code is cross platform, in C, Java and Processing, working on Mac OS X, Windows, and Linux. Since the the USB interface is implemented as a simple HID device, it’s probably pretty easy to write code for any platform, really.

That said, while the software can talk to generic I2C devices, it’s really geared towards supporting the BlinkM. As such, there is little documentation about how to talk to generic I2C devices. The simplest thing to to is compile the linkm-tool application located in the c_host folder. Note that this depends on linkmbootloadlib, so you’ll need to build that first.

Windows notes:

  1. If compiling on a Windows platform, you’ll need MinGW – the LinkM developers recommend the TDM-GCC compiler suite, which integrates MinGW and GCC.
  2. In the Makefile for linkmbootloadlib, you’ll need to comment/remove line 98: rm -f lib$(PROGNAME).a # FIXME. You could replace it with the proper del command as well.

Once you have linkm-tool compiled you can do the following:

  1. Scan the I2C bus:
    linkm-tool -v --i2cscan
  2. Read/Write to an I2C device:
    linkm-tool -v --linkmcmd "0x01,<# bytes to write>,<# bytes to read>,<write byte 1>,<write byte 2>,...,<write byte n>"
    For example, if you need to write “0x50,0x11,0x20” (I2C address 0x50, command 0x11, data 0x20):
    linkm-tool -v --linkmcmd "0x01,3,0,0x50,0x11,0x20"
    Or to read 3 bytes: “0x50,0x12” (I2C address 0x50, command 0x12):
    linkm-tool -v --linkmcmd "0x01,2,3,0x50,0x12"

This is fine for simple testing, later when you put together an app, you can simply include hiddata.h and call the relevant functions.

{ 2 comments }

Cloning a MacBook’s HDD with BootCamp

I bought a nice Samsung 500GB SSD recently to replace the ol’ spinning disk that came with my 2010 15″ MacBook Pro (Snow Leopard). Pricing had finally come down to reasonable levels ($280) and this helps stave off my itch to upgrade (eyeing the 13″ Retina MBP).

Prior to the upgrade, I was running a triple-boot setup with Mac OS X, Ubuntu 12.04, and Windows 7 x64. I didn’t use the Ubuntu partition much, so I decided to dump it and fold the space into the Windows partition, with the intention of running Ubuntu in a VM (or just using Cygwin more).

My first problem came when I discovered that my utility for disk cloning, Acronis True Image, didn’t work on MacBooks due to the weird way Macs boot. I cloned the Mac OSX partition using a trial copy of Carbon Copy Cloner, with my new drive plugged into a SATA to USB/eSATA dock that I have. That left me with Mac OS X taking up the entire drive. I installed the SSD in my MacBook, following the instructions from iFixIt. I skipped the battery removal – it’s not really required and I don’t have the tri-wing driver needed to do so. Used pliers to get the screws off/on the side of the drive since I couldn’t find my Torx kit.

After booting into Mac OS X with my new drive, I used the Boot Camp Assistant to shrink the Mac OS partition down. At this point, I tried using Clonezilla to clone my old Windows partition over into the newly created Boot Camp partition, but I could not get it to boot, no matter what. I tried the Windows Startup Repair tools, various command line bcdedit things, etc., to no avail. I would always get “A disk read error occurred. Press Ctrl+Alt+Del to restart.” The partition was readable in Mac OS X, but it just wouldn’t boot.

I finally found this post over at Mark’s Machinations, who had similar issues when moving to a larger drive. I started where he says:

Now exit DiskUtil and fire up the BootCamp Assistant and create your BootCamp partition to whatever size you want.  Follow all of the instructions including inserting your Windows 7 installation disk and the click the “Install” button.

and continued from there. Reinstalled Windows. Cloned my old Windows partition on top (with the -m and -r flags and without the -j2 flag in Clonezilla, as stated in the instructions). Did the bdcedit bootrec dance to rebuild the BCD. After all that, all was well, and Windows 7 boots speedily!

I’m not entirely sure what the problem was – it might have been because I had GRUB installed previously. Or maybe it was an issue with the BCD store in Windows.

{ 2 comments }

Bacon Mac and Cheese

mac_and_cheeseMac and cheese is a classic comfort food and I love it during the winter. Creamy, with a crunchy breadcrumb topping and a nice crispy bottom/side crust of caramelized cheese. I typically hit it with some smoky bacon goodness, because, well, bacon. My general philosophy when it comes to mac and cheese and other comfort foods is that if you try to make them healthy, you’re basically removing the “comfort.” Eat smaller portions or less often, but don’t talk to me about non/low fat milk, cheese, etc. for this. Low-fat cheese, in particular, gets odd in melted applications. I like to serve this with a romaine salad for temperature and textural contrast, not to mention as a palate refresher.

 


 

Bacon Mac and Cheese

Developed by The RoboGourmet – v. 1.0, 1/18/2013
Adapted from The Martha Stewart Living Cookbook: The Original Classics, by way of Smitten Kitchen

Serves 4-8

Notes: This is a half-recipe because a whole pan is, well, a lot of mac and cheese. Don’t ask how many calories are in this. The smokiness of the bacon is lovely in this. If omitting the bacon (why?!?), replace the tablespoon of rendered bacon fat with a tablespoon of butter. Recommend freshly ground nutmeg and black pepper. Whole nutmeg and a Microplane Zester/Grater. Done. Same for the cheese – save yourself some money and buy your cheese in block form. Keep refrigerated right until you grate it for easy grating. A good box grater will make short work of this. I use the big holes.

Fundamentally, the cheese sauce in a traditional mac and cheese is a béchamel, a white sauce prepared by adding milk to a light-colored roux. A roux is simply flour cooked in a fat. When combining the milk with the roux it is critical that the milk be as hot as possible without burning and that it be added in increasing amounts to ensure a smooth sauce – in small amounts at first and then in larger amounts.

Serve with a crunchy green salad.

Pasta
1/2 pound (8oz) elbow macaroni

Topping
3 slices white bread
1 tablespoon unsalted butter

Cheese Sauce
3oz (2-3 slices) bacon
2-3/4 cups whole milk
2 tablespoons unsalted butter, plus a little more for the baking dish
1/4 cup all-purpose flour
1 teaspoon salt
1/8 teaspoon ground nutmeg
1/8 teaspoon ground black pepper
1/8 teaspoon cayenne pepper
9 oz sharp white cheddar cheese
4 oz Gruyère or 2.5 oz Pecorino Romano

Preheat oven to 375° F

Prepare the cheeses: Grate the cheeses and put in a large bowl. Toss to blend.

Cook the macaroni: Put 2 quarts of water in a pot and bring to a rolling boil. Salt the water so that it tastes like the sea – about 1 tablespoon. Add the macaroni and cook until the pasta is slightly undercooked, about 3-4 minutes. Transfer to a colander, rinse with cold water to stop further cooking, and then drain.

Prepare the topping: While waiting for the water to boil for the macaroni, trim and cut the bread into cubes. Melt 1 tablespoon of butter in the microwave in a medium bowl (1 minute on high). Put the bread cubes in the bowl and toss until evenly coated with butter.

Make the cheese sauce: Put the milk in a covered medium saucepan over medium heat and bring almost to a boil. In the meantime, cook the bacon in a large skillet over medium heat until crispy. Transfer the bacon to a paper towel lined plate to drain. Pour off all but 1 tablespoon of the rendered bacon fat.

Check the milk – it should be hot. If not, wait until it is nearly boiling. If boiling, turn down the heat to low so it does not burn.

Return the skillet to the stove over medium heat and add 2 tablespoons unsalted butter. When the butter fully melts and is bubbling, add the flour and whisk for 1 minute to create a roux.

Add the hot milk to the roux in increasing amounts while whisking constantly – first a tablespoon at a time, then a few tablespoons at a time, then 1/3 cup, etc. Each time you add milk, ensure it is fully whisked into the sauce so you don’t get lumps. Once you have added all the milk, continue to whisk until the sauce bubbles and becomes thick, about 8 minutes.

Turn off the heat and whisk in the salt, nutmeg, cayenne, and black pepper. Chop the bacon into bits and add to the sauce. Add about 3/4 of the grated cheese and stir until the cheese has melted (I recommend a spatula). Add the cooked macaroni and stir until the pasta is evenly coated.

Butter an 8” square baking pan (or other 1.5 quart baking dish) and transfer the macaroni mixture to the pan, using the spatula to smooth and work the mixture into the corners. Top with the remaining cheese and then the breadcrumbs.

Bake until golden brown, about 30 minutes (good time to prep a salad), then cool on a wire rack for 5 minutes. Serve.

Download PDF

{ 0 comments }

Les Misérables

Les Misérables is one of the greatest musicals of all time and I was really looking forward to the movie adaptation. While an OK movie, sadly, it falls far short of what it could have been, with significant flaws. Let’s start with casting – Russell Crowe was a bad choice for Javert. While Crowe doesn’t have a bad voice, it’s simply too angelic (“little boy” was what I called it walking out of the theater). Javert needs far more grit, more punch. Anne Hathaway delivered a good performance, but she did not fit my preconception of Fantine as a somewhat older woman. Hugh Jackson was pretty good as Jean Valjean and Samantha Barks, the West End veteran, was excellent as Eponine. I was initially delighted to see Sacha Baron Cohen and Helena Bonham Carter as the Thenardiers, but their performances seemed restrained from the heights of ridiculousness I know they are capable of and their performances lacked the joyfulness/silliness the parts are known for. Eddie Redmayne and Amanda Seyfried as Marius/Cosette were fine, but there was no chemistry there, but then, I’ve never seen a performance, either on stage or screen, where I’ve really connected with that romance – I just don’t buy the “love at first sight” bit. Colm Wilkinson, the original Jean Valjean, has a small part as the Bishop who initially sets Valjean on the road to self-reinvention.

Tom Hooper, noted for “The King’s Speech”, directs, and he makes a number of interesting decisions. The first is that all the singing is captured live – there is no lip-syncing. I’m of two minds about this. I think it’s a very bold move and certainly connects the viewer to the performance in an more visceral way. I always notice lip-syncing and it’s a bit distracting, though I typically forgive it when the recorded performance is good. However, this decision perhaps led to a decision to use very tight headshots for most, if not all, of the songs. I’m not saying the headshots are bad, but when you do it for all the songs it gets rather tiring being in everyone’s face all the time. Give me some variety – some sweeping shots – show me more of Paris. That and they had problems keeping the faces in focus. What I really, really, hate is the use of the handheld camera. I don’t know if it was necessary to maintain the closeups, but I detest the constant bobbing of the handheld camera – it makes me motion sick. I don’t know who decided the use of a unstabilized camera injects realism/grittiness into a film, but that person should be shot. The human visual system is excellent at tracking motion in reality and when a large portion of the field of view is bobbing up and down without the inner ear detecting anything, this disconnect just causes nausea. USE A STEADICAM.

Oh, and what’s with the tilted shots? What are we, teens from the 90s?

There are a few songs that I didn’t recognize, but it appears that’s because I’m used to listening to incomplete soundtracks.

The movie never really drew me in. I love the story and I teared up when Marius sings “Empty Chairs and Empty Tables” and more at the end scene where Valjean dies. But the overall movie lacked for passion, perhaps because the musical itself has some rough spots as well, which get magnified on the big screen. Still, I think that in better hands, this could have been glorious.

Fans of the musical will have to see it, and should, but first-timers should really plan to see a stage performance.

{ 0 comments }

MacBook Pro 6,2 (2010) issues with Ubuntu 12.04

Just installed Ubuntu 12.04 (Precise Pangolin, x64) on my MacBook Pro (2010) and had a few issues. Many things are dealt with on the community wiki page, but I still had some problems:

  1. I can’t unplug/plug in an external monitor and have it automatically recognized. I have to pull up the nVidia X Server Settings app and then detect and enable the display manually. And if I don’t disable the display before unplugging, I can’t seem to disable the display without restarting.
  2. Audio over HDMI (via a Mini Display Port adapter) doesn’t work. The output doesn’t show up in the Sound control panel.
  3. The system bell in the terminal did not work.

1 and 2 were solved by upgrading to a newer version of the nVidia driver than the one currently in repository. I added the Ubuntu-X Swat PPA, which tracks newer versions of the driver, along with other newer, but considered stable, xorg components. I avoided the xorg-edgers PPA, which is to far on the bleeding edge for my taste.

Run this to add the Ubuntu-X Swat PPA and install the latest components:

sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get upgrade

Problem 3 looks to be an integration issue between components or something, according to this bug report. This kind of thing takes forever to resolve, but the problem seems to be twofold: the bell volume in X11 is set to zero by default and the bell sound hasn’t been uploaded into Pulse Audio sample cache. This can be temporarily fixed with:

pactl upload-sample /usr/share/sounds/gnome/default/alerts/glass.ogg bell.ogg xset b 100

To make this permanent for your user profile, add the pactl line to ~/.xprofile and the xset line to ~/.bashrc.

Update (2012-08-28): So it’s not all moonlight and roses. I’m seeing random xorg crashes and logouts occurring. A look around the internet suggests this is due to newer nVidia drivers not playing well with xorg. Sigh. The solution for now is to use Unity 2D – this can be selected at login by clicking the Ubuntu logo in the upper right corner of the login box and selecting Ubuntu 2D. You can make this the default by running:

sudo sed -i 's/user-session=ubuntu/user-session=ubuntu-2d/g' /etc/lightdm/lightdm.conf

I don’t know why nVidia has to be so difficult about working with Linux. Are they so tied to Microsoft? I understand Linus’ recent rant on the subject better. Perhaps this is why Apple has been using more ATI chips lately…

{ 2 comments }

Bash return values

Debugging a Bash script today and ran into this problem – return/exit codes from functions may not exceed 255! My script backed up a subversion repository only when a new version of the repo existed, however, the function that checked the version had it’s output returned modulo 255, causing a problem.

The solution was to return the data with echo, as suggested here: http://tldp.org/LDP/abs/html/assortedtips.html#RVT

Then the call

curVersion=`check_version ${SUBVERSION_REPOSITORY} ${SUBVERSION_REPOSITORY_NAME}`

assigns the result from the function check_version to curVersion.


				
{ 0 comments }

16GB SD Card Formats to 8GB in Camera

I have a Canon EOS 20D and recently I started using SDHC cards for storage in combination with an SD-CF adapter. Works great and SDHC cards are 1) pretty cheap compared to CF cards and 2) work with all the other devices I have that support SDHC, including my MacBook Pro. I got a pair of 16GB cards and it’s pretty hard to use them both up on long trips. I ended up using only a little over one card on my recent two week vacation where I shot about 2000 photos in RAW+JPEG mode.

Anyways, I was clearing out a card so I could put some new photos on it and I decided to use my camera’s format option rather than doing an erase all, thinking it would be faster. It might have been, but it formatted the card to an 8GB capacity – half of what it should be. Turns out that while my camera can handle 16GB cards, it can only format 8GB ones. Popping it back into my computer to format it didn’t help either, as it now only recognized 8GB as well. Some hunting around the Internet led me to this blog post, which suggested reformatting the card with this USB_Format utility, which worked like a charm and I have 16 GB available on that card again. Now I just have to remember not to format this card in my camera again…

{ 9 comments }