mac tips

Voglio riportare qui quei banali tips che possono essere molto utile per chi non è proprio esperto del mondo Mac!

Take a Screenshot

  • ⌘-⇪-3: Take a screenshot of the screen, and save it as a file on the desktop
  • ⌘-⇪-4, then select an area: Take a screenshot of an area and save it as a file on the desktop
  • ⌘-⇪-4, then space, then click a window: Take a screenshot of a window and save it as a file on the desktop
  • ⌘-control-⇪-3: Take a screenshot of the screen, and save it to the clipboard
  • ⌘-control-⇪-4, then select an area: Take a screenshot of an area and save it to the clipboard
  • ⌘-control-⇪-4, then space, then click a window: Take a screenshot of a window and save it to the clipboard

In Leopard and later, the following keys can be held down while selecting an area (via ⌘-⇪-4 or ⌘-control-⇪-4):

  • Space, to lock the size of the selected region and instead move it when the mouse moves
  • , to resize only one edge of the selected region
  • , to resize the selected region with its center as the anchor point

Characters’ Map

 → System preferences → Language & Text → Tick on “Keyboard & Character Viewer”


R: “tar: Failed to set default locale”

Type the following command on a terminal window:

defaults write org.R-project.R force.LANG en_US.UTF-8

and restart R!

http://cran.r-project.org/


.screenrc

I want to share my .screenrc configuration file for screen. If you are used to use screen command when working on servers, maybe this can be of help!

# disable welcome message
startup_message off

# don't block command output if the terminal stops responding
nonblock on

# allow editors to restore display on exit
altscreen on

# statusbar
hardstatus alwayslastline
hardstatus string "%{= kW}%{G}[ %{r}%H %{G}] [ %{Y}%-w%=%{b}%n %t%=%{Y}%+w %{G}] [ %{y}Load: %l %{G}] [ %{w}%D %d %M %C %a %{G}]"

You can copy this into a file named .screenrc, and save it in your home folder, that’s it!


“Open With” duplicate voices

Type the following command on a terminal window:

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain userNow

keeping press the alt button click with the right button on the Finder icon and clicl on Relaunch (take a look at the image!)

Relaunch the Finder application
Relaunch the Finder application