Brad Lucas

Programming, Clojure and other interests


July 12, 2017

Show the amount of disk space the larger directories under your home directory are taking.


pushd $HOME

du -sk * | sort -nr | head


Continue reading →

Travel Day

July 11, 2017

Travelling today. Looks like 13 hours door to door.

Continue reading →

Update Last Git Commit Comment

July 10, 2017

You just committed to your Git repo and realized you have a typo in your commit message. Here is how you can edit the last commit's comment.

$ git commit --amend

Continue reading →

Git Reset Hard

July 9, 2017

Here is how you can backup one commit in Git. The situation is where you've just committed to a branch and want to backup and throw this recent commit away.

Get the SHA of the previous commit then git reset hard to it.

For example,

$ git reset --hard 2acdd9bcdbd71a4ee919c90c0e964778346c54d1

Continue reading →


July 8, 2017

4Clojure is a site which offers 156 exercises to learn Clojure by solving some sort of programming challenge. The exercises are grouped from Elementary, Easy, Medium to Hard. For each you are presented with an explanation and a set of test cases which when run with your entered function must pass.

I decided to mention 4Clojure today because I've gotten back to it and am trying to finish the last few problems. I can say at this point the Hard problems are in fact Hard.

I highly recommend trying to get through as many of the 4Clojure exercises as you can if you are an aspiring Clojurist.

Continue reading →