Resizing images in Ubuntu (in Bulk!)

A common problem relating to sharing photos is that the files to are TOO BIG! When I load up my 7-megapixel camera, photos are close to 5mb each! I want to put them on the net or email them to people, but the size limits me. Here I’ll show you how I run these through a single command to reduce them to whatever size I need, using ImageMagick and a perl script I wrote. This really is pretty easy and hopefully these instructions are useful even for linux newbs. Incidentally, this will also work on a mac if you have Imagemagick and Perl installed, or an Windows machine under Cygwin.

First you’ll have to install Imagemagick. This should be as easy as a sudo apt-get install imagemagick. Of course you need perl, but that’s standard on any linux install. Now here’s the perl script:

use Cwd;
$some_dir = cwd;
print $some_dir."n";
opendir(DIR, $some_dir) || die "can't opendir $some_dir: $!";
system("mkdir small");

while ($_ = readdir(DIR)) {
next if($_ =~ /^./ || -d "$some_dir/$_" || /.pl/);
print ":convert -resize 800 -quality 80 $_ small/$_"."n";
system("convert -resize 800 -quality 80 $_ small/tn_$_");
}
closedir DIR;

Steps

1. Save the above script as resize.pl (copy and paste it into a new text document).

2. Adjust the image width (800 in the example) and quality (80 in the example), and put the script in a folder.

3. Put all the images you want to resize into the same folder.

4. Open a terminal, cd to the folder, and type

perl resize.pl

That’s it! This will make a subfolder called small and put the newly resized images in there.

If you’re not happy with the file size, just do it again, it will overwrite anything. I find this little script really useful — you can now email however many pictures you want. You can also use this script to make thumbnails for a web site: just set the size to 200 or 300, lower the quality a bit, and you can get images that are around 30K each.

Sutton’s Drug Store Review, Chapel Hill NC

This review has been relocated to nc-reviews Sutton’s Drug Store Review.

As part of my search for the best milkshake near Durham North Carolina, we took a trip out to Sutton’s Drug Store on Franklin St. in Chapel Hill. Word on the web has singled Sutton’s out as the home of a great milkshake, besides being a great place for food and hanging out.

Details

Unfortunately, I wasn’t impressed with the shakes. While I enjoyed the atmosphere of Franklin St. and the tiny drugstore, the experience as a whole left something to be desired.

We ordered strawberry and peach shakes, but neither one was anything out of the ordinary. In fact, I think I can make a better shake at home with my immersion blender. The shakes were quite thin (they don’t even bother giving you a spoon–you drink it with the straw), although you can “upgrade” to a thick shake for an additional $0.75. The flavor selection was only decent: they had about 6 flavors of ice cream (including butter pecan and mint chocolate chip) and about 6 mix-ins (mostly candy bars, like butterfinger or snickers). But probably the most disappointing thing about the shakes was that they simply didn’t have much flavor. Maybe we just went on a bad day–it was almost as if the establishment decided to cut back on the mix-ins to save money. The shakes were mostly vanilla ice cream and milk, with a tinge of flavoring.

We also ordered a side of cheese fries, which likewise weren’t great. Whenever I order cheese fries I have visions of a pile of fries smothered with real, melted cheese. That’s way they should be done. Unfortunately, I have yet to find a place that serves the real deal in North Carolina. Instead, I end up with a plate of fries covered in artificial nacho cheese sauce. If that’s you’re thing, you’ll probably love the cheese fries at Sutton’s. Does anyone know of a place where they serve real melted cheese?

The Bottom Line

Overall, the place wasn’t bad, and the prices were low. But I’m not adding Sutton’s to the list of great milkshakes in Durham.

Links

Summer at the American Tobacco Campus

The American Tobacco Campus started up another summer of free concerts in downtown Durham. These concerts go on intermittently, about every 3 to 4 weeks, through early October. This year, all concerts are on Friday evenings. I think this is a great event and one that I’ll definitely be attending whenever I can. Last year, I attended several of these. The quality of the music was hit or miss, so you might want to check out samples from the artists before you go. Mostly, though, it’s not a question of the group’s ability–the artists are all high-quality–but just a question of music genre. If the group is playing a style of music that you like, I think it’s a great opportunity to hear some great (usually local) musical talent.

You can really just show up for the free entertainment, but to make the night more of an outing, many local businesses (like Locopops) show up to sell food. These companies subsidize the concerts to get people to come out and buy food. There are usually several options, including some outdoor grilling, and there’s always Mellow Mushroom. Or head over to nearby Brightleaf Square before the concert where there are more options.

Seating on the grassy area can be limited, but usually there’s place to squeeze in if you show up just a bit early. If you want to be close enough to actually see the performers, though, you’ll probably want to be there before the concert starts. Guests bring lawn chairs or blankets and often have picnics, either purchased or brought from home, to accompany the music. Since the Campus is surrounded by buildings, the sun is low enough in the sky to not be too much of a bother.

I think this is a great event, and a steal at $0, especially because you’d pay top dollar for a similar quality of entertainment elsewhere.

Links

The Best Milkshakes near Durham North Carolina

Summer is setting in (it’s 90 degrees right now), and so I’ve started thinking about milkshakes again. It’s time for milkshake season to begin, but who makes the best milkshakes in Durham?

I’ve decided that my goal for this summer is to find the best milkshake joints near Durham (that includes Chapel Hill, Raleigh, Cary, and Morrisville). I’ll visit every place I can find that serves milkshakes and then I’ll post my opinion here. After doing a bit of searching online, I’ve started a list of places to try. I’m willing to look at either chains or independents. Throughout the summer, I’ll try to visit each of these places. The goal will be to finalize a list of places that really stand out, and by the end of the summer I’ll put these restaurants in ranked order based on how good their milkshakes are. Here’s my list of nearby establishments that serve milkshakes:

Milkshake Joints to Try

  1. Sutton’s Drug Store, Chapel Hill
  2. Goodberry’s Frozen Custard, Durham/Cary
  3. Cook Out, Durham/Cary
  4. Circus Family Restaurant, Cary
  5. Maple View Farms, Chapel Hill
  6. Chick-fil-A, Durham
  7. The Loop, Durham/Chapel Hill
  8. Sonic, Raleigh
  9. Chargrill, Durham
  10. Elmo’s Diner, Durham
  11. NC State Creamer @ DH Hill Library, Raleigh

If there are other places you think I need to add to the list, please let me know in the comments. I’m definitely looking for your advice for other places I’ve left out. I’m hoping the list will continue to grow as people make suggestions.

As I visit these places and write reviews, I’ll link to the updated posts. Going into this, I think the popular favorite on the web might be Cook Out. I’m not surprised–Cook Out is great place for thick shakes, and they have lots of options. But I think there might be smaller or less popular places around that can do even better. I guess only experience will tell for sure!

Cellcraft

I recently heard about a upcoming computer game called Cellcraft. The website isn’t updated much, but you can check it out at http://www.cellcraftgame.com/. It’s being made somewhere in North Carolina, but details on the web site are scarce. Anyway, the point of the project is to use a computer game to teach cell biology. This isn’t really a new idea, of course, but probably what caught my attention was the name of the game.

“Cellcraft”, as in “Starcraft” ?

When I heard the name “Cellcraft”, I immediately thought of Starcraft, possibly due to the impending release of Starcraft 2. Of course, this was probably the intent of the authors of the game. I was a bit excited, imagining a real-time strategy game where you build mitochondria to power armies of proteins, or rally the immune system to fend of viral invaders. Call me a nerd, but wouldn’t it be sweet to have a game on par with Starcraft that had a cell biology theme? Unfortunately the actual game seems to be built in Flash, so you have some idea of what it will be like. Even so, I think this is a great idea for teaching biology, though I was perhaps disappointed that it’s no SC.

