Syn rants here. ARGGGHHH!

29May/090

Google Wave

I hate AJAX with a passion, mainly due to its overabundant use for benign tasks. That aside, this is amazing!
If you can see this, then you might need a Flash Player upgrade or you need to install Flash Player if it's missing. Get Flash Player from Adobe.

Filed under: People No Comments
14May/090

Cleanup Ubuntu.

A simple cleanup script by David Francos.

#!/bin/bash
Y="\033[1;33m"; R="\033[0;31m"; E="\033[0m"
function cleanapt(){ apt-get clean; }
function emptytrash(){ rm -rf /home/*/.local/share/Trash/*/** &> /dev/null && rm -rf /root/.local/share/Trash/*/** &> /dev/null && rm -rf /home/*/.Trash* && rm -rf /root/.Trash*; }
function removeconffiles(){ dpkg -P `dpkg -l|grep "^rc"|awk '{print $2}'`; }
function removeoldkernels(){ apt-get remove --purge $(dpkg -l|awk '{print $2}'|grep -E $LINUXPKG |grep -vE $METALINUXPKG|grep -v `uname -r|cut -d. -f1,2`-`uname -r |cut -d\- -f3,4`|grep -v `uname -r|cut -d\- -f1,2`); }
if [ $UID != '0' ]; then
    echo -e $R"Error: must be root, cleaning user's trash"$E
    rm -rf $HOME/.Trash* $HOME/.local/share/Trash/*/**
    exit 1
else
    echo -ne $Y"Cleaning apt cache         ..."$E && cleanapt 2>/dev/null ; echo -ne $R" Done\n"$E
    echo -ne $Y"Removing old config files  ..."$E && removeconffiles 2>/dev/null ; echo -ne $R" Done\n"$E
    echo -ne $Y"Emptying trashes           ..."$E && emptytrash 2>/dev/null ; echo -ne $R" Done\n"$E
    echo -ne $Y"Removing old kernels       ..."$E && cleanapt 2>/dev/null ; echo -ne $R" Done\n"$E
fi
Filed under: scripts No Comments