Quick iCal/Google Calendar Sync Update

August 3rd, 2008 Ryan Toohil Posted in Apple, Google Calendar, iPhone No Comments »

So, Google announced recently that it would support CalDAV syncing with iCal, which means if you update an entry in iCal (or Google Calendar), they’ll be in sync within a few minutes. Awesome.

Unfortunately, it meant that my previous script iteration would now continually add alarms, leading to each entry having 3 or 4 alarms. Turns out that updating a local iCal calendar and adding an alarm actually updates that same info at GCal. Which is awesome (but was unexpected).

So, I made a small tweak to the script, which makes it run a bit faster and makes sure that you only get one alarm on an entry:

Try this instead:

tell application "iCal"
  set theCalendars to {"Cal1", "Cal2"}
  repeat with theCurrentValue in theCalendars
	tell calendar theCurrentValue
	  set theEvents to every event
	  repeat with theCurrentEvent in theEvents
	    tell theCurrentEvent
	      if not (exists sound alarm of theCurrentEvent) then
		   make new sound alarm at end /
		   with properties {trigger interval:-15}
		  end if
	    end tell
	  end repeat
	end tell
  end repeat
end tell

That basically means it won’t add another sound alarm if the entry already has one. Much handier. In fact, you could just take that script and have it run every few hours (either cron’d or via iCal), and not have to worry about the iTunes Sync script.

AddThis Social Bookmark Button

Syncing the iPhone with Google Calendar (now with working Alarms!)

July 22nd, 2008 Ryan Toohil Posted in Apple, Google Calendar, iPhone No Comments »

My biggest gripe with the iPhone thus far has really been a gripe with iCal. Namely, that there’s not an easy way to add alarms to subscribed calendars. I know that sounds like a silly gripe, but let me set the stage.

My main calendaring info is in Google Calendar, like a lot of folks. This is great because I can access my calendar from anywhere, on any computer, most cell phones, etc. It gives me a central way to maintain a calendar and have access to it pretty much all the time. I subscribe to my Google Calendar in iCal on my Mac, which gives me native calendaring (one-way, at least) that’s always up-to-date with the data in the Google cloud. It’s nice.

Taking it one step further, I use SyncMyCal to push my Outlook calendar to my Google Calendar as well. (I would use the normal Google Calendar Sync application, but it only syncs with the primary calendar, and I’d rather keep my personal calendar and work calendar separate.) So, every day, before I leave the office, I click a little sync button and it pushes my Outlook info up to Google Calendar. Again, one-way sync, but it’s one-way from my primary source, so I’m not worried about it.

That means I’ve got my personal and work calendars all centrally located on Google Calendar, accessible from pretty much anywhere. Including my primary machine of my Mac, where iCal subscribes to all of my various calendars. It’s a wonderful system.

Except one thing. iCal doesn’t allow you to set alarms on subscribed calendars. At least not through the interface. That makes this wonderful sync system decidedly less useful. See, between my MacBook and my iPhone, I’m pretty much covered. One is with me most of the time. If I had alarms on my calendars, then I’d pretty much have a perfect setup.

It worked incredibly well with my Motorola Q (and The Missing Sync from Mark/Space), which would import all of the calendar items from iCal, and set default alarms on them on the Q. Beautiful.

Not so much on the iPhone. For a couple of months, I’ve just dealt with the fact that using Google Calendar put me in the middle of the two supported options: using iCal and using Exchange (which became available with the 2.0 firmware). I could see the calendar events on my iPhone, but they were never going to make that nice “bleep bleep” sound and let me know that I had a meeting or I had to be somewhere in a few minutes. It’s something I had taken for granted with previous smartphones, but just chalked up to a deficiency in the early years of the iPhone.

Except I finally got fed up enough to do some digging into AppleScript and found some pointers to adding an alarm to an event. I figured why not give it a shot on subscribed calendars? Maybe I could add some alarms to my subscribed calendars?

After poking around and playing with AppleScript (something brand new to me, I got this working):

tell application "iCal"
	set theCalendars to {"Subscribed 1", "Subscribed 2"}
	repeat with theCurrentValue in theCalendars
		tell calendar theCurrentValue
			set theEvents to every event
			repeat with theCurrentEvent in theEvents
				tell theCurrentEvent
					make new sound alarm at end with properties {trigger interval:-15}
				end tell
			end repeat
		end tell
	end repeat
end tell

Basically, we grab our two subscribed calendars (those are placeholder names, replace with your own subscribed calendar names), go through each entry and add a sound alarm 15 minutes before the event. It takes maybe 10 or 15 seconds to go through both of my calendars, but lo! I end up with alarms both in iCal and on the iPhone!

Bingo. Exactly what I need. I’m sure there’s something more elegant, but this worked for me.

The next issue, of course, was a “race condition” of sorts. My calendars update themselves periodically. If they updated before I sync with my iPhone, the alarms would be gone. How could I resolve that?

How about another AppleScript? I did a bit more googling, and of course, there’s a nice way to sync your iPhone (or iPod), via AppleScript. Why not combine both scripts and drop it into the iTunes script directory? That’s a brilliant idea!

tell application "iCal"
	set theCalendars to {"Sub1", "Sub2"}
	repeat with theCurrentValue in theCalendars
		tell calendar theCurrentValue
			set theEvents to every event
			repeat with theCurrentEvent in theEvents
				tell theCurrentEvent
					make new sound alarm at end with properties {trigger interval:-15}
				end tell
			end repeat
		end tell
	end repeat
end tell

tell application "iTunes"
	repeat with s in sources
		if (kind of s is iPod) then update s
	end repeat
end tell

Now, when I’m about to leave the house, I just do this:

iTunes Sync

That’s it. All of my calendar items, from Google Calendar, sync’d to my iPhone with alarms. It’s a beautiful thing.

And I wish nothing more than for iCal to render it useless my having a “add default alarm to subscribed calendar” checkbox.

AddThis Social Bookmark Button

iPhone!

April 28th, 2008 Ryan Toohil Posted in Apple, General, iPhone, iPod No Comments »

iPhone

My iPhone is coming! My iPhone is coming!

AddThis Social Bookmark Button

Heh, Skitch is fun and phpBB definitely sucks balls

April 20th, 2008 Ryan Toohil Posted in Apple, Apps, Web hosting No Comments »

I’ve meant to use Skitch for a while, and finally got around to using it today. It’s pretty cool. For instance, you can do a search for “phpbb is a piece” and find some fun links:

google results

Then, if you want, you can do some fun stuff to it. Like add some comments:

google results with some color

Tada!

Awesome. Takes about 2 seconds.

AddThis Social Bookmark Button

Pimp Me A Mac App

March 17th, 2008 Ryan Toohil Posted in Apple, Mac No Comments »

I wanna buy a new Mac app.

Things I’m considering:

  • Coda — The all-in-one web dev app is pretty cool, good looking, and I’ve used the demo to build a couple of pages. It’s nice. It’s also expensive. It’d be a no brainer at sub $50. I’m close to buying it when it’s discounted at $79. It’s hard to pull the trigger at $99.
  • Twitterrific — Almost a no brainer at $15, but all it does is remove ads and that just seems kinda wasteful to me.
  • Warcraft 3 — I just kind of want to play an old school RTS like Warcraft or Starcraft.

Sell me on an app or a game. Maybe I’ll buy it.

AddThis Social Bookmark Button

How I Get Stuff Done

March 2nd, 2008 Ryan Toohil Posted in Apple, Mac, Perl, Web hosting, Work No Comments »

I’ve been meaning for a while to sort of document how I get stuff done at work. It was just over a year ago that I bought my MacBook Pro. Within a week or so, I started using it at work. Probably within the first month, I’d completely moved to my MacBook as my sole work machine. After a year, and particularly since the upgrade to Leopard, I’ve kind of worked out how I get stuff done.

Let’s start with my environment.

IMG_0337
The front wall of my office with pictures taken by a former co-worker. And, of course, the famous “Dwight” flasher flyer from “The Office”

IMG_0334
The shelf behind me containing random stuff I’ve gotten from eating kid’s meals and ice cream sundaes. And some Yankee Swap gifts. Oh, and I have some windows. That makes my life nicer.

IMG_0332
My white board and busted ass bookshelf. And my cool VT light switch cover from Matt, and some random stuff I’ve collected and hung up.

IMG_0333
The view of where I sit. I used to use that big ass monitor to do a dual-monitor display, but since I’ve been moving around so much each day, now it’s just there to keep people from having a good look at me.

IMG_0335
Finally, the MacBook Pro, my Motorola Q, my 30GB 5G IPod, my noise canceling head phones, and my phone that I don’t ever answer or use. And yeah, that’s Win2k running in Parallels. More on that in a bit.

So that’s where I do my work.

My Mac is setup in a very particular way. The upgrade to Leopard with Spaces has made my life considerably easier. It’s probably easiest to roll through how my Spaces are setup.

Space 1
This is where I use my browser, which is currently Firefox 3 Beta 3, and sometimes Safari 3.

Also running on this space is my “chat” clients. We use Jabber at work, which works nicely with Adium. I’ve also got Twitterrific running on this space.

Space 2
Here’s where my Terminal lives, which is just the default Leopard terminal. Tabbed Terminals make me happy, particularly once I made the default tab switching hot keys to be Command+Left and Command+Right.

It’s all command line and vim and mysql. Good times.

Space 3
Space 3 is where iCal and Mail live. Mail is just downloading my mail from Gmail. iCal is doing some cool stuff. I have most of my life in Google Calendar. iCal subscribes to my calendar feeds from GCal (including my work Outlook calendar–more on that in a second).

With all of my stuff in iCal, I then use the Missing Sync for Windows Mobile to sync my calendars to the previously mentioned Motorola Q (which also connects to my work Exchange server, so it’s almost as a good as a Blackberry).

Space 4
It’s the Windows space! I’ve got Win2k (don’t ask, I had a license lying around) running in Parallels, in Full Screen mode. Parallels runs pretty much just so I can run Outlook (for work email and calendaring) and so I can occasionally test stuff in IE6.

My Outlook runs a plugin called SyncMyCal to sync my Outlook calendar off to Google Calendar (which then gets sync’d down to iCal, as previously described).

Other software that occasionally comes in handy:

  • NeoOffice (though it’s slow and bulky and I’d switch if there was a viable alternative)
  • iTunes (obvs)
  • MarsEdit (for doing this sort of stuff)

That’s how I get my work done. Anything else I should be using?

AddThis Social Bookmark Button

Awakened By Awaken

February 6th, 2008 Ryan Toohil Posted in Apple, Apps, Mac 4 Comments »

So, after yesterday’s post about the move to shareware of Aurora (which, again, I don’t begrudge the dev that–it just doesn’t fit into my plans), I got an email from Jerry of Embraceware, the creators of another Mac alarm clock app called Awaken.

Jerry had a good deal for me: a free copy of Awaken.

That’s pretty amazing. I’m a small little blog, written by a web dork. My readership is pretty small. But Jerry is the smartest of marketers. What better way to get the word out about your product than to get it into someone’s hands who’ll try it, write about it, and probably evangelize for it (just based off the fact that it was such a great out of the blue offer).

So I installed Awaken last night, and I woke up to this morning to Bloc Party. It works as advertised, has a pretty nifty interface, and has one feature that Aurora doesn’t: it doesn’t require you to turn off your screen saver password or turn on auto-login. Both of those lower the security of your Mac (particularly if you’re using a laptop, like me), and it always bugged me about Aurora.

Now, with Awaken, even though my machine was locked, the alarm clock turned on and work me up, allowed me to snooze it or turn off the alarm, and then I could go about my daily business.

I like that. A lot.

It’s a pretty app too (especially in full screen mode when you wake up). Here’s a taste (from Embraceware’s flickr account):

Awaken rocks a good bit. I’m probably going to move to it as my alarm clock–it’ll be a whole lot less abrasive than my blaring alarm clock from 1988 (that my girlfriend despises). And then I’ll probably start using it as my sleep timer too, since it’d be pretty cool to toss a movie into iTunes and have it shut down my Mac when it’s done.

Jerry’s done pretty darn good marketing here. I would probably have not even considered Awaken before, but now I’m evangelizing it. I love the internet.

You can check out Jerry’s blog for more info on Awaken.

AddThis Social Bookmark Button

Aww, Aurora’s no longer freeware

February 5th, 2008 Ryan Toohil Posted in Apple, Apps, Mac 2 Comments »

Aurora’s a pretty cool app for the Mac. I don’t use it very often, but when I’ve been traveling, it’s been nice to have a backup alarm. As I do every day, I ran my little Application Update widget and got really excited when I saw a new release! New cool, free software!

I like things that are free.

Unfortunately, Aurora’s become a shareware app. Well, it’s not really unfortunate. It’s a cool app. I’m sure there’s people for whom it’ll be worth the $15. It’s just not for me; I don’t use it enough. So now I’m left to wonder “Do I keep the old version and get taunted by the AppUpdate widget every time there’s a new release? Or do I remove the old version and learn to live without it?”

Really, that’s what’s currently going through my brain. I think I might actually remove the app. It’s no offense to Aurora, I just don’t want to have that pang every time the widget displays new stuff.

AddThis Social Bookmark Button

Plaxo … Not Quite the Bees Knees of Sync

July 16th, 2007 Ryan Toohil Posted in Apple, Google Calendar, Plaxo 2 Comments »

For a while now, I’ve been looking for a good way to sync the calendar on my Macbook to Google Calendar to my Outlook at work. It’d be nice to be able to know what my next day at work looks like in Outlook, then to have my Calendar sync’d down to my laptop so that I can see and adjust things while offline, then sync it all back to the master calendar in Google Calendar.

 

It shouldn’t be that tough, but so far, it has proven elusive. I’ve tried some of the free tools that are around to sync iCal with Google Calendar and Outlook with Google Calendar, but they’ve all proved a bit wonky.

 

Finally, Scoble mentioned that Plaxo had it’s new beta that would do all of the syncing through a nifty web application. So, I headed over to Plaxo.com and tried it out. It seems pretty straight-forward. You add “sync points”, which are places that Plaxo will sync your data to. I added Google Calendar, my Mac, and my work Outlook. The latter two required the installation of some software. Nothing too difficult. A couple of config tweaks later and I saw my work calendar in my Google Calendar and sync’d down to my Mac.

Perfect!

 

Except, over the following few days, I would constantly get duplicate calendars, lose the original calendar, get duplicate entries, continually have to tell Outlook which calendars I really wanted, which it would ignore and keep syncing other ones.

 

It became a royal mess.

 

So, I decided to uninstall things, get back to square one, and at least retain my Google Calendar the way it was. Except Plaxo ate my two calendars (because they no longer existed in Outlook … lesson: kill your sync points before killing your calendars). That kinda pissed me off. Thankfully, my Mac still had my calendar, so I was able to dump the ICS entries and upload them to Google (import of ICS files is a nice feature of Google Calendar, by the way!). I lost my music calendar, but it was mostly older stuff at this point, so I started that one over.

 

Plaxo just didn’t work for me, though it seems like it could be useful if they work the kinks out. It didn’t sync to Google Calendar fast enough, which was always a bit annoying. The apps for the Mac and PC were kind of clunky, but they worked ok. But borking the calendar syncing was just a bit too much to deal with at this point.

 

So, I’m back to just subscribing to my Google Calendar feeds through iCal. I’m going to try gSync for about the 4th time and hope that the final release version is finally good enough to maybe think about using full time.

 

It’d be cool if Google solved this problem themselves (maybe opening up the GCal API), but I’m not holding my breath.

AddThis Social Bookmark Button

The much awaited … stuff

February 19th, 2007 Ryan Toohil Posted in Apple, General, Gmail, Google, Google Calendar, Google Reader, Web hosting, smells like fish 3 Comments »

It’s been a busy few weeks. The biggest news is probably my latest purchase: I got my first non-PC in the form of a MacBook Pro. I’d been looking at getting a laptop for a while, mostly because my existing laptop is old, underpowered, has a half-working keyboard, and had been resigned to sitting on my stereo so that I could stream music to it. I couldn’t even bring it anywhere, as the battery life was simply miserable.

