Monitoring Harvest from CLI

Prompt

At WebDevStudios we use Harvest for tracking time.
The Harvest Time Tracker for Chrome is awesome.  Most of the time, I’m starting a new task from within Basecamp, or occasionally github so the chrome plugin is perfect.  I typically only go the harvest site to stop my tracker for lunch or at the end of a work day.

However, I often wonder about my hours for the week and if I can take a long lunch and catch an episode of X-Files.  But, I’m not neurotic enough to actually log into harvest and check.

So, I wrote a simple script that grabs my hours worked from the Harvest API and saves them to a file. I added this script to my cron to run every 15 minutes and then I include that file in my prompt:
prompt_segment white black $(tail /Users/garykovar/.tools/harveststatus)
(I’m using the agnoster theme in zsh).

Here’s what my prompt looks like:

PromptThe w is hours for the week and d is for the day…not real time obv…

And here’s the gist of it:

Edit:
Oh yeah…if you don’t edit your crontab and always have to google for syntax, here’s what I did:
*/15 * * * * /Users/garykovar/.tools/harvest

WordPress Best Practices

I spoke at the my local WPJax Meetup tonight.

The topic was Best Practices! (the ! is not optional)

This was my first attempt at a haiku for each slide.
I wish I’d had more time to prepare but I really enjoyed it.  It seemed like (based on questions) that it was at least somewhat useful to a few people.

And here are the slides: Best Practices