Month: February 2009

  • Compact JS code using PHP

    This is a simple function to minimize JS code, it’s very simple and probably fail with more complex cases. But hey, might be useful for someone for something! We would suggest using JSMin::minify() instead. /** compact JS code */ function compactJS($pContent) { $pContent = str_replace(“\r\n”,”\n”,$pContent); $pContent = preg_replace(“/^\/\/.*/”,”,$pContent); // begining w/ // $pContent = preg_replace(“/[^:]\/\/.*/”,”,$pContent);…

  • FreeNX is cool

    If you ever need to access a CentOS (RHEL for that matter) server remotely, use FreeNX. It’s very easy to install, just follow the instructions on this page: http://wiki.centos.org/HowTos/FreeNX Just a note, you can leave the authentication via password (assuming you have a strong one) instead of a key-based pass-through authentication. The instructions are still…