Skip to content

Instantly share code, notes, and snippets.

@steinar
Created December 12, 2013 12:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steinar/7927413 to your computer and use it in GitHub Desktop.
Save steinar/7927413 to your computer and use it in GitHub Desktop.
Time-tracking shell command: What are you doing right now? alias less8='LESSCHARSET="UTF-8" less'
#!/usr/bin/python
import sys
from datetime import datetime
when = datetime.now().isoformat(' ').split('.')[0]
what = " ".join(sys.argv[1:])
line = "%s | %s\n" % (when, what)
f = open("/Users/steinar/doing.log", "a")
f.writelines([line])
print line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment