Skip to content
Permalink
Browse files

Add `todo`

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

This comment has been minimized.

Copy link

@felipecsl felipecsl replied Aug 5, 2013

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

@djbender

This comment has been minimized.

Copy link

@djbender djbender replied Aug 5, 2013

:shipit:

@mihasya

This comment has been minimized.

Copy link

@mihasya mihasya replied Aug 5, 2013

🤘

@holman

This comment has been minimized.

Copy link
Owner Author

@holman holman replied Aug 5, 2013

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

finally

@brow

This comment has been minimized.

Copy link

@brow brow replied Aug 5, 2013

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

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

This comment has been minimized.

Copy link

@brow brow replied Aug 5, 2013

Ugh, people already made this joke on Twitter.

@antn

This comment has been minimized.

Copy link

@antn antn replied 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

This comment has been minimized.

Copy link

@mgonto mgonto replied Aug 6, 2013

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

@kbrock

This comment has been minimized.

Copy link

@kbrock kbrock replied Aug 6, 2013

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

@Ephemera

This comment has been minimized.

Copy link

@Ephemera Ephemera replied Aug 6, 2013

👍

@jakeasmith

This comment has been minimized.

Copy link

@jakeasmith jakeasmith replied Aug 6, 2013

Epic.

@rgbkrk

This comment has been minimized.

Copy link

@rgbkrk rgbkrk replied Aug 6, 2013

👍 10/10 would copy to ~/bin again

How much will the enterprise license cost?

@holman

This comment has been minimized.

Copy link
Owner Author

@holman holman replied Aug 6, 2013

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

@lexrus

This comment has been minimized.

Copy link

@lexrus lexrus replied Aug 6, 2013

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

@aleiphoenix

This comment has been minimized.

Copy link

@aleiphoenix aleiphoenix replied Aug 7, 2013

👍

@jonashaag

This comment has been minimized.

Copy link

@jonashaag jonashaag replied Aug 7, 2013

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

@mgoerlich-dev

This comment has been minimized.

Copy link

@mgoerlich-dev mgoerlich-dev replied 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

This comment has been minimized.

Copy link

@lyrixx lyrixx replied 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

This comment has been minimized.

Copy link

@Pym Pym replied 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

This comment has been minimized.

Copy link

@wadewilliams wadewilliams replied Sep 3, 2013

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

@jrodl3r

This comment has been minimized.

Copy link

@jrodl3r jrodl3r replied Oct 13, 2013

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

This comment has been minimized.

Copy link

@turnage turnage replied Nov 21, 2013

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

This comment has been minimized.

Copy link

@parkr parkr replied 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.

@redhotvengeance

This comment has been minimized.

Copy link

@redhotvengeance redhotvengeance replied Dec 4, 2013

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

@Whitespace

This comment has been minimized.

Copy link

@Whitespace Whitespace replied Feb 6, 2014

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

This comment has been minimized.

Copy link

@cpryland cpryland replied Feb 6, 2014

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

This comment has been minimized.

Copy link

@rgbkrk rgbkrk replied Feb 6, 2014

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

@WhyNotHugo

This comment has been minimized.

Copy link

@WhyNotHugo WhyNotHugo replied Nov 29, 2014

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

This comment has been minimized.

Copy link
Owner Author

@holman holman replied 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.

@WhyNotHugo

This comment has been minimized.

Copy link

@WhyNotHugo WhyNotHugo replied Nov 29, 2014

@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

This comment has been minimized.

Copy link
Owner Author

@holman holman replied Nov 29, 2014

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

@WhyNotHugo

This comment has been minimized.

Copy link

@WhyNotHugo WhyNotHugo replied Nov 29, 2014

Thanks!

@diessica

This comment has been minimized.

Copy link

@diessica diessica replied May 29, 2015

ahahahahahaahah, I loved it!

Please sign in to comment.
You can’t perform that action at this time.