Thoughts of Geoff

Some writing by Geoff Petrie

nvAlt Quick Tip

Making Markdown Readable and Your Default File Type

So normally I don’t write tips on productivity, but lately I have been focusing more and more on workflow and I decided to start diving deeper into things like Brett Terpstra’s nvALT, Smile’s TextExpander, and Second Gear’s Elements (ala Mac Power Users, Back to Work and Merlin Mann). This means you may see so more stuff from me regarding cool tools like these.

But this is a quick tip. So here it is:

When I installed nvALT there were two pieces that threw me right away. First, even after going into the preferences and changing “Read notes from folder” to the folder that had all my Markdown notes it didn’t register any of them in the search. The reason? I needed to change the “Store and read notes on disk as” drop down from “Single Database” to “Plain Text Files” and then I needed to add the file extension “md” to the “Recognize individual files with attributes:” extensions. Check out the screen capture below if this isn’t quite making sense. (Also note that there is a “+” in that preference window, next to the “-” symbol, but it isn’t showing right now in Lion.1)

The second item that started to bug me was that any new note/file that I created was being created with the .txt extension instead of the .md extension that I work in all the time now. Frankly, if I couldn’t fix this issue, I would have probably abandoned nvALT almost right away. Fortunately, I found that by selecting “md” in the “Recognize individual files with attributes:” list and then hitting the check mark, it bolded it and my tests have showed that all my new files being made by nvALT are now .md files.

With these two items out of the way I plan to seriously play with this system.

If, by some freakish chance Brett Terpstra checks out this post, one feature request that I would make right now is to allow for the use of his Marked app for the preview instead of only having the built in, but excellent, nvALT HTML preview. There’s a good chance that it is already a feature and I’m not aware of it. I’m loving Marked, and if you’re a Markdown person and not using it yet, you should definitely check it out.

I originally posted this on my Tumblr The Face of Geoff


  1. Many thanks to Eddie Smith at Practically Efficient for that helpful one-liner!

Little Details

So Firefox needed to do an update today. 6.0.2, I think. When I did the update the obligatory additional page was added to my tabs showing me that I was now fully updated. I was struck by the page, though:

Of course I reloaded the page several times, and still the page looked the same. Now maybe I expect too much, but if you’re going to promote something then the promo should look good. The styling for the “Tabs, Meet Groups” promotion stands out for all the wrong reasons. The padding, the lack of easily findable links, and what is with the way “Name” and “Drag” are just hanging there?

I’m sure there is a simple explanation for this. It’s likely a css file that’s missing in a specific directory. But if you’re going to push this page after making me do an update, I’d make sure that it was 100%. Especially when you’re promoting something to make you stand out against other great browsers like Safari and Chrome.

I originally posted this on my Tumblr The Face of Geoff

iCloud

I have to say, I’m getting pretty jazzed about iOS5 coming out, and, more specifically iCloud. The video below was referenced by a Practically Efficient article that was building off a great article by David Sparks regarding how iCloud will be the future to proper mulit-platform computing. As David says in his article, when data just is then it doesn’t matter what device you’re working on.

Why the video? John Gruber makes it very clear that the reason why data can now just be is because Apple has worked its ass off to be a leader in open web technologies.

Web 2.0 Expo NY 2010: John Gruber, “Apple and the Open Web” (by OreillyMedia)

Learning Git

Introduction

For the record, much of this is unabashedly lifted from Pro Git book I can’t even remotely suggest that this content is original to me. Sure, I’ve added my own two cents now and then, but do yourselves a favor and read the first three chapters of Pro Git. In fact, if any of this doesn’t make sense, it is probably because I haven’t correctly paraphrased Pro Git and you should just consult the book in that case.

One thing you’ll definitively need to use Git locally is Git running on your computer. There are lots of tutorials and ways to do it, I think this tutorial will work or you can just go to the source and download the latest stable release of Git.

The other item that you’ll likely find useful in using Git as well as for many other things, is a Dropbox account. By using Git in a Dropbox managed folder you get your own local repository in the cloud. The Basic account type is free and comes with 2GB of storage. That’s probably plenty if you plan to mainly do textish style file management. If it isn’t enough space, hey, just get a paid account. The service is awesome. The link that I give for the Dropbox account is a referral link for me. It just me an extra 250MB of storage to my account if you use it. If you’d rather not use that link then try http://www.dropbox.com. I picked up this tip when I attended a Webuquerque called Getting With Git that was presented by Brian Arnold.

Finally, this is not supposed to be a full explanation of how to use Git. If you want that, as I said above, read the first few chapters of Pro Git. The purpose of this is to touch on basics of getting started and some of the more common commands. I used Git while writing this document and I really enjoyed its simplicity. From my perspective, this is worth your time to understand.

Helpful Linux Commands

I was asked to give a bunch of detail on a server that I use so that I could request permission to participate in migrating some of the web work I do onto a new CMS. The requests seemed fine, but the form provided no way of easily estimating the file numbers they requested. I used these linux commands to find the details I needed:

find . -type f -name '*.php' | wc -l gave me the number of files I had in the directory with .php file extensions.

du /var/www/html/ -ch | grep total gave me the total amount of disk space being used in the directory in “human readable” format.

/sbin/ifconfig gave me the ip address of the server the information was currently sitting on.

I had to look up the first one, I didn’t know how to get down to that sort of granularity, but I think the others are worthy of documenting here in case someone finds some use in them.

I was then informed about this:

Fun fact: “find -name -type” is way faster than “find -type -name” because it avoids doing a stat() call if the name doesn’t match. stat() on a file that isn’t already in RAM likely triggers a seek and can take beaucoup milliseconds.

Which is an awesome tip from a person who had been reading the blog.

Object Quote

An object is a container of properties, where a property has a name and a value.

Douglas Crockford, JavaScript: The Good Parts

Nice and succinct.

In Search of the Open Source Project

Something I wanted to get under my belt this year was to take on a significant role in an open source project. I’ve built a major part of my career around the results of open source work: I am a PHP programmer and I rarely work in any other environment other than Linux, and it would be nice to be able to give something back to that community that has helped put food on my table.

There are a lot of options out there. Drupal seemed like a natural fit for me, as I’ve spent a significant part of the last several months honing my Drupal skills. But what I really want to do is build my experience in another programming language while working on an open source project.

Another goal I had this year was to build an expertise in Objective-C, but Objective-C open source projects are hard to find. I’m also interested in building on my Ruby skills and my Python skills, but Ruby over Python.

So with these requirements, I’m going to spend time looking for a Ruby open source project that I’ll be able to join in on.

There are a couple of other pieces to this undertaking for me, though. The first is to get a feel for the open source community. Frankly, I don’t know it as well as I would like. I know how I do code reviews in my own work, and I also know what it means to commit to a project in my own mind, but I want to get a better understanding of how it works in a community open source project, as it will likely be rather different than what I’m used to.

The other piece is where to find a project that will suit my interests. I plan on starting my search in GitHub, but I haven’t ruled out Sourceforge. Regardless, when I find something I’ll mention my work on it here. Frankly, I haven’t given up on the idea of working on a Drupal module either. But if anyone knows of an interesting project that wouldn’t mind having a slightly better than novice Ruby programmer who is interested in starting small with some doing some bug fixes, let me know.

More on this soon, I hope. And I apologize in advance if I decide to use this forum to point to interesting potential projects.