Everything Posts Notes
mikker·over 12 years ago

Copy the URL of the current page and return - using Drafts for iOS and this bookmarklet

When I’ve read something and want to link to it or send it to a friend I need to grab the URL from Safari. This consists of tapping the minimized address bar, then tap the address bar, then tap a million times to make the Copy/Paste popup show, then copy. This is not easy.

With this bookmarklet in your Favorites folder, it’s as easy as tap, tap, tap and you’re done.

var a=encodeURI(window.location.href);window.location='drafts://x-callback-url/create?text='+a+'&action=Copy%20to%20Clipboard&x-success='+a;

Drafts opens up, copies the url and sends you back to Safari.

mikker·over 12 years ago

Upload to imgur from Quicksilver

I’ve become very fond of attaching animated GIF’s of new UI elements when I create pull requests at Firmafon. Recording a part of the screen is very easy using Quicksilver’s built-in screen recording and trimming features. Then when done, open the file in GIF Brewery and make it a gif. I usually lock the FPS to 15 and use the Simple Palette.

So far so good, we have a gif. Let’s put it somewhere we can reference. Imgur is great and keeps the images around for a long enough time for our colleagues to see it on Github. Luckily a command-line client for imgur already exists so grab imguru from Github and put it in ~/bin (or anywhere you’d like).

Quicksilver knows Applescript and supports custom actions in ~/Library/Application Support/Quicksilver/Actions, so open up AppleScript Editor.app and make a script with the following:

using terms from application "Quicksilver"
  on open theFile
    try
      set filePath to POSIX path of theFile
      set theCommand to "~/bin/imguru '" & filePath & "'"
      return do shell script theCommand
    on error e number n
      return e
    end try
  end open

  -- Tell Quicksilver we only work with files
  on get direct types
    return {"NSFilenamesPboardType"}
  end get direct types
end using terms from

Save it as Upload to imgur.scpt or something like it and you might have to restart Quicksilver and you’re there.