Jon Aquino's Mental Garden

Engineering beautiful software jon aquino labs | personal blog

Wednesday, June 12, 2013

What I like about zsh

I've been using zsh as my shell for a few weeks now, and I quite like it. Here's why:

  • I can customize the prompt to show the current directory, the current Git branch (and whether it is dirty), and the current time.
  • The history-substring-search plugin lets me type in any substring and press the Up arrow, and it will show me history entries matching that substring (with the match highlighted in purple).
  • History is shared across shell instances. And I can save a year's worth of history to a file.
  • I can replace a substring in the previous command by doing ^foo^bar^:G
  • When I mistype a command or script name, it offers suggestions.
  • When I do !456, it confirms which command that would run.
  • I can do "less **/XG_Media*" to open a file buried in some subdirectory, e.g., src/main/webapp/lib/XG_MediaUploaderHelper.php

I also like running zsh in iTerm2. iTerm2 is cool because:

  • It lets me map Alt+Arrow and Command+Arrow to behave like I want them to.
  • It offers auto-completion using all strings in the window, when I do Command+;
  • It lets me use the Solarized theme.
  • It has a couple of cool features that I don't use much yet:
    • Find text
    • Instant replay

Hotmail lets you use custom domain for free

It takes some setting up, but you can map any custom domain to your Hotmail account. I don't think any other free email service offers custom domains.

https://domains.live.com

Thursday, June 06, 2013

On Heaven

I used to think that heaven is a place with wide expanses of green grass, blue skies, and billowy clouds. Yeah, God is there, but the main thing was to get to this wonderful Place.

But now I understand it to be different. Heaven is more like entering God. At least that's how I understand this quote from the Catechism of the Catholic Church:

The ultimate end of the whole divine economy is the entry of God's creatures into the perfect unity of the Blessed Trinity. But even now we are called to be a dwelling for the Most Holy Trinity.

Which I think is pretty cool.

Wednesday, June 05, 2013

Elo Preference Ranker

This little tool helps you to rank a list of your preferences by comparing them a pair at a time. Simply paste in a list of items to rank, one per line (e.g., your favorite skills). Then press "Start ranking!". You will then be presented with a pair of items at a time, and you are asked to choose which is better or more important. As you go, the sorted list will appear at the bottom.

It uses the Elo ranking algorithm, which is used to rank chess players based on whether they win/lose/draw against each other. The more pairs you compare, the better. Once you have compared all combinations, the process ends.

What is this good for? Suppose you are buying a home or a car and you have several dozen preferences, and you want to know, which of these are most important to me, and in what order? Or suppose you are working through What Color Is Your Parachute? and you want to sort your list of skills and interests to find your favorite ones. Simply throw your list into the tool and start ranking them.

Input Strings

Enter the strings to rank, one per line. Then press "Start ranking!". You will be presented with pairs of strings - click the button corresponding to which item is more important or better.

Sorting

Click the button corresponding to which item is more important or better. You can also press "J" for the left item and "L" for the right.

Something. Something else.

You have finished comparing all items!

Sorted Output Strings

The sorted strings are: