2014/04/07

Saving screenshot to clipboard or desktop on Mac OS X

Here is few very handy shortcuts for taking screenshots in Mac OS X. Especially saving your region directly to clipboard can be a great time saver when working on a presentation or anything alike.

Cmd - Shift - 3
Capture screen and save it on desktop.

Cmd - Shift - Control - 3
Capture screen and save it on clipboard.

Cmd - Shift - 4
Capture region and save it on desktop.

Cmd - Control - Shift - 4
Capture region and save it on clipboard.

Saving screenshot (3) or region (4) to clipboard.

Taking screenshot on Samusung Galaxy S4

It wasn't too obivius so i had to search for it.

Classical way for taking screenshot in Samsung Galaxy S4 is to press:

power/lock screen button + home button at the same time for 1 second.

After this screenshot will be taken and saved into your gallery. You could also use Samusing motion sensor and swipe your hand across the screen. This has to be somehow enabled from the menus, but since i find this feature useless anyway, i didn't even bother to try it out.

2014/03/06

Enable password authentication for Google Compute Engine instance.

By default Compute Engine instance uses key pairs to authenticate you into your instance. This is very much recommended for security reasons. When you are first time connecting your instance through gcutil ssh, you will be asked to create a pass phrase for your ssh keys. Gcutil will create key pair in your local machine and copy it over to your project.

However if you want to authenticate ssh from outside world using password, here is a simple step what to do:

Edit file /etc/ssh/sshd_config

Find this line from your sshd_config and change it to PasswordAuthentication yes:
 # Change to no to disable tunnelled clear text passwords  
 PasswordAuthentication no  
Then just reload your OpenBSD Secure Shell server (Debian).
  sudo /etc/init.d/ssh reload  
In a CentOS init.d name is bit different, since it uses OpenSSH server.
 sudo /etc/init.d/sshd reload  
Of course also remember to add firewall rule for TCP port 22. This can be done through Developers Console.