News for hackers. Stuff that matters.

koozz

> My Gmail inbox has 3,200 unread emails. I miss appointments because calendar invites get buried.

Rules and discipline is what you need :)

I thought I’ve seen it before. I use Difftastic myself, amazing diffs. https://github.com/Wilfred/difftastic
Very nice! I immediately created a fish shell function for this. Feel free to copy/modify/ignore.

Running `log` quickly allows you to add a line to your journal. This will fallback to ~/.journal.log unless you have a .journal.log file in the current directory or any of its parents. Running `log show` outputs the tail -5 of that journal. Running `log init` creates a log in the current folder.

Adding .journal.log to your global gitignore is recommended.

$ cat ~/.config/fish/functions/log.fish

function log set -f journal ~/.journal.log

        if test "$argv[1]" = "init"
                set -f journal .journal.log
        else
                set -f journal ~/.journal.log
        end
        touch $journal

        set -l dirparts (string split "/" (pwd))
        set -l dircount (count $dirparts)
        for x in (seq $dircount -1 2)
                set -l dir (string join "/" $dirparts[1..$x])
                if test -f $dir/.journal.log
                        set -f journal $dir/.journal.log
                        break
                end
        end

        if test "$argv[1]" = "show"
                printf "Last journal entries from: %s\n" "$journal"
                tail -5 $journal
        else
                printf "Add to journal: %s\n" "$journal"
                read -P "Addition: " -l line
                if test -z $line
                        printf "Nothing added.\n"
                        return
                end
                printf "%s\n" "$line" >> $journal
        end
end
Re:Ask HN: What's your quarantine side project? on Thursday May 14, 2020 @02:27AM (#23176090)
Work continues, seeing the kids a lot more. Reading all sorts of programming books and having a go on Rust with something simple but helping in my daily workflow. https://crates.io/crates/mgit
Re:Java 14 GA on Tuesday March 17, 2020 @03:44PM (#22609421)
New features already discussed in https://news.ycombinator.com/item?id=22477629, but now it's GA.
"Reversing, Secrets of Reverse Engineering" by Eldad Eilam is a nice read. Interesting stuff!
Re:Ask HN: Reading Recommendation for Hackers? on Sunday August 18, 2019 @12:24PM (#20731141)
Reversing, Secrets of Reverse Engineering - by Eldad Eilam is a nice read. If you know how to reverse engineer something, you can really learn from anything.