programming

JavaScript Links LINK

Nettus+ generates some great content and posts some fantastic links. Here's a bunch of WebDev links (mostly JS). I'm so impressed with how powerful JavaScript is becoming on modern browsers. The next generation of WebApps are going to feel so close to native applications that I doubt we will be able to tell the difference. Here are 3 of my favorites from that Nettus+ list: Cryptico.js for client side encryption (up to 1024 bits) Keymaster for handling keyboard shortcuts (including modifier keys like command and option) JQuery Mobile.

Scratch File - Add to Top

I modified my scratch file script. The new version appends the clipboard to the top of the file rather than the bottom. That way the scratch file is in chronological order. WARNING: This script overwrites the contents of a file. [cc lang="AppleScript"]do shell script "pbpaste '/tmp/qqq_Scratch.txt' echo '/tmp/qqq_Scratch.txt' cat '/Volumes/Macintosh HD 2/Dropbox/Notes/qqq_Scratch.txt' '/tmp/qqq_Scratch.txt' cat '/tmp/qqq_Scratch.txt' '/Volumes/Macintosh HD 2/Dropbox/Notes/qqq_Scratch.txt'"[/cc] Just as a Unix reminder, the double angle bracket "

Scratch File

I keep a scratch file in my NVAlt library. I use it to keep random bits of information that I want to out live the clipboard. It's not meant to be permanent just a stop-over to some other destination. My clipboard is pretty volatile since I have a number of macros and scripts that temporarily hold bits of information on the clipboard. If it's something I might need later, then I better get it into something a bit more permanent.

Command Line Fu

I’m in heaven… CommandLineFu.com Some much good stuff. At least an evening worth of fun hacking to be had with this site.

Upload File Selection Via Transmit

In the never-ending pursuit of hard-won laziness, I often develop scripts to do simple tasks. Sometimes the joy is in the problem solving and sometimes it's in the final product. In this case it was in both. Yesterday I was working on an as yet to be published post that has a large number of images. My typical workflow is to make an annotation in the text of the image I want to insert.

Too Many Triggers

After posting one of my macros for Keyboard Maestro @hiilppp tweeted that there is a simpler way: Create a service with one line of Shell script. That is simple, but I have more services than I care to admit. So I started to play around with various methods of triggering scripts and macros. I am not a savant with LaunchBar, TextExpander or Keyboard Maestro, so there may be better solutions that what I describe.

Builders

Sometimes the Internet feels like a bunch of self-righteous babies full of nothing but opinnions. But "we" shouldn't forget that it's also a bunch of awesome people that make interesting things. Wonderful, meticulous, powerful things. So when you're burnt-out with the firehouse of tech blogging and hyperbole find some time to clean-up your RSS feeds. I just swapped a whole lot of junk "news" for some content from people that actually make things.

Python to AppleScript

I guess I’ve reached a transition. I started doing serious programming in AppleScript many years ago. But now I need this guide to write AppleScript effectively. I spent so much time in Python that I suck at AppleScript now. That’s how I like it.

BBEdit 10

BBEdit 10.0 is finally available in the App Store now. Great upgrade to a long time friend of the Mac. It's a free upgrade if you bought the previous version in the App Store too.

A Lion Ate My Python

After upgrading to Lion I quickly discovered that many of my custom macros that depend on Python were broken. A busy schedule meant that I put off researching the issue. Fortunately DrDrang’s recent post shed some light on the issue. It appears that Lion uses a newer version of Python (2.7) and also has a bit more restrictions when installing packages. If you want to get your python customizations back you’ll need to perform some maintenance.