Skip to content

Instantly share code, notes, and snippets.

@gilesbowkett
Created May 2, 2011 03:43
Show Gist options
  • Select an option

  • Save gilesbowkett/951157 to your computer and use it in GitHub Desktop.

Select an option

Save gilesbowkett/951157 to your computer and use it in GitHub Desktop.
real writers journal in vim
#!/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")
@gilesbowkett

Copy link
Copy Markdown
Author

just in case anybody's reading this, I don't keep my Ruby in /opt/local any more...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment