Archive for September, 2006
recommended firefox extensions
Here is a list of recommended firefox extensions:
- Tab Mix Plus - enhances browsing capabilities, includes session manager;
- NoScript - alows JavaScript for trusted domains with white list management;
Spam free solution for e-mail registration
This service www.mailinator.com allows you to have an instant mailbox for getting junk e-mail without entering your personal data.
No commentsbasic shell scripts
- sort with count by column x
cut -d " " -f 2 raw.file | sort | uniq -c | sort -nr > ordered_by_freq_file
-
...
Links:http://www.watsys.unh.edu/Darlene/TechToolsFiles/LammersUNIXDemo/UNIX_Intro.html
No commentsinstall vmware tools on Ubuntu
- Install needed packages
- Create vmware tools package
- Uncompress & Untar VMwareTools-x.x.x-xxxxx.tar.gz
- Run vmware-install.pl
# sudo apt-get install gcc # sudo apt-get install linux-headers-$(uname -r)
Use VMware window option VM -> Install VMware Tools to generate a virtual DVD-ROM with the package.
click the packge DVD-ROM and “extract to” Desktop the tar.gz file
# sudo Desktop/vmware-tools-distrib/vmware-install.pl
mysql easy backup and restore
In essence in order to fully backup and restore a MySql database server, you just need to use two commands mysqldump and mysql. For a “small databases” scenario you can find at the end a simple script to send the backup by e-mail. In conjunction with crontab you can almost name it a backup policy.
- MySQL backup>
# mysqldump -u <user> -p <passwd> --all-databases > <backup file>
# mysql -u <user> -p <passwd> < <backup file> # mysql --execute "update mysql.user set host='old' where host='host';"
Backup script example
#!/bin/bash
# This script runs nightly to back a MySQL database to a e-mail account
DATE1=`date +%D`
DATE2=`date +%Y%m%d%H%M`
# The email address that receives backups
ADDRESS=”alias@domain”
# Local temp directory
BACKUPDIR=”/tmp”
# MySQL username and password
MYSQLUSER=”user”
MYSQLPASS=”pass”
# MySQL database to backup (or –all-databases to backup everything)
DATABASE=”–all-databases”
# Name of backup file
FILENAME=”mysql_backup”
# Change to the backup directory
cd $BACKUPDIR
# Dump the MySQL databases to a plaintext file
mysqldump -u $MYSQLUSER -p $MYSQLPASS $DATABASE > $FILENAME_$DATE2
# Package (tar) and compress (gzip) the plaintext MySQL dump
tar czf $FILENAME_$DATE2.tar.gz $FILENAME_$DATE2
# Mail the resulting archive to our Gmail account
date | mutt -s “$FILENAME ($DATE1)” -a $FILENAME_$DATE2.tar.gz $ADDRESS
thanks to Bruno Rodrigues
2 comments