May 4

So I had a goal in mind — See what music I could make in ~15 minutes. Here is a clip of what I came up with:

midnight_madness_clip

Mar 5

Auto-detects databases, has the temp file and backup file locations separated, purple colored real-time output, only logs important output, md5sums into a text file for databases, every filename uniquely hashed with month, day, year, hour, minute, and second, timestamps everything, uses bzip2 compression for smallest file sizes.

#!/bin/bash

# vars – no trailing slash please
THEDATE=$(date +%m%d%y%H%M%S)
BACKUPDIR=’/backups/mysql’
TEMPDIR=’/backups/mysql/temp’
LOGFILE=”$TEMPDIR/info-$THEDATE.txt”
USER=root
PASSWORD=password
date > $LOGFILE

date

echo -e “\e[1;35m[ " $(date +%H:%M:%S) "-- Starting MySQL Backup Script v0.3 by Seanp2k ]\e[00m"

# magic
DATABASES=$(mysql --user=$USER --password=$PASSWORD -e "SHOW DATABASES;" | tr -d "| " | grep -v Database)

echo -e "\e[1;35m[ " $(date +%H:%M:%S) "-- Found" $(echo $DATABASES | wc -w) "databases:" $DATABASES "]\e[00m"

# loop -- dump and hash
for DB in $DATABASES; do

echo -en "\e[1;35m[ " $(date +%H:%M:%S)
echo -n " -- Processing " $DB ".."
mysqldump --user=$USER --password=$PASSWORD --databases $DB > $TEMPDIR/$DB-$THEDATE.sql
echo -n "..md5sum..."
md5sum $TEMPDIR/$DB-$THEDATE.sql >> $LOGFILE
echo -e "Done ]\e[00m"
done

# compress and clean
echo -e "\e[1;35m[ " $(date +%H:%M:%S) "-- Creating Archive " $BACKUPDIR/mysql-THEDATE.tar.bz2 "]\e[00m"
time tar -cvvjf $BACKUPDIR/mysql-$THEDATE.tar.bz2 $TEMPDIR/*.sql $TEMPDIR/info-$THEDATE.txt
rm -rf $TEMPDIR/*.sql $TEMPDIR/info-$THEDATE.txt
date
echo -e "\e[1;35m[ " $(date +%H:%M:%S) "-- Finished ]\e[00m”

Feb 1

This webpage is not available.

The webpage at http://www.dreamhost.com/ might be temporarily down or it may have moved permanently to a new web address.

More information on this error
Below is the original error message

Error 320 (net::ERR_INVALID_RESPONSE): Unknown error.

Feb 1

And the banner at the top read:

“Aaaaaaaaaaaaaaaaaaaa.com

What you need, when you need it”

Somehow, I HIGHLY doubt that.

Jan 28

Sucks.

Check it

Jan 23

I had a problem: I wanted my radio station to automagically play my newer music and update the stuff that it plays every day, yet keep enough older stuff that there is still some variety, especially if no new music gets discovered for a while. I’d need to find some way to keep the most recent 200 or so tracks playing on my station.

Let’s start by looking at what we have and what we have to do:
Files on a Linux fileserver playing on a Windows server (via samba) in Winamp using EdCast to stream to sc_serv (Shoutcast) on a different Linux server in the DMZ. Currently, I have the X: drive on the Windows server mapped to the Linux Fileserver. Winamp re-scans the fileserver every 3 days for new music and adds it to the library, but I still have to manually go in and add new tracks to the playlist.

Some initial ideas and problems:
-Use XML-RPC / SOAP from another music cataloging program that I currently use
+I just really feel like there was an easier way to do what I wanted without going through all the trouble.

-Telling Winamp to [re]load the playlist: the Winamp API Uses C++…yuck…I don’t know or want to learn C++ just for this project. Plus, DRY applies, someone HAS to have thought of this before.
+Solution: httpQ, a simple http listener plugin for Winamp that uses a simple and easy to implement control scheme: simply call the right URL and Winamp does what you want. Awesome. ( http://httpq.sourceforge.net )

-Finding files that have been modified recently, and if none have been modified in the time specified, keep looking until you find enough files
Read the rest of this entry »