Skip to content

Instantly share code, notes, and snippets.

@gilesbowkett
Created January 3, 2010 03:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gilesbowkett/267806 to your computer and use it in GitHub Desktop.
Save gilesbowkett/267806 to your computer and use it in GitHub Desktop.
#!/opt/local/bin/ruby
# supa primitive script to access today's journal entry text file
now = Time.now
month = now.month.to_s
month = "0" + month if month.to_i < 10
day = now.mday.to_s
day = "0" + day if day.to_i < 10
date = month + day + now.year.to_s[2,3]
system("vi /Users/giles/Documents/Journal/#{now.year}/#{date}.txt")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment