Permalink
Browse files

Add `todo`

  • Loading branch information...
1 parent 2cc3971 commit d774e970a88a04aca8024178849301af6d6ac5c3 @holman committed Aug 5, 2013
Showing with 19 additions and 0 deletions.
  1. +19 โˆ’0 bin/todo
View
@@ -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 $@)"

34 comments on commit d774e97

@felipecsl

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

@mihasya
mihasya commented on d774e97 Aug 5, 2013

๐Ÿค˜

@holman
Owner
holman commented on d774e97 Aug 5, 2013

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

finally

@brow
brow commented on d774e97 Aug 5, 2013

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

touch ~/Dropbox/"$(echo $@)"
@brow
brow commented on d774e97 Aug 5, 2013

Ugh, people already made this joke on Twitter.

@antn
antn commented on d774e97 Aug 6, 2013

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

if use php this would be covered in โœจ

@mgonto
mgonto commented on d774e97 Aug 6, 2013

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

@kbrock
kbrock commented on d774e97 Aug 6, 2013

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

@Ephemera

๐Ÿ‘

@jakeasmith

Epic.

@rgbkrk
rgbkrk commented on d774e97 Aug 6, 2013

๐Ÿ‘ 10/10 would copy to ~/bin again

How much will the enterprise license cost?

@holman
Owner
holman commented on d774e97 Aug 6, 2013

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

@lexrus
lexrus commented on d774e97 Aug 6, 2013

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

@aleiphoenix

๐Ÿ‘

@jonashaag

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

@MaThGo
MaThGo commented on d774e97 Aug 8, 2013

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
lyrixx commented on d774e97 Aug 10, 2013

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
Pym commented on d774e97 Aug 17, 2013

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

@wadewilliams

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

@jrodl3r

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

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
parkr commented on d774e97 Dec 4, 2013

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

@turnage
turnage commented on d774e97 Dec 4, 2013

@parkr Are you making a jest or did you only skim my post? I apologize if I was not clear; I hoped the bit about the optimization flag causing power supply problems would convey my meaning.

@redhotvengeance

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

@Whitespace

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

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
rgbkrk commented on d774e97 Feb 6, 2014

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

@hobarrera

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
Owner
holman commented on d774e97 Nov 29, 2014

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.

@hobarrera

@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
Owner
holman commented on d774e97 Nov 29, 2014

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

@hobarrera

Thanks! โ˜บ

@diessica

ahahahahahaahah, I loved it!

Please sign in to comment.