Adding all new files and subdirs to svn

Sometimes you find yourself catching up with some devs who did not care to add all the stuff they should to SVN or you want to make sure all files are in SVN. Well here’s a hand script : svn status | awk ‘{if ($1 == “?”) print $2 }’ | xargs svn add nJoy…

Running node.js in production.

Node.js is my new love !! In one of my latest projects I needed to set up a RESTFUL web service which in a nutshell would be a simple interface / API to a bunch of functions based tightly on the HTML standard commands GET, PUT, DELETE, etc.. I decided to go with a language…

Controlling windows system from a Linux box.

Set up winexe. wget "ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/GRNET:/synnefo/CentOS_CentOS-6/x86_64/winexe-1.00-9.1.x86_64.rpm" yum install winexe-1.00-9.1.x86_64.rpm   Test the connection <pre>telnet 10.0.0.123 139</pre> Now we can try the system out winexe -U "User 1" –password=secretpassword //10.0.0.123 'cmd /C "whoami"' If you get : ERROR: Failed to open connection – ERRDOS:ERRnomem then it’s probably a Windows 7 box run reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management"…

Execution sequence for interactive login shell scripts

./etc/profile if ~/.bash_profile exists then execute ~/.bash_profile else if ~/.bash_login exists then execute ~/.bash_login else if  ~/.profile exists then execute ~/.profile fi ~/.bashrc  is not used in interactive scripts.   nJoy 😉  

Installing latest ImageMagick on Ubuntu 12.04

So …   At time of writing Latest version can be found here : http://www.imagemagick.org/script/download.php wget “http://www.imagemagick.org/download/ImageMagick-6.8.6-9.tar.gz” sudo apt-get install build-essential checkinstall && sudo apt-get build-dep imagemagick tar xzvf ImageMagick-* cd ImageMagick-6.8.6-9 ./configure –prefix=/opt/imagemagick-6.8 && make

How to allow includes, Basic Auth from outside .htaccess

This .htaccess file does the following: Allow SSI lines 1/2/3 Reauire Authenitcation for all outside except those from a particular IP the rest .. Options +Includes       AddType text/html .shtml .html AddOutputFilter INCLUDES .shtml .html AuthType Basic AuthName “Password Required For INGG Monitor” AuthUserFile /var/www/passwords/password.file Require valid-user Order deny,allow Deny from all Allow…