Gangmax Blog

自由之思想,独立之精神

Launch Sublime Text From Command Line on Mac

| Comments

From here.

What you need to do is to create a symbolic link:

1
2
3
4
# Run the following command to craete the symbolic link:
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/sublime
# Run it.
sublime ~/Documents/test.txt

The Double Colon Operator in Java 8

| Comments

From here and here.

In short, the double colon in Java 8 is method reference operator, which can be used to get the reference of an instance method or a static method, then the result of the operator, aka the method reference can be used in the funtional style programming supported in Java 8.

here gives a very clear explaination.