Working at a web hosting company, spending a majority of my day ssh’d into a Unix box, I’d gotten very comfortable at the command-line again, much like I was back in my college days. Between the command line and the browser, I didn’t really use any major Windows applications at the office or at home. I use MS Office, occasionally, but I don’t even use that at home (where I use OpenOffice). My PC is still a great box, but it was a glorified game machine.

Taking it one step further, I’d realized how much of my life really is in the browser these days. My mail goes to Gmail; my calendar is Google Calendar; my RSS feed reader is Google Reader. A few years ago I ranted that I couldn’t see ever moving completely to a thin client/browser world. Granted, it was in the middle of a major Comcast outage, where they weren’t sending any traffic to Yahoo!, which is pretty significant. These days, while there are minor outages, it’s rare that I can’t get to my data online. When I can’t, I can get it via my cell phone (and once Google gets Calendar working on a phone, I’ll be pretty much set). Finally, with Google (and Microsoft and Yahoo!) exposing your data in interesting ways (RSS, iCal feeds, private HTML), you can always pull it down into your thick client and access it offline, should you need to.

I’ve also had a desire to get creative again, whether its restarting the podcast (which will happen), blogging more, working on my website, or just generally brainstorming other ideas, I’ve needed a way to get untethered from my PC. It’s cold in my little office during the winter, and I can’t neatly multitask in front of the TV. With most of the creative ideas requiring the authoring of at least a little bit of code, I was looking for a laptop that would let me use my friendly Vim application to hack some HTML, CSS, or Perl.

All that put together lead to me looking at a Mac. Not because they’re trendy, but because it’s the nicest Unix machine you’ll see. OS X is a very pretty, and functional, interface on top of a Unix backend. I can take my laptop to work and scp files from a terminal window to our data center at rates that greatly exdeed anything I can get over FTP. I can pop open a terminal window and quickly turn on apache and mess with some Perl code before I upload it to my website. I can open up GarageBand and pull together a podcast a little more easily than I can in Audacity on the PC. The ability to neatly run Windows in either VMWare or Parallels while inside of OS X is what pushed me over the top. (Actually, it was one of my co-workers showing me IE running in coherence mode inside Paralells, which meant he could have IE next to Firefox next to Safari on his desktop, allowing him to test 3 major browsers at the same time. Very cool.)

So, I pulled the trigger and picked up a MacBook Pro. It took me a little while to get used to the differences between the Mac and Windows, but the learning curve to being productive is really shallow. I’ve nearly replicated all of the functionality of my Windows PC, but with the ability to do it from anywhere in my house. I can listen to music streaming from my iTunes library while I type this up, waiting for Heroes to buffer up enough on the DVR so that I can watch it without commercials. Soon, I’ll probably throw together another episode of my podcast, which I can do significantly more easily now that I don’t have to start up a bunch of different applications (I’m still figuring out how to make the built-in mic work, as it seems to record to quietly).

So, I hope that my new found freedom will allow me to be a bit more prolific. With work and general life stuff, I’ve had to cut back my posting at The House That Dewey Built — I’ve sort of just become the tech guy and will let Jeff and the new folks concentrate on posting (though, I might have to throw something up there when the feeling hits me). I’ve got plans to at least throw something up at ryantoohil.com and let it be my testing ground for learning more CSS and JavaScript. I’m feeling a bit more invigorated, which is nice.

I actually want to build my home page around my little Mii off of my Wii. I haven’t gotten a good screenshot yet, but here’s an approximation. And yes, I’m a huge dork.

Mii

Hopefully, this desire to be creative will last. I’m going to try to get something up most days this week. I’m thinking that I’ll finally revisit the “So you want to have a web site” series. I’m planning on getting up a Dear Leader-centric podcast.

If you’re still out there reading, feel free to leave a comment. I’m curious to see how many are actually reading this. Checking my logs, I’ve got at least two readers in Google Reader (1 is me …) and 2 in NewsGator. If I was smart, I’d move to FeedBurner so I could track it, but I’ve got no desire to do that just yet.

That’s all for today. Heroes is starting, and I’m hoping that they’ll recover from their recent doldrums and put together a fun episode that doesn’t smell like fish.

AddThis Social Bookmark Button