log to syslog
how to log something to syslog
logger This is my message to syslog
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
logger This is my message to syslog
sudo passwd root
crontab -e
#alter the regex to suit your needs, each () will return a submatch my $regex = qr!(\d\d)[-](\d\d)[-](\d\d)[_](\d\d\d\d)!; while(<*.jpg>) { $oldname = $_; if ($oldname=~m/$regex/) { #$1,$2,etc are submatchs rename $oldname,$3.$2.$1.$4.".jpg"; } }
<IfModule mod_rewrite.c> RewriteRule ^(.*/)?\.svn/ - [F,L] ErrorDocument 403 "Access Forbidden" </IfModule>
# 1) make yrself a user and stop being root # 2) main web stack + ruby sudo aptitude install -y make screen sudo aptitude install -y apache2 php5 mysql-server sudo aptitude install -y subversion postfix sudo aptitude install -y ruby1.8 ruby1.8-dev rubygems irb sudo aptitude install -y imagemagick librmagick-ruby1.8 librmagick-ruby-doc libfreetype6-dev xml-core # 3) gemz # rubygems appears to be broken as hell. # gem update --system does squat # had to manually d/l rubygems 1.0.1, ruby setup.rb wget http://rubyforge.org/frs/download.php/29548/rubygems-1.0.1.tgz tar xzvf rubygems-1.0.1.tgz cd rubygems-1.0.1 sudo ruby setup.rb sudo gem install rails mongrel merb map_by_method
[myshare] path = /var/test veto files = /var/test/private
rar a -m5 -R output.rar /etc/
desktop ~ # screen -S clfs desktop ~ # chroot "${CLFS}" /tools/bin/env -i \ > HOME=/root TERM="${TERM}" PS1='\u:\w\$ ' \ > PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \ > /tools/bin/bash --login +h root:/#
sudo aptitude install smbfs sudo mkdir /media/sharename sudo vim /etc/nsswitch.conf
hosts: files dns
hosts: files wins dns
sudo aptitude install winbind
sudo mount -t cifs //MyBookWorld/PUBLIC /media/shares/MyBook/PUBLIC -o username= "vasil",password="MyPassword",iocharset=utf8,uid=vasil,guid=vasil,rw,noperm