Tuesday, January 28, 2014

How to Batch Resize in Photoshop

batch-size-ps_before-after.jpg
While it’s relatively easy to write an Action to resize a series of images in Photoshop, it’s easier still to get Photoshop to do all the work for you. Photoshop comes with an image processor script that will open, resize and save a series of images for you – very quickly.

Step 1

Choose File > Scripts > Image Processor. The image processor dialog shows a simple four-step process for resizing the images.

batch-resize-photoshop_step1.jpg

Step 2

In Step 1 of the dialog, select to either resize the images already open in Photoshop (if you have them open), or click Select Folder and select a folder of images to resize. Select Include all Subfolders to include all subfolders of the selected folder.
batch-resize-photoshop_step2.jpg

Step 3

In Step 2 of the dialog select where to save the images. If you select Save in Same Location Photoshop creates a subfolder in which to save the images so you don’t have to worry about overwriting them. If a subfolder by the same name already exists with images with the same names in it, Photoshop saves to that folder but adds a sequential number to the file so you still won’t lose your files. Alternatively, you can select a different folder for the resized images.
batch-resize-ps_step3.jpg

Step 4

In Step 3 of the dialog select the file type to save in. For the web Save as JPEG is the obvious choice. Set a Quality value in the range 0 to 12 where 12 is the highest quality and 0 the lowest. For better color on the web, select Convert profile to sRGB and ensure that Include ICC Profile at the foot of the dialog is checked so the profile will be saved with the image.
batch-resize-ps_step4.jpg
To resize the images, select the Resize to Fit checkbox and then set the desired maximum width and height for the final image. For example, if you type 300 for the width and 300 for the height, the image will be resized so that the longest side of any image, whether it be in portrait or landscape orientation will be 300 pixels. The images are scaled in proportion so they won’t be skewed out of shape.
The Width and Height measurements do not have to be the same so you could, for example, specify a Width of 400 and a Height of 300 and no image will have a width greater than 400 or a height greater than 300.

Step 5

If desired you can save in another format as well by selecting its checkbox so you can save the same image in different formats and at different sizes in the one process. You can also select to run an Action on the images, if desired.
When you’re ready, click Run and the images will be automatically opened (if they are not already open), resized, saved and closed.
To see your resized images, choose File > Open and navigate to the folder that you specified the images to be saved to. If you chose to save as JPEG, the images will be in a subfolder called JPEG, for PSD in a folder called PSD and so on.
So whenever you need to resize a lot of images for uploading to the web, for example, the Photoshop Image Processor script makes the job almost painless.
batch-resize-ps_step5.jpg
Reference: http://digital-photography-school.com/how-to-batch-resize-in-photoshop

Wednesday, January 15, 2014

Lock down your phpMyAdmin access!

There are a couple of ways that I lock it down.. I won’t get into specifics because I don’t want you (or you!) trying to find it, but I can’t count the number of times I’ve seen an old phpMyAdmin install just sitting on someone’s server waiting for someone to type in the correct login and password and screw up your day. The following are a couple good-practice ways to lock it down so that you don’t have to lose sleep over wondering if someone’s going to get in easily.
Rename your phpmyadmin alias:
Edit: /etc/httpd/conf.d/phpmyadmin.conf
Look for:
(or something like that… )
and change it to something like:
Restrict access to your known ip address:
Edit /etc/httpd/conf/phpmyadmin.conf
At the top of the file you’ll see something like:
Modify it to only allow the ip addresses that you’ll connect from:
Restart apache and test it out!
Reference: http://www.linuxbrigade.com/lock-down-your-phpmyadmin-access/

Friday, January 10, 2014

How to convert .pem file to .ppk file?

Question:- What is .pem file?

Answer: .pem Defined in RFC’s 1421 through 1424, this is a container format that may include just the public certificate (such as with Apache installs, and CA certificate files /etc/ssl/certs), or may include an entire certificate chain including public key, private key, and root certificates. The name is from Privacy Enhanced Email, a failed method for secure email but the container format it used lives on.
Question:- What is .ppk file?
Answer: The PPK file type is primarily associated with ‘PuTTY’. PuTTY is a terminal emulator application which can act as a client for the SSH, Telnet, rlogin, and raw TCP computing protocols. The name PuTTY has no definitive meaning, though tty is the name for a terminal in the Unix tradition, usually held to be short for teletype.
Benefit of converting .pem to .ppk file
PuTTY does not natively support the private key format generated. So it is advisable to convert the .pem file to .ppk so that it can be easily recognized by the FTP Clients like Filezilla, winSCP etc.
How to Convert .pem file to .ppk file?
Step-1: Start PuTTYgen (e.g., from the Start menu, click All Programs > PuTTY > PuTTYgen). if you don’t have puttyGen in your system download it from here.
Beanstalk9 300x289 How to convert .pem file to .ppk file?
Step-2: Click Load and browse to the location of the private key file that you want to convert (e.g., GSG_Keypair.pem). By default, PuTTYgen displays only files with extension .ppk; you’ll need to change that to display files of all types in order to see your.pem key file. The private key file must end with a newline character or PuTTYgen cannot load it correctly.
puttygen How to convert .pem file to .ppk file?
Step-3:
When you click OK, PuTTYgen displays a dialog box with information about the key you loaded, such as the public key and the fingerprint. Click Save private key to save the key in PuTTY’s format. Select a passphrase and save your private key somewhere secure if you click on save without giving a passphrase it will ask you whether you want to save it without passphrase.
Beanstalk11 How to convert .pem file to .ppk file?
Step-4: Save the file with the suitable name. You will get the desired .ppk file
Beanstalk121 How to convert .pem file to .ppk file?
Note: A passphrase on a private key is an extra layer of protection, so even if your private key is discovered, it will not be usable without the passphrase. The downside to using a passphrase is that it makes automation harder because human intervention is needed to log on to an instance, or copy files to an instance. For this exercise, we’re not using a passphrase.
Reference: http://p3lang.com/blog/2013/05/06/how-to-convert-pem-file-to-ppk-file/