Search and replace multiple files:
perl -pi -w -e 's/WU/WU2/g;' *.xml
20091226
20091224
Debian/Ubuntu Perl Building
apt-get install dh-make-perl
dh-make-perl --cpan Your::CPAN::Package --install
20091106
Installing Google Chrome for Debian/Ubuntu Linux
Follow this link:
64bit: http://www.google.com/chrome/intl/en/eula_dev.html?dl=unstable_amd64_deb
32bit: http://www.google.com/chrome/intl/en/eula_dev.html?dl=unstable_i386_deb
64bit: http://www.google.com/chrome/intl/en/eula_dev.html?dl=unstable_amd64_deb
32bit: http://www.google.com/chrome/intl/en/eula_dev.html?dl=unstable_i386_deb
20090828
Unix: Old dog, new tricks part 2
Say you want to add a '.old' to every file in your current directory. At the end of each expression ($) a '.old' will be set:
rename 's/$/.old' *
Or you want to make the filenames lowercase:
rename 'tr/A-Z/a-z/' *
Or you want to remove all double characters:
rename 'tr/a-zA-Z//s' *
Or you have many JPEG files that look like "img0000154.jpg" but you want the first five zeros removed as you don't need them:
rename 's/img00000/img/' *.jpg
rename will accept any regex and any perl operator
rename 's/$/.old' *
Or you want to make the filenames lowercase:
rename 'tr/A-Z/a-z/' *
Or you want to remove all double characters:
rename 'tr/a-zA-Z//s' *
Or you have many JPEG files that look like "img0000154.jpg" but you want the first five zeros removed as you don't need them:
rename 's/img00000/img/' *.jpg
rename will accept any regex and any perl operator
20090724
Installing Movable Type 4.261
Had to setup a new MovableType 4 (MT4) to test out the new Social Networking thingy called Motion. Got stuck with "mt-static" not found even though I've supplied the correct url, path and even reconfigured apache thinking it was the problem. Finally, a damn fine solution that's not even in MT's documentation site:
1. cp mt-config.cgi-original mt-config.cgi
2. Supply the correct path/url to CGIPath and StaticWebPath
3. Supply the information under DATABASE SETTINGS
4. If you haven't done it yet, create your database
Open http://domain/cgi-bin/mt/mt.cgi or http://domain/mt/mt.cgi depending on how you're setup.
It should ask you for your account details, password, and shit.
1. cp mt-config.cgi-original mt-config.cgi
2. Supply the correct path/url to CGIPath and StaticWebPath
3. Supply the information under DATABASE SETTINGS
4. If you haven't done it yet, create your database
Open http://domain/cgi-bin/mt/mt.cgi or http://domain/mt/mt.cgi depending on how you're setup.
It should ask you for your account details, password, and shit.
20090422
Yahoo! Mail not enough storage?
Here's something you don't see everyday:
Apr 22 14:43:11 list sm-que[9833]: n3M0BfGw009757: ...
relay=b.mx.mail.yahoo.com. [66.196.97.250], dsn=4.3.1,
stat=Deferred: 452 Requested action not taken: insufficient system storage
20090402
20090301
20090209
Passwordless SCP, SSH, RSYNC
host_src$ ssh-keygen -t rsa
host_src$ scp .ssh/id_rsa.pub user@host_dest
host_src$ ssh user@host_dest
host_dest$ mv id_rsa.pub .ssh/authorized_keys
host_dest$ chmod 700 .ssh/authorized_keys
Subscribe to:
Posts (Atom)