Delicious automation with Vimperator

May 7th, 2011 — 04:01 pm

Delicious might have been bought by mighty money makers now, but there’s still no add-on for Firefox 4 available. Thanks to the great Vimperator add-on which wraps VIM functionality inside Firefox, it is easy as cake to get a great automated ‘save to delicious’ workflow going.

So you know why you should bother reading this article any further: All I need to save to delicious is type two keys inside firefox. Then Delicious pops up, marked text already filled in as note.. you know the Delicious drill. When I’m done typing tags, all I do is hit [enter] again and the URL is saved to Delicious.

So, how do you get this functionality going? First, save the Delicious bookmarklet to your bookmarks. Then the magic happens.

Firefox is able to tag bookmarks with keywords, so it can look them up in the smartbar. We’ll use that functionality in combination with a VIM macro and we’re set. It’s only three steps, so bare with me.

1. Save a keyword to you delicious bookmarklet

2. Record the VIM macro

  • Find a website you like
  • Record the macro
    • q to start recording
    • d will be the macro name
    • o to open a bookmark
    • delicous, because that was the keyword
    • [enter] to open the page
    • [esc] to leave insert mode
    • q to save the macro

3. Save your lovely page to Delicious

4. Done

The next time you want to save a page to delicious, just hit @d to automatically redo what you just did by hand.

Note that there’s no end in usability here – you can do that with your readability bookmarklet, you can post a page to your favorite news aggregator and so on and so forth.

2 comments » | articles

Secure your Dropbox on Mac and Linux

February 11th, 2011 — 10:23 pm

Ever thought it might be worth encrypting your Dropbox, but were held back because it’s just too much work? I know I was. But not anymore – welcome to this 5 step guide to a secure Dropbox. It only takes a few minutes of work – compile time excluded.

This guide will use encfs, which uses business proof AES or Blowfish algorithms. Most importantly, it has a major benefit over other available encryption mechanisms – it operates on blocks. It doesn’t hide an entire encrypted volume in a single file. This approach doesn’t work well with Dropbox, because once the user changes only one file the whole Dropbox will be synchronized.

  1. Install MacFuse.
  2. Install encfs. If you have Homebrew, this is as easy as:

    $ sudo brew install encfs

  3. Delete your files from Dropbox. After deleting them, make sure to go to the webapp, hit ‘Show Deleted Files’ and delete each file/folder permanently.
  4. Now comes the fun part. Set up your encrypted Dropbox:

    $ encfs ~/DropboxEncrypted ~/Dropbox

    Enter ‘y’ to create the folder DropboxEncrypted, enter ‘p’ for Paranoia mode and chose a password.

  5. You’re done. ~/Dropbox will show your files just fine, but when you take a look at them on the webapp, you will see them encrypted.

After a reboot, the userspace mount of ~/Dropbox will be lost. Repeat step 4 to mount it again. If you ever want to unmount yourself, just umount it. This process can be automated with encfsvault.

Linux users, don’t worry – I didn’t forget you. Switch MacFuse with fuse and encfsvault with pam-mount. You’re a Linux user, you will manage.

Update for Lion users:
Don’t use MacFuse, it’s obsolete. Just install fuse4x and fuse4x-kext, then encfs – all via homebrew.

6 comments » | articles

Transition to github/git from trac/svn

December 7th, 2010 — 06:33 pm
Ever since I evaluated and implemented project management software for my current employer, I have been a big fan of trac. While I knew about the downsides of svn, I liked the upsides of trac: it’s lean, it’s clean, it’s Python!

During the last year, however, I came to realize that even though trac is a great tool for many projects, it might not be best for my personal projects. For one, social visibility is close to zero – in part because I like to host on my own server. Second, I was wrong to think svn is good enough for smaller projects – even when working alone git has major benefits. If only for being able to work offline, worry free distributed backups and beyond human speed. Anyway, “good enough” sometimes is just a fancy argument for being lazy.

So, last week I finally decided to get over it and to try github and git as my SCM toolset of choice. To use github is a no-brainer these days – just about every day I read great stories on HackerNews or reddit/r/programming. It’s not just about free hosting, that’s not a real problem anyway. It’s all about social visibility these days. Not having a github link on your CV will lead to certain questions.

Being on the wrong end of this discussion can be unnerving. It’s not that I can’t defend my point of view. It’s because everyone asking me about it has been right. After having worked with github/git the last couple of days, I conclude those tools have become mainstream for a good reason.

I’m a strong advocate of kaizen – to always improve yourself a little bit. I also encourage people to not only use the tools they know, but to always seek out for the best tool for a new job. I now have to realize, that concerning SCM it was me who had the outdated mindset. trac certainly is a great tool, I won’t deny that. But there is space for improvement. Time to move on.

Turns out, I’m a pretty active coder in my spare time. I worked on four projects the last few days, three of them visible on my new github account. Just smallish hacks, but hell – that’s what I love about coding: always being able to tackle new problems quickly and upfront; it is not about the big bucks – those are a side-effect.

1 comment » | personal

Nach oben

« Previous Entries     Next Entries »