Par: awesome text reformatting

Since I’m constantly working with text reformatting it in a useful way that is quick and easy is essenttial to keep working. Previously I used to rely on my editors reformatting, but since this kept constantly screwing up especially working with Python where whitespace is important and I was looking for a better way, and discovered the nice little utility par. So far pretty much all the reformatting happend as expected, it works perfectly with nested comments and quoted email.

Adding a quick line to the vimrc file makes Vim use par for reformatting which is really useful to never really have to leave my editor.

set formatprg=par -w80q

This will make reformat with a width of 80 characters (-w) and keep quoting even if line is empty (-q).

Updated Dropbox Dropzone to handle folders as well

I just pushed the code to handle folders in my Dropbox Dropzone to GitHub. If a folder is dragged on the Dropzone it is now archived and uploaded to Dropbox as an archive to be shared.

Enjoy :)

PS: Love those guys at Aptonic my changes got pulled minutes after I sent the request.

Edit: Updated again to also handle multiple files dragged on, they are also zipped now instead of producing an error. Waiting for  Aptonic to pull, but I guess it will be up shortly

Batch convert HTML to PDF on MacOSX

Recently I needed to convert well over 200 HTML files to PDF, well normally converting to PDF on the Mac is easy, just press print and choose “Save as PDF”, but doing that for 200+ Files seems kind of a waste of time. Beeing a Mac user for quite some time now, I know about Automator and the batch print support so here my Ideas:

Speed things up by creating an Automator action, but there is now way to do this! I found some “Convert to PDF” action but it only works for text files.

Put the printer in the dock and drag all files on it to batch print them. But guess what there is no PDF printer, and the only one I found online (besides Adobes, which is included in the CS) does not work with Snow Leopard.

Well so much for the easy Mac like ways of doing this, and back to the underlying Unix. Bash and Macports to the rescue. Searching Macports (actually searching FreeBSD ports and finding it to be availible on Macports, too) I stumbled across Htmldoc. It takes HTML files (including Images etc.) and converts them to PDF. After installing

sudo portinstall htmldoc

I was just one line of Bash away from my nicely formatted and portable

find . -name “*.html” -exec htmldoc —webpage -f {}.pdf {} ;

So what does it do?

  • Find all files with .html extension in the current Folder
  • Run htmldoc expecting a webpage
  • Outputting a file named like the in HTML file but with added .pdf extension
  • Run on all files matching the *.html expression

So there it is, ever want to convert a lot of HTML to PDF, just put it in one folder and run this line.

Cryptr mentioned on the MacReview Cast

Thanks to Tim from Surfbits Cryptr has been mentioned on the MacReview Cast. Maybe some people will download and use it so I can get some feedback. I very happy that it was mentioned and now I actually feel kind of pushed to do some more developing on it, so be sure to sent your feature requests and comments. As a developer I have to say I really love how friendly the Mac Community is, and how welcome it makes me feel.
You can watch the Screencast on the Cryptr Log in small resolution or via this link in full resolution.

Use more crypto…

I simply don’t get it, there are like a 1001 simple ways to encrypt and decrypt files, which are really safe, and still nobody uses them. There are the times I get asked via EMail for passwords, or I here of really sensitive data getting out because, guess what I was laying there unencrypted on some network.

So maybe there are people who just don’t know what’s out there, so here is a quick roundup of what I use:

First of all there is Steel for storing my Passwords in a safe place, it’s simple light weight, and safe using the Blowfish cipher, which was among the finalist for the next NSA standart cipher. It’s just 9$, and of course there is always Keychain on the Mac, but I like to keep my Passwords (and more) in one easy to manage file, not bound to a build in app.

Second there is Truecrypt it’s great, it’s cross Platform (Win, Mac, Linux), and it works. It’s great for creating encrypted Images for syncing via the Internet, or to store all kinds of files. It’s been doing a great job for me since Version 4 and still is. Maybe a little over the top for sending just a quick file via EMail but great for your USB Stick or Web Space storage.

Third I just gotta promote my own Cryptr It’s for those times where you just need some fast way to encrypt a single file to send via EMail, or maybe some important Document on your Mac needs to be safe. It’s Drag&Drop Mac like and 100% safe using OpenSSL and AES 128Bit (for those who want to know ;) ).

So that’s it for me. Of course there is also S/MIME for EMail and such but thats a different story.

Sugarsync, Dropbox, and others

I’ve been using Dropbox for quite some time now and been quite happy with it. What recently got kind of annoying to me that it is impossible to Sync folders besides the Dropbox folder, and also that, on another machine, I can’t select what to sync. Since I own a Netbook with only 8GB of Space (about 2GB left after OS and App install) it’s impossible to sync my Dropbox now, which kind of defeats the point of having it. So I was looking around and found a couple Products which seem to do kind of the same thing, but always a little different.

First there is ZumoDrive which looks great at first but sadly I also only Sync one “Folder” (actually it’s a Drive, but oh well… ), also I found the free 1GB plan to check it out to small, so I moved one. After all I seems to be a great product, it’s just not for my need.

Now I looked a Sugarsync, I’ve been intressted in it before, but back then they did not offer a free plan, so I decided not to try it. Recently they started offering a free 2GB Plan which I decided to try out, and it’s great. Sugarsync really meets my needs, you can specify Folders to Sync on every Machine, it’s even possible to do a quick edit from the Website by Downloading the file with a special Applet they offer which then syncs those changes back, great if your not at your own machine. I also works with my iPod Touch so I can at least view a lot of files on the go, great! I must say I really like Sugarsync, it works great an also offers Versioning for files (if you like) and a Webarchive which allows to upload file which don’t have to reside on any machines. Ok the Upload speed might sometimes be a little better, also the queue is not optimal in my opinion putting the largest file in the Back, but hey those are really minor issues and the Upload speed should be better on the paid plan also. The only reason I did not switch to the paid version yet it that I’m waiting for my Credit Card to show up.

Well that’s it for now. And check out Sugarsync

Trying out Flex – HgWatch

Since I recently noticed I can get the FlexBuilder for free as a Student, I just had to check it out. I really like Flash / ActionScript to build WebApps, it easy effective and feels more like “Real Programming” than building a Website. So to also build something usefull (at least for me) I build a little WebApp to check my Mercurial Repositories automatically so, if any of my Colleges pushes a Update I get notified quickly.

If somebody likes to check ist out you find the App under HgWatch.

Comments are welcome, I’m by now way an expert on Flex Development but it seems fun, maybe I port the App to Air someday.