Archive for the ‘Guides and tutorials’ Category

How to convert PuttyGen SSH-2 key-pairs to standard OpenSSH format

Friday, December 28th, 2012

Today I generated SSH-2 RSA key pairs using PuttyGen under Windows. It is a handy utility for creating RSA/DSA public/private keys for authentication. These key files can’t be used in Linux directly. I will try to explain how to convert Putty’s private key (.ppk) to Linux OpenSSH format.

  1. Open PuttyGen
  2. Click Load
  3. Load your private key (.ppk)
  4. Go to Conversions->Export OpenSSH and export your private key
  5. Copy your private key to ~/.ssh/id_rsa
  6. Next step is to convert your public key from SSH2 format to OpenSSH using:
    ssh-keygen -i -f ~/rsa_ssh2.pub > ~/.ssh/id_rsa.pub

And of course you need to set the right permission to your private key file (chmod 600). Now you should be able to log into an SSH server using your private key. To install your public key simply copy from ~/.ssh/id_rsa.pub on your local machine to ~/.ssh/authorized_keys on the remote server.

Spinning textured box in WebGL

Wednesday, December 26th, 2012

WebGL brings 3D graphics to the Web by introducing an API that closely conforms to OpenGL ES 2.0 that can be used in HTML5 canvas elements. Here is my simple example.

Sample spinning textured box in WebGL - click to start

HTML5’s canvas and image animation

Monday, December 24th, 2012

With HTML5 canvas we can create nice image animation. Here is my example where I change opacity, scale and rotate images. I used Raphael JS library.

Sample image transformation - click to start

Here’s the HTML code:











http://www.black-sun.com.pl/portfolio/images/ja1.jpg

Sample JavaScript image transformation

How to make a pie chart with HTML5?s canvas

Wednesday, December 12th, 2012

With HTML5 canvas element we can implement pie chart. Here’s the HTML code:




 Your browser does not support the canvas element. 

 


 

Taking Screenshots in Mac OS X

Monday, March 12th, 2012

There are several keyboard combinations that can be used to take screenshots in Mac OS X:

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