Write

May 1, 2013

I’ve been enrolled in Leo Babauta’s Zen Habits Sea Change Program since March of this year. I started with forming the meditation habit, which was easy for me because I’ve been meditating every morning for a few months already. That was followed by forming an exercise habit in April. I did pretty well with that one. I chose running as my exercise and ran around the block nearly every morning (I missed two days and I’m fine with that).

This month’s plan is the write daily habit.

Over the past few years, I’ve gone on and off from a daily writing habit. It started a few years ago when I read something about morning pages from the book The Artist’s Way. I didn’t read the book, I had only seen it mentioned by someone who I followed on the Internet.

That led me to find this website called 750 words. Seven hundred and fifty is around three pages. This site encouraged me to write everyday by offering small awards in the form of achievement badges. If I wrote every day for a week, I would get a new badge. If I wrote every day for a month, I get another badge. Many different kinds of badges for many different achievements. It seems silly, but it proved to be quite effective. I wrote every day, at least 750 words, for over a year.

Eventually, I got nervous about having my private journal entries hosted on someone else’s server and moved my writing to my local computer. I setup a basic script that would create a new document inside an encrypted disk image. I probably continued this for a few more months.

I’ve written daily for around 5 months total in the past year.

When considering picking up the daily writing habit again, I thought I would simply fire up my script and write in my journal. However, one of Leo’s recommendations is to publish my writing online. That’s what this post is.

I’m not sure if I’m going to publish my writing every day. I think I’d rather write in my private journal. I’m going to do that for a few weeks and see where it leads me.

— ␊ —

AppleScript Move Mail Message

August 8, 2011

I upgraded to OS X Lion and the AppleScript I was using to move a selected mail message to another mailbox broke. Here is the offending script:

tell application "Mail"
 move selection to mailbox "@action"
end tell

It looks simple enough, so I don’t understand exactly why it stopped working. I searched around and found something to try in the Mac OS X Hints section of Macworld.

I modified the script a little bit and came up with this:

tell application "Mail"
    set _msgs to selection
    set _mailbox to "@action"
    repeat with _msg in _msgs
        tell application "Mail"
            move the _msg to mailbox _mailbox
        end tell
    end repeat
end tell

I made two more like this one for my @reply and @waiting mailboxes. These all get processed with a keyboard shortcut via FastScripts.

— ␊ —

No Tracking Here

February 6, 2011

I’m on a bit of a privacy kick lately and I’ve decided to remove the tracking components from my site. I was at one point using Google Analytics, but dropped that in favor of Sean Inman’s Mint. I have since removed Mint from my site. A nice side benefit from this is that I was able to switch my site’s server type back to static. It’s cheaper that way.

It was fun for a while to see how the few people who were coming to my site got here, but I don’t really care to know. I think it will help me to write more for myself as well, as I won’t be influenced by the more popular posts. And on top of that, there will be one less thing for me to obsess over.

However, if I enable comments on a post, I’ll still get a sense of which ones are more popular. That’s assuming that anyone chooses to add a comment. I don’t see this as a privacy violation though, because the commenter is willingly submitting information, whereas with tracking scripts, the visitor may not know information about them is being recorded.

— ␊ —

A Breakdown of Sweet Mac Setups

December 31, 2010

Shawn Blanc runs a series on his website that showcases Sweet Mac Setups. It’s for people who “wish to geek out over workspaces, software, and hardware.” People like me. My setup was profiled in June of 2009.

I wanted to find out what are the most popular ways to setup a Sweet Mac Setup and I went through all of them to gather some figures. I chose to capture data only for the setups that used a laptop connected to an external display. Why? Because that’s how I have mine setup. By my count, there are 18 such setups in the series.

There are three things of which I was interested: clamshell mode, keyboard location, and laptop stand. For clamshell mode, I wanted to know if the lid is open or closed, and what is the location of the laptop relative to the external display. For keyboard location, I wanted to know if the keyboard is sat atop the desk or on a keyboard tray. Finally, I wanted to know if a laptop stand is used. The following are the details of my research:

Clamshell Mode
Open on the left 12
Open on the right 4
Closed on the left 1
Closed on the right 1
Keyboard Location
Keyboard on Desk 15
Keyboard on Tray 3
Laptop Stand
Stand 13
No Stand 5

The most popular Sweet Mac Setup is clamshell mode open on the left of the external display, keyboard on the desk, and a laptop stand. However, the correct setup (mine) is clamshell mode open on the right, keyboard on a tray, and a laptop stand. I must mention that this is my current home setup. At work, the correct setup is clamshell closed on the right, keyboard on the desk, and no laptop stand.

— ␊ —

Safari Extensions Obviate NNW

June 10, 2010

Two Safari extensions have obviated my need for NetNewsWire: greader-bgtabs and Google Reader Styles.

My flow for reading articles when I’m on the desktop is like this. I open NetNewsWire and use keyboard shortcuts to open all the new articles in Safari in the background. Then, I go to Safari and read the articles.

Some people are happy simply reading the articles inside NetNewsWire, either in the integrated browser or in the stylized view pane. That’s cool. And, if that’s how you like it, then NNW will work well for you. Since I’m only using NNW as a launcher, it’s superfluous to have it running all the time.

My issues with the Google Reader website are, 1) it looks pants, and 2) when you press ‘v’ to open items, they open in the foreground. The two extensions I’m using alleviate both issues. Now, the Google Reader website looks good and pages open in background tabs.

I’m all for only using those applications that you really need. And, until recently, NNW was the best option for a good feed reading workflow.

— ␊ —

Link List Post with Jekyll and Applescript

March 13, 2010

In the previous post, I mentioned that I hacked together a somewhat automated process to create a linked list style post. The following AppleScript is what I came up with:

on displayErrorMessage(s)
    display dialog (s) buttons {"OK"} default button "OK" with icon caution
end displayErrorMessage

tell application "Safari"
    try
        set pageURL to URL of document 1
        set pageTitle to name of document 1
        set selectedText to do JavaScript "getSelection();" in document 1
    on error errorMessage
        displayErrorMessage("Can’t create a new post because of an error getting information from Safari.") of me
        return
    end try
end tell

property LF : ASCII character 10

set modTitle to text returned of (display dialog "Modify the title:" with title "Modify Title" default answer pageTitle buttons {"OK"} default button 1)

tell application "System Events"
    set the clipboard to "[" & pageTitle & "]" & "(" & pageURL & ")" & LF & LF & ">" & selectedText & LF & LF
end tell

do shell script "ruby ~/bin/newlink.rb " & quoted form of modTitle

Here is a breakdown of how the script works.

on displayErrorMessage(s)
    display dialog (s) buttons {"OK"} default button "OK" with icon caution
end displayErrorMessage

tell application "Safari"
    try
        set pageURL to URL of document 1
        set pageTitle to name of document 1
        set selectedText to do JavaScript "getSelection();" in document 1
    on error errorMessage
        displayErrorMessage("Can’t create a new post because of an error getting information from Safari.") of me
        return
    end try
end tell

This first section, which I copied from the New Post from Safari script included with MarsEdit, grabs the URL, Title, and selected text from Safari and assigns them to the indicated variables. This is the essential part of the process, and if this was all the script did, it would be a big timesaver. But, I wanted to see if I could get more out of it.

set modTitle to text returned of (display dialog "Modify the title:" with title "Modify Title" default answer pageTitle buttons {"OK"} default button 1)

This bit of code will open a dialog box asking to modify the page title. Some page titles are lengthy, and this bit allow me to shorten it up to what I want.

tell application "System Events"
    set the clipboard to "[" & pageTitle & "]" & "(" & pageURL & ")" & LF & LF & ">" & selectedText & LF & LF
end tell

This part copies a Markdown formatted link to the clipboard. It includes an href to the article as well as a blockquote of the selected text.

Now that I’ve got what I want to include in the link list in the clipboard, the next step is to create a new post in the Jekyll system I have setup. Thanks to this bit of Ruby code, compliments of Alex Payne, a shell script call to the Ruby program will create the file with the necessary markup.

do shell script "ruby ~/bin/newlink.rb " & quoted form of modTitle

The next step is to paste in the clipboard data and type any other comments I have.

It may seem like a lot of effort, but it only takes a few seconds to generate the link list item. I’m sure there is a more efficient way to do this, and I’m looking forward to figuring one out.

— ␊ —

The Search is Over

February 24, 2010

When I was twelve, we didn’t have cable television, so if we wanted to see any music videos, we waited for NBC’s Friday Night Videos. On one particular Friday night, the video for Survivor’s “The Search is Over” was scheduled. The cool thing about this is my Uncle Alex (UA) is in the video. So on that particular Friday night, me, my brother (Hey brother!), my mom, and my grandma gathered around the T.V. to catch a glimpse of UA on the small screen. When his scene finally arrived, my mom or grandma jumped up and shouted, “There’s Al! There’s Al!” We captured the moment on VHS and watched the video over and over for the next several weeks. That videotape has since been lost, broken, or erased. Not that it matters, I don’t have a VCR I could play it on now anyway. But thanks to the Internet, I was able to locate a decent clip of the video. It was quite a search, but now it’s over.

UA is the guy answering the phone in the video and today is his birthday. Happy Birthday UA!

— ␊ —