↓ Archives ↓

Archive → August, 2010

Test multiple IE versions on OS X (or Ubuntu)

http://shapeshed.com/journal/testing_with_ie6_ie7_and_ie8_on_virtualbox/

Amazing! I don’t know how I haven’t found this before. I am about to try it out. Will post back here if it DOESN’T work. Otherwise assume that it does and enjoy!

(for Mac users) Open any man page in Preview

man -t "sudo" | open -f -a /Applications/Preview.app

That’s it.

Seach your PHP includes

If you ever find yourself working a large PHP project with many includes, you may come to point where you need to quickly locate where a particular function or global variable is defined. Ideally, this should be easy to find, but when multiple people are working a project, it can sometimes be very time consuming to hunt down where something occurs.

Here are a few lines that you should able to insert somewhere in your code to refresh the page and find whatever you’re looking for in $search.

$search = "function do_something";
$cmd = "grep ".escapeshellarg($search)." ".implode(" ",get_included_files());
echo "<pre>".`$cmd`;
exit();

The above example can worked into something more useful. Enjoy!