I guess I’ll probably take a look at it when it gets released, though, just for fun. The most recent blog post says it’s in “alpha” stages and being tested in the classroom. Supposedly the final release will be open for all to play. Who knows, maybe I’ll be using something like this in a biology class I teach in the future. This reminds me Times Attacks, the multiplication tables video game that teaches times tables in a doom-style first-person-shooter. Right now, these seem like novel ideas, but kids these days are so attached to computers in some form that this may be the only way to get them to learn things in the future.

It’s Strawberry Time!

It’s strawberry season in North Carolina! One of my favorite things to do around late spring is go to a local U-pick farm and load up on fresh strawberries! These are a couple of the farms that are close to us:

  1. Waller Family Farm
  2. Jean’s Berry Patch

Last year we went to Waller Family Farm, located about 3 miles outside of Durham city. There were plenty of strawberries and the prices were reasonable ($1.35 per pound as of May, 2010). We’ve also considered Jean’s Berry patch, which is currently advertising the same price. I think the strawberries are even cheaper this year than they were last year. Maybe this has something to do with the Cheap Strawberries weather issues? If you’re looking for other farms, there’s a great site at the News and Observer with a U-pick strawberry farm locater. There are 26 such farms in the areas surrounding Raleigh-Durham! Whichever farm you choose, make sure you get out there while the strawberries are still around!

Reasons to pick your own strawberries:

1. Prices are lower when you pick your own.
2. Picking strawberries is fun (once a year, that is).
3. Your money stays local and benefits a community business.
4. You’re not contributing to the environmental costs of shipping from California or Florida (or South America!).
5. They’re fresher — you can eat them the same day they’re picked!

We usually pick way more than we will eat and then make strawberry freezer jam, which we then ration out for the rest of the year. Not only is it less expensive, but it’s better tasting than strawberry jam you can find at the store. We save money by not buying jam, we get to pick extra strawberriess, and we get to enjoy delicious jam year round. It’s a win-win-win situation. If you’re looking for a recipe, just do a search for Strawberry Freezer Jam and you’ll find something.

Falls Lake Camping Review

One great thing about living in the Raleigh-Durham area is the proximity to great state parks. From my location in east Durham, there are at least 4 great camping/hiking recreation areas within a short 20 minute drive: Umstead State Park, Eno River State Park, Jordan Lake State Recreation Area, and Falls Lake State Recreation Area. Here, I’ll give a quick review of a recent tent camping trip at Falls Lake. Falls Lake is located about 10 miles north of Raleigh.

Details:

I stayed in Loop B of the family campsites area of the Rolling View campground on a Friday evening in April. I had no trouble finding a walk-up campsite, though the sites with lake views were all occupied so I ended up more internal. The site was nice but small, with barely enough room for a couple of 2-man tents. Each site has a picnic table and a fire pit. They sell wood at the entrance station for a ludicrous $4 per bundle, so get some from craigslist before you go if you want a fire. The tent sites in this area were too close together, so there wasn’t much feeling of privacy. Most annoying to me was that at least 2 other visitors decided it was appropriate to play music loud enough for the rest of us to hear. This went on until curfew at around 10 pm, when things quieted down a bit. One other thing is that this park is in a flight path. I noticed the planes, but didn’t find them too bothersome since they didn’t come by very often.

There are some short trails nearby that are easy to find on the map. I hiked down to check out a couple of swim beaches, which seemed very nice and were amazingly empty. The lake water wasn’t too cold, so I was surprised that such a nice place wasn’t overcrowded with swimmers.  I also found a “community building” near the “boat beach” that could apparently be leased for larger group get-togethers. This facility seemed nice, with a large room, attached kitchen, and ample supply of folding chairs. There’s also a group campsite nearby, which was completely empty the night I was there. I did have some difficulty finding flat areas to pitch tents, though. I encountered a few others on the trails but mostly the place was pretty quiet.

The bottom line:

  • Campsites in Rolling View were small and noisy.
  • The park itself is very nice and not too crowded in April.
  • It would be worth it to check out other camping areas, including group camping.
  • It’s definitely a great place for day hikes, swimming, or boating.

Links: