Skip to content
Permalink
Browse files
Add todo
  • Loading branch information
holman committed Aug 5, 2013
1 parent 2cc3971 commit d774e970a88a04aca8024178849301af6d6ac5c3
Showing 1 changed file with 19 additions and 0 deletions.
@@ -0,0 +1,19 @@
#!/bin/sh
#
# Creates something for me to do.
#
# I've used literally every todo list, app, program, script, everything. Even
# the ones you are building and haven't released yet.
#
# I've found that they're all nice in their nice ways, but I still don't use
# them, thus defeating the purpose of a todo list.
#
# All `todo` does is put a file on my Desktop with the filename given. That's
# it. I aggressively prune my desktop of old tasks and keep one or two on there
# at a time. Once I've finished a todo, I just delete the file. That's it.
#
# Millions of dollars later and `touch` wins.
set -e

# Run our new web 2.0 todo list application and raise millions of VC dollars.
touch ~/Desktop/"$(echo $@)"

33 comments on commit d774e97

@felipecsl
Copy link

@felipecsl felipecsl commented on d774e97 Aug 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But will this "change the way people do to-dos"

@djbender
Copy link

@djbender djbender commented on d774e97 Aug 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@mihasya
Copy link

@mihasya mihasya commented on d774e97 Aug 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤘

@holman
Copy link
Owner Author

@holman holman commented on d774e97 Aug 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made an internet online advertising campaign. Please put this on your weblogs.

finally

@brow
Copy link

@brow brow commented on d774e97 Aug 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I built a hosted alternative. As a service. In the cloud.

touch ~/Dropbox/"$(echo $@)"

@brow
Copy link

@brow brow commented on d774e97 Aug 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, people already made this joke on Twitter.

@antn
Copy link

@antn antn commented on d774e97 Aug 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

holman this is not web scale because it not use php please fix immediately

if use php this would be covered in

@mgonto
Copy link

@mgonto mgonto commented on d774e97 Aug 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HAHAHA. I like keeping my desktop empty, so this might work AHAHAH

@kbrock
Copy link

@kbrock kbrock commented on d774e97 Aug 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be pretty easy to convert to an alfred script. (and the done version as well)

@Ephemera
Copy link

@Ephemera Ephemera commented on d774e97 Aug 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jakeasmith
Copy link

@jakeasmith jakeasmith commented on d774e97 Aug 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Epic.

@rgbkrk
Copy link

@rgbkrk rgbkrk commented on d774e97 Aug 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 10/10 would copy to ~/bin again

How much will the enterprise license cost?

@holman
Copy link
Owner Author

@holman holman commented on d774e97 Aug 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the on-premise version, contact us for a quote.

@lexrus
Copy link

@lexrus lexrus commented on d774e97 Aug 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a Alfred workflow for it.
http://d.pr/f/VlXw

@sp3c73r2038
Copy link

@sp3c73r2038 sp3c73r2038 commented on d774e97 Aug 7, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jonashaag
Copy link

@jonashaag jonashaag commented on d774e97 Aug 7, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been doing this for forever, with the difference of using SCREAMING_ALL_UPPERCASE titles to make them even more annoying :-)

@mgoerlich-dev
Copy link

@mgoerlich-dev mgoerlich-dev commented on d774e97 Aug 8, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My Desktop is always messy and from time to time i just move everything to trash, so this approach probably won't work any good for me :(

@lyrixx
Copy link

@lyrixx lyrixx commented on d774e97 Aug 10, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Very nice idea.

I Added the number of remainings task in my PS1 thanks to very nice TODO HATEOAS API :D

lyrixx/dotfiles@2890bf5

@Pym
Copy link

@Pym Pym commented on d774e97 Aug 17, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have also created an Alfred Workflow, but you can even delete items from Alfred with it. And it has icons.

@wadewilliams
Copy link

@wadewilliams wadewilliams commented on d774e97 Sep 3, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@holman Sometimes, your awesomeness, does it bother you?

@jrodl3r
Copy link

@jrodl3r jrodl3r commented on d774e97 Oct 13, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

going along w/ the Alfred-2-Workflow thing.. tried to enhance what @Pym + others have already done here: Alfred Desktop Todo's

Thx for the tips everyone! 🍻

@turnage
Copy link

@turnage turnage commented on d774e97 Nov 21, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was having trouble compiling this program. Here is the output:

File truncated
collect2: error: ld returned 1 exit status

It finally compiled with

gcc todo.sh -o touch

just by trying it over and over.

The script was pretty slow so I added -O3. Bad idea. My PSU led started flickering upon execution and things became unresponsive. Luckily I was on a Linux system so I could ctrl+alt+delete and use the start menu to open the defragmenting tool.

Once the hard drive finished defragmenting I started to look around in the codebase for what could have caused behavior like that. I ended up writing this python script to write out versions of the program for each line, with that line missing, in order to trace the behavior back.

import fileinput, os

lines = []
for line in fileinput.input():
    lines.append(line)

len = len(lines)

for i in range(0, len):
    with open(str(i) + ".sh", "w") as fi:
        for j in range(0, len):
            if (j != i):
                fi.write(lines[j])
    os.system("gcc -o3 " + str(i) + ".sh -o " + str(i))

I spent a while executing them each by hand until I found the issue, at line 13. For context, line 13 is

# at a time. Once I've finished a todo, I just delete the file. That's it.

I think it is a hardware bug.

To test my suspiscions I contacted the manufacturer of my hard drives. I provided them with conditions to reproduce the bug, and they confirmed with the following reply

Delivery to the following recipient failed permanently:

Technical details of permanent failure:
Google tried to deliver your message, but it was rejected by the server for the recipient domain.

The error that the other server returned was:
570 #7.1.0 Address rejected.

Fixing this issue has been quite an adventure! Hopefully line 13 will be omitted in future versions.

@parkr
Copy link

@parkr parkr commented on d774e97 Dec 4, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PaytonTurnage It's a bash script, you don't compile it. You just run it either with ~/bin/todo or bash ~/bin/todo.

@redhotvengeance
Copy link

@redhotvengeance redhotvengeance commented on d774e97 Dec 4, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PaytonTurnage I enjoyed the part where the manufacturer confirmed the defect by your email getting bounced back from the mail server.

@Whitespace
Copy link

@Whitespace Whitespace commented on d774e97 Feb 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pro Tip: make your files gargantuan in os x:

/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:iconSize 128" ~/Library/Preferences/com.apple.finder.plist
killall Finder

@cpryland
Copy link

@cpryland cpryland commented on d774e97 Feb 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Funny, my todo.txt (~40K lines, lowest tech possible) is about 25 years old now, and has been edited in some form of emacs ever since the beginning.

@rgbkrk
Copy link

@rgbkrk rgbkrk commented on d774e97 Feb 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cpryland when do you think you'll get to the last 30K?

@WhyNotHugo
Copy link

@WhyNotHugo WhyNotHugo commented on d774e97 Nov 29, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like my desktop empty but this won't work for me - I don't even have desktop icons:

$ ls Desktop
ls: cannot access Desktop: No such file or directory

On a more relevant note, I'm curious as to why touch /tmp/"$@" doesn't work. I expected it to, but it trims down to the first work - even though it's quoted! 😞 Why did you need to "echo $@"?

@holman
Copy link
Owner Author

@holman holman commented on d774e97 Nov 29, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Latest code is: https://github.com/holman/dotfiles/blob/master/bin/todo

You might want to replace the path with whatever the path to your desktop is.

@WhyNotHugo
Copy link

@WhyNotHugo WhyNotHugo commented on d774e97 Nov 29, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@holman: Thanks, though my point was more of "I don't like desktop icons, and my desktop environment doesn't even support showing them." 😄 .

Why does $@ not work? if I may ask? Shouldn't it expand to all the arguments?

@holman
Copy link
Owner Author

@holman holman commented on d774e97 Nov 29, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some interesting clarification in: http://unixhelp.ed.ac.uk/scrpt/scrpt2.2.2.html

@WhyNotHugo
Copy link

@WhyNotHugo WhyNotHugo commented on d774e97 Nov 29, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@diessica
Copy link

@diessica diessica commented on d774e97 May 29, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahahahahahaahah, I loved it!

Please sign in to comment.