Archive → August, 2010
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!
man -t "sudo" | open -f -a /Applications/Preview.app
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 = "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!