piątek, 29 sierpnia 2014

Quick way of installing groovy without root priviliges

And quick one-liner
mvn dependency:copy -Dartifact="org.codehaus.groovy:groovy-all:2.3.6" -DoutputDirectory=. && \
_PWD=$PWD && \
groovy() { java -jar ${_PWD}/groovy-all-2.3.6.jar "$@"; }

piątek, 15 sierpnia 2014

How to put OSX symbols like command (⌘), shift (⇧) and others in html document

Once writing the last blog entry I have faced a need of putting OSX symbols in it. After looking around I found some:
  • ⇧ (⇧) shift
  • ⌃ (⌃) ctrl
  • ⌘ (⌘) command
  • ⌥ (⌥) option
  • ⇥ (⇥) tab
  • ⎋ (⎋) escape
  •  () apple - only on Macs

OSX 10.9.x Mavericks - how to make eclipse shortcut command + comma works properly (or more precisely - how to change shortcut for "Preferences..." menu option)

Actually there is nothing wrong with the default one ⌘, - unless you are Eclipse user extensivly using "Next/Previous Annotation" and comes from Windows/Linux world :>. In such a case you encounter weird shortcuts ⌘. for "next" and ⇧⌘. for "previous". This is at least unnatural (esspecially for my fingers :)).

Ok, usually when you'd like to change any keyboard shortcut you press ⌃F2, open System Preferences..., type "Keyboard shortcuts" - but looking back and forward through all the categories you are not able to found "Preferences..." one. The solution is to go to the last one category - "App Shortcuts". Once done under box on the right two little buttons should appear [+][-] - click on the [+]. In "Menu Title" text box type "Preferences...", and put new shortcut (eg. ⇧⌘,). Now old shortcut is freed.

Now as we have ⌘, freed, we can assign it to "Previous" command in Eclipse. To do this go the the Eclipse -> Preferences (you can use newly set shortcut ;)) -> General -> Keys -> type "Previous" and replace the shortcut.