Friday, August 31, 2012

Installing the "curb" Ruby Gem in Windows



Download the Ruby DevKit and Extract into C:\Devkit:
https://github.com/downloads/oneclick/rubyinstaller/DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe

Type the following command from a command prompt:
cd \Devkit
devkitvars.bat

Download this file and extract it into C:\Windows\Sytem32:
http://curl.haxx.se/gknw.net/7.27.0/dist-w32/curl-7.27.0-rtmp-ssh2-ssl-sspi-zlib-idn-static-bin-w32.zip

Download this file and extract it into C:\
http://curl.haxx.se/gknw.net/7.27.0/dist-w32/curl-7.27.0-devel-mingw32.zip

Finally, from the same command prompt, run the following command:
gem install curb -- --with-curl-lib=C:\curl-7.27.0-devel-mingw32\bin --with-curl-include=C:\curl-7.27.0-devel-mingw32\include

Friday, August 10, 2012

Wild Kill...Yeee-Haaah!!!

#!/bin/bash
ps -ef | grep $1 | awk '{print $2}' | while read pid; do kill -15 $pid; done

Save the script as wildkill.sh, make it executable:

chmod 755 wildkill.sh

and run it like this:

./wildkill.sh firefox

This will kill any process that contains the name firefox...be sure you know what you're killing because this script can be wild!

Yeee-Haaah!