Rip an Icecast stream
streamripper http://192.168.1.7:8000/radio_x.ogg.m3u -dq ~james/Streamripper_rips/hay -a %d -l 1800 >/dev/null 2>&1
11308 users tagging and storing useful source code snippets
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
streamripper http://192.168.1.7:8000/radio_x.ogg.m3u -dq ~james/Streamripper_rips/hay -a %d -l 1800 >/dev/null 2>&1
truncate ~/www/*/log/*.log
4 22 * * * * truncate -s 0k ~/www/*/log/*.log
#!/bin/bash # modify the following to suit your environment export DB_BACKUP="/backup/mysql_backup" export DB_USER="root" export DB_PASSWD="********" # title and version echo "" echo "mySQL_backup" echo "----------------------" echo "* Rotating backups..." rm -rf $DB_BACKUP/04 mv $DB_BACKUP/03 $DB_BACKUP/04 mv $DB_BACKUP/02 $DB_BACKUP/03 mv $DB_BACKUP/01 $DB_BACKUP/02 mkdir $DB_BACKUP/01 echo "* Creating new backup..." mysqldump --user=$DB_USER --password=$DB_PASSWD --all-databases | bzip2 > $DB_BACKUP/01/mysql-`date +%Y-%m-%d`.bz2 echo "----------------------" echo "Done" exit 0
#!/bin/sh # # MySQL backups from the Data MOUNTED=`grep /etc/mtab -e \/mnt\/backup` if [ "$MOUNTED" = '' ]; then echo "/mnt/backup is not mounted, there is no drive to backup to" exit 1 fi mkdir -p /mnt/backup/cluster_sql for i in $(echo 'SHOW DATABASES;' | mysql -ubackup -pSUPERSECRET -hData|grep -v '^Database$'); do mysqldump -ubackup -pSUPERSECRET -hData --opt $i > /mnt/backup/cluster_sql/$i.sql; done;
1 */4 * * * find /tmp/ -name "ruby_sess*" -cmin +600 -exec rm \{} \;