Friday, October 28, 2011

ruby installation with rvm on Ubuntu 10.04.3 LTS

:~# PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/rvm/bin"
:~# apt-get install git-core curl build-essential openssl libssl-dev libyaml-dev libreadline6 libreadline6-dev zlib1g zlib1g-dev
:~# bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )

#something was broken here during package management above, not sure...
echo "export PATH=\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/rvm/bin\"" > >> ./.bashrc

:~# rvm pkg install zlib
:~# rvm install 1.9.2
:~# rvm use 1.9.2
:~# rvm default 1.9.2
:~# rvm all do gem install eventmachine
:~# echo "[[ -s \"/usr/local/rvm/scripts/rvm\" ]] && . \"/usr/local/rvm/scripts/rvm\"" >> ./.profile

root@sssid1:~# ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux]
root@sssid1:~#

Tuesday, October 11, 2011

how to securely wipe a drive in linux

option 1
# shred -n 7 -z /dev/sdb

option 2
# dd if=/dev/urandom of=/dev/sdb bs=4096 count=7
# dd if=/dev/zero of=/dev/sdb bs=4096 count=7