Thursday, November 25, 2010

updating phpbb from 3.0.7-pl1 to 3.0.8

navigate to forum dir

#bunzip2  phpBB-3.0.7-PL1_to_3.0.8.tar.bz2

#tar xvf phpBB-3.0.7-PL1_to_3.0.8.tar

go to forum/install & click update tab

'proceed to next step' -> 'update database' -> 'update my database now' -> 'continue the update process now'

'download modified archive'

tar xvf update_3.0.7-PL1_to_3.0.8.tar

rm -r install/

All files are up to date with the latest phpBB version. You should now login to your board and check if everything is working fine. Do not forget to delete, rename or move your install directory! Please send us updated information about your server and board configurations from the Send statistics module in your ACP.

phpmyadmin with arch + lighttpd

install phpmyadmin

#yaourt -S phpmyadmin php-mcrypt

edit lighttpd.conf

add alias.url = ( "/phpmyadmin/" => "/usr/share/webapps/phpMyAdmin/") to  /etc/lighttpd/lighttpd.conf

edit .htaccess

#deny from all to /etc/webapps/phpmyadmin/.htaccess

edit php.ini
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/etc/webapps


Monday, November 22, 2010

mp3 backup script with rsync



find $dir -type f | grep -v \.$ext\$

if [ $? -eq 0 ]
echo "Not continuing with backup"
echo "Found non mp3 files"

echo "Continuing with backup"
rsync -avur "$dir/" "$backupdir/"
echo "Backup complete"

Saturday, November 20, 2010

Kernel patch that does wonders bash.

Here is how I am doing my bash script.
 (As explained here:

in ~/.bashrc

if [ "$PS1" ] ; then                                                                                                                               
    mkdir -m 0700 /cgroup/$$
    echo $$ > /cgroup/$$/tasks
    echo 1 > /cgroup/$$/notify_on_release

in /etc/rc.local

mount -t cgroup cgroup /cgroup -o cpu
chmod 0777 /cgroup
echo "/sbin/rm_cgroup" > /cgroup/release_agent
in /sbin/rm_cgroup
rmdir /cgroup/$1
then chmod +x /sbin/rm_cgroup and sudo mkdir /cgroup


Friday, November 12, 2010

Temporary smplayer/mplayer "subcc" fix.

Came across this with latest mplayer and smplayer

The subcc option must be an integer: -subpos
Error parsing option on the command line: -subcc

Bug report.

Here's my simple work around for now:

changed the 'mplayer executable' setting to /usr/bin/mplayer.rmsubcc in smplayer and put this into mplayer.rmsubcc (and chmod +x /usr/bin/mplayer.rmsubcc).

command=$(echo $* | sed 's/-subcc//g')
/usr/bin/mplayer $command


command=$(echo $* | sed 's/-subcc//g' | sed 's/-aid\ 1/-aid\ 0/g')

will also fix the "MPlayer interrupted by signal 8 in module: demux_open" problem. 

Bug report.

Edit: Fixed in latest SVN

Monday, November 8, 2010

Opening a .psd with gimp

Gimp (2.6.11) wouldn't open a psd file. Had issues with CMYK.

Error loading PSD file: Unsupported color mode: CMYK

This works to convert it to a png:

convert banner.psd -channel rgba -alpha on -colorspace rgb rgb-image.png

convert is part of imagemagick.

Wednesday, November 3, 2010

Yaourt on archlinux changed AUR behavior.

yaourt -Syu --aur used to show aur packages, recently it stopped.

The fix is to replace the line

DETAILUPGRADE=0 classify_pkg $(pacman -Qqm | wc -l)< <(eval $cmd)
classify_pkg < <(eval $cmd)
in /usr/lib/yaourt/

This is now accomplished with
DETAILUPGRADE=2 in /etc/yaourtrc