Skip to content

Instantly share code, notes, and snippets.

@darrend
Created August 19, 2010 18:09
Show Gist options
  • Save darrend/538515 to your computer and use it in GitHub Desktop.
Save darrend/538515 to your computer and use it in GitHub Desktop.
#! /usr/bin/ruby
require 'time'
ASIDES_FILE = "/Users/darrend/anaside.txt"
# grab something and stick it somewhere
if(ARGV.nil? ||ARGV.empty?)
puts %x(cat #{ASIDES_FILE})
else
line = ARGV.join(" ")
File.open(ASIDES_FILE, 'a') {|f| f.puts("#{Time.now.iso8601} | #{line}")}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment