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
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

This comment has been minimized.

Show comment
Hide comment
@felipecsl

felipecsl Aug 5, 2013

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

felipecsl replied Aug 5, 2013

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

@djbender

This comment has been minimized.

Show comment
Hide comment

djbender replied Aug 5, 2013

:shipit:

@mihasya

This comment has been minimized.

Show comment
Hide comment
@mihasya

mihasya replied Aug 5, 2013

🤘

@holman

This comment has been minimized.

Show comment
Hide comment
@holman

holman Aug 5, 2013

Owner

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

finally

Owner

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.

Show comment
Hide comment
@brow

brow Aug 5, 2013

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

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

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.

Show comment
Hide comment
@brow

brow Aug 5, 2013

Ugh, people already made this joke on Twitter.

brow replied Aug 5, 2013

Ugh, people already made this joke on Twitter.

@antn

This comment has been minimized.

Show comment
Hide comment
@antn

antn 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

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.

Show comment
Hide comment
@mgonto

mgonto Aug 6, 2013

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

mgonto replied Aug 6, 2013

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

@kbrock

This comment has been minimized.

Show comment
Hide comment
@kbrock

kbrock Aug 6, 2013

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

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.

Show comment
Hide comment
@Ephemera

Ephemera replied Aug 6, 2013

👍

@jakeasmith

This comment has been minimized.

Show comment
Hide comment
@jakeasmith

jakeasmith replied Aug 6, 2013

Epic.

@rgbkrk

This comment has been minimized.

Show comment
Hide comment
@rgbkrk

rgbkrk Aug 6, 2013

👍 10/10 would copy to ~/bin again

How much will the enterprise license cost?

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.

Show comment
Hide comment
@holman

holman Aug 6, 2013

Owner

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

Owner

holman replied Aug 6, 2013

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

@lexrus

This comment has been minimized.

Show comment
Hide comment
@lexrus

lexrus Aug 6, 2013

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

lexrus replied Aug 6, 2013

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

@aleiphoenix

This comment has been minimized.

Show comment
Hide comment
@aleiphoenix

aleiphoenix replied Aug 7, 2013

👍

@jonashaag

This comment has been minimized.

Show comment
Hide comment
@jonashaag

jonashaag 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 :-)

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 :-)

@strflw

This comment has been minimized.

Show comment
Hide comment
@strflw

strflw 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 :(

strflw 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.

Show comment
Hide comment
@lyrixx

lyrixx 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

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.

Show comment
Hide comment
@Pym

Pym Aug 17, 2013

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

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.

Show comment
Hide comment
@wadewilliams

wadewilliams Sep 3, 2013

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

wadewilliams replied Sep 3, 2013

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

@jrodl3r

This comment has been minimized.

Show comment
Hide comment
@jrodl3r

jrodl3r 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! 🍻

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.

Show comment
Hide comment
@turnage

turnage 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.

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.

Show comment
Hide comment
@parkr

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

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.

@turnage

This comment has been minimized.

Show comment
Hide comment
@turnage

turnage 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.

turnage replied 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

This comment has been minimized.

Show comment
Hide comment
@redhotvengeance

redhotvengeance Dec 4, 2013

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

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.

Show comment
Hide comment
@Whitespace

Whitespace 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

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.

Show comment
Hide comment
@cpryland

cpryland 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.

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.

Show comment
Hide comment
@rgbkrk

rgbkrk Feb 6, 2014

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

rgbkrk replied Feb 6, 2014

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

@WhyNotHugo

This comment has been minimized.

Show comment
Hide comment
@WhyNotHugo

WhyNotHugo 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 $@"?

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.

Show comment
Hide comment
@holman

holman Nov 29, 2014

Owner

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.

Owner

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.

Show comment
Hide comment
@WhyNotHugo

WhyNotHugo 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?

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.

Show comment
Hide comment
@holman

holman Nov 29, 2014

Owner

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

Owner

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.

Show comment
Hide comment
@WhyNotHugo

WhyNotHugo Nov 29, 2014

Thanks! ☺

WhyNotHugo replied Nov 29, 2014

Thanks! ☺

@diessica

This comment has been minimized.

Show comment
Hide comment
@diessica

diessica May 29, 2015

ahahahahahaahah, I loved it!

diessica replied May 29, 2015

ahahahahahaahah, I loved it!

Please sign in to comment.