Useful Photoshop Shortcuts & Tips

Switch between foreground and background colors
Click “x” key

Increase/decrease size of paintbrush
Click “[” and “]” keys to adjust size
Clcik “{” and “}” to adjust hardness
On Windows, Control + Alt +  Right Mouse -drag left right to decrease/ increase brush size and up/down decrease/ increase brush hardness.

Make a copy of a layer
Hold down “alt” key and click and drag on object

Good tutorial on using the pen tool.
http://www.melissaevans.com/tutorials/how-to-use-photoshops-pen-tool

Print Poster Size Images Using a Home Printer

Recently I needed to print a poster size image using my home printer. I didn’t feel like slicing up the images into a bunch of tiles and figuring out which goes where. Here are a couple programs that will do this with ease:

Poster Printer by RonyaSoft
http://www.ronyasoft.com/products/proposter/index.html

Easy Poster Printer by GD Soft
http://www.gdsoftware.dk/More.aspx?id=3

Using VMs for Website Testing on Multiple Browsers / Versions

When developing a website, you unfortunately have to constantly test it in various browsers and OSs and their many versions because they all seem to behave somewhat differently. One way to easily do this is by installing a VM (virtual machine) on your computer and within one or more VMs, installing various browsers.  Oracle / Sun VirtualBox is a fast and easy VM tool that can do this.

https://www.virtualbox.org/

When deciding which browsers to test against, you can check your analytics to see the percentage of your site’s visitors by OS and platform and decide whether to support browsers that are used by at least X %.

Convert UTF-8 Characters to &-Encoded HTML Entities

Nowadays, most websites and web servers should serve UTF-8 characters. But, some still don’t. So, when you’re provide a web service that is to be consumed by a third party and your content appears crappy because you’re UTF-8 characters became garbled somewhere along the way, you can convert them to &-encoded HTML entities by using PHP’s mb_convert_encoded() function. For example, you can pass your entire HTML source code for a page through the function and then pass it again through PHP’s htmlspecialchars_decode() function to convert special HTML characters (<, >, etc) back to special characters so the page renders correctly in a browser.

// convert special characters to HTML entities
$htmlsourcecode = mb_convert_encoding($htmlsourcecode, "HTML-ENTITIES", "UTF-8");

// revert HTML characters back from HTML entities
$htmlsourcecode = htmlspecialchars_decode($htmlsourcecode);

Force WinSCP to Transfer Files With Certain (LF / CR) Line Endings

If you’re using WinSCP as a file synchronication /transfer tool, you’ll be disappointed to find out that it doesn’t handle line endings correctly. For example, you may download a file from a linux server with Unix line endings (LF) to your local Windows machine but the file on your system shows CRLF line endings. Even if you set the end of line character to LF in the WinSCP Environment settings, it still doesn’t handle line endings correctly.

To ensure correct line endings when you transfer files, you need to force the transfer mode to BINARY which works for text / code as well.

 

Using jQuery to Screen Scrape HTML From a Different Site – jQuery cURL

Javascript cross-domain policies prevent us from calling remote sites from our pages. Here’s a nice tutorial that shows you how to overcome that so that you can effectively cURL a remote web page to your calling javascript for local processing and/or screen scraping.

http://usejquery.com/posts/the-jquery-cross-domain-ajax-guide

http://james.padolsey.com/javascript/cross-domain-requests-with-jquery/

https://github.com/padolsey/jQuery-Plugins/tree/master/cross-domain-ajax