Cumartesi, Ocak 26, 2008

kzuBlog

Well I just set out the check turbogears, and ended up creating a blog engine.
So i decided to use it as my main blogging application. Although in the very very early stages I think its best to eat my own dog food, so here it is:

The New Fatal Exception

This is my last post on blogger.

Salı, Aralık 25, 2007

Installing BEA Weblogic Adapter under Eclipse 3.3

The WTP default installation didn't come with a bundled Weblogic adapter (at least not the version i'm using under gutsy, which is v2.0.1) so here's the way to do it:
Window -> Preferences -> Server -> installed Runtimes



(yes, i had already installed the BEA Weblogic adapter when i took the screenshot)

Next click add on the right hand side.



Here you want to click the download additional server adapters links, which brings up the following


Here at the top of the list, you'll se BEA Weblogic if it isn't already installed.
Agree with the EULA and you are set to go.
Of course you'll need a working installation of Weblogic :)

Workrave plot

Even though workrave is an anti RSI application, what i really use it for is to count the keystrokes i do. I have this weird obsession for counting keystrokes. Anyways the link on the right hand side publishes this information with the help of the 2 bash scripts in workrave svn's contrib/ directory.

Pazartesi, Aralık 24, 2007

Picard drag and drop error

Picard is a tagger that uses music brainz to fetch unknown mp3's id3 tags. This is very useful when you have mp3's in the form of track01.mp3 , which is a crime, and the ripper should be sent to jail for causing information chaos. Anyway picard comes to the rescue and identifies these files for you (most of the time anyways). After a default sudo apt-get install picard picard was installed but i couldn't drag files to the new files folder on the right side pane. The solution to this is to install libtunepimp5-mp3.

Cuma, Aralık 21, 2007

Converting FLAC/APE into MP3/OGG

I just don't get why people use lossless audio codecs. I would say there is no noticable difference between a 192kbps encoded MP3 and a lossless encoded audio file, except for the size difference in MB's (!).
So some advise on taming those hard disk hoggers:
first install a suitable codec for mp3's. gstream* codec should do the trick. Next install mac-port to decode the ape files. Finally install lame to convert the decoded wave files into mp3's.
Here's a great script to do the work for you:

#!/bin/bash

#cueape 0.1
#This script is intended to convert ape or flac + cue files to
#ogg vorbis or mp3 files, setting the tags to the correct value,
#obtained from the cue file.
#REQUIREMENTS:
# -Oggenc installed (it comes with vorbis-tools) if you want to encode into Ogg Vorbis.
# -lame installed if you want to encode into mp3
# -mac to decode ape files (Monkey's Audio)
# -flac to decode flac files.

#IF YOU FIND A BUG OR HAVE A SUGGESTION COMMENTO OR SIMPLY WANT TO CONTACT ME PLEASE MAIL ME TO
#rafadev_*@gmail.com REMOVING THE "_*"
#This is done to prevent spamming

#Copyright (C) 2006 Rafael Ponieman - Buenos Aires, Argentina

#This program is free software; you can redistribute it and/or
#modify it under the terms of the GNU General Public License
#as published by the Free Software Foundation; either version 2
#of the License, or (at your option) any later version.

#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.

#You should have received a copy of the GNU General Public License
#along with this program; if not, write to the Free Software
#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.


#scripted by deX


case "$1" in
*.[aA][pP][eE] | *[fF][lL][aA][cC] )
if [ ! -f "$1" ] ; then
echo "Input file $1 doesn't exist"
exit 1
fi
if [ ! -f "$2" ]; then
echo "Cue input file $2 doesn't exist"
exit 1
fi ;;
* )
echo "Error: invalid input parameters"
exit ;;
esac

#Testing parameters
if [ "$3" != "-m" ] && [ "$3" != "-o" ] ; then
echo -en "\033[1;31mInvalid parameters\n"
echo -en "\033[1;37m"
echo -en "Usage: cueape [input ape file] [input cue file] [parameters]\nParameters can be: -m for mp3 encoding or -o for ogg encoding.\n"
exit 1
fi

#Need help with this one, coudn't solve it. I need to know how to check if a
#program actually exists and is accesible
#Checking for mac
#[ -f $(which 'maca' >> /dev/null) ] || {
# echo -en "\033[1;31mYou must have mac in your PATH.\033[1;37m\nPlease install Monkey's Audio Codec\nYou can get it from http://sourceforge.net/projects/mac-port/\n"
#}


#Saving the position so as to return afterwards
olddir="$(pwd)"

#Going to target directory
cd "$(dirname "$1")"

#Checking for the output folder. If it's not there I create it
[ ! -d "Output" ] && mkdir -p "Output"
cp "$2" "Output/"

#Decompress
echo -en "\nCueape 0.1\n\n"
echo -en "\033[1;32mStarting conversion\n"

#Checking filetype by extension and decompressing
tmp="$(basename "$1")"
tmp="${tmp##*.}"

case "$tmp" in
[fF][lL][aA][cC] )
echo -en "\033[1;32mDecompressing FLAC file\n\n"
echo -en "\033[1;37m"
tm="$(basename "$1")"
tm="${tm%.[fF][lL][aA][cC]}"
out="$(flac "-d" "$1" -o "Output/${tm}.wav" )"
;;
[aA][pP][eE] )
echo -en "\033[1;32mDecompressing APE file\n\n"
echo -en "\033[1;37m"
tm="$(basename "$1")"
tm="${tm%.[aA][pP][eE]}"
out="$(mac "$1" "Output/${tm}.wav" "-d")"
;;
* )
echo "Error: line 99"
esac

cd "Output"
echo -en "\033[1;32m\nDecompression finished\n"
echo -en "\033[1;32mStarting reencoding\n\n"
echo -en "\033[1;37m"
if [ "$3" = "-o" ] ; then
#Calling oggenc. Saving output for future checking
out="$(oggenc -q 6 -o "$tm.ogg" "$tm.wav")"
echo -en "\033[1;32m\nReencoding finished\n"
echo -en "\033[1;32mSplitting\n\n"
echo -en "\033[1;37m"
out="$(mp3splt -c "$(basename "$2")" -o "@n+-+@t" "$tm.ogg")"
else
#Calling lame. Saving output for future checking
out="$(lame --preset standard "$tm.wav" "$tm.mp3")"
echo -en "\033[1;32m\nReencoding finished\n"
echo -en "\033[1;32mSplitting\n\n"
echo -en "\033[1;37m"
#Using framemode becaus this settings are for VBR
out="$(mp3splt -f -c "$(basename "$2")" -o "@n+-+@t" "$tm.mp3")"
fi
cd "$oldir"
echo -en "\033[1;32m\nProcessing finished successfully\n"
echo -en "\033[1;37m"
exit 0

Çarşamba, Aralık 19, 2007

h4><0Red

Salı, Aralık 11, 2007

gnome quick location (Keyboard Ninja)

Real quick tip here, that may have slipped even the most experienced gnome users:
when the desktop has focus (crlt+alt+d) hit the "/" key to pop up a location dialog.
This has the same effect as crtl+l which has the home directory already filled in for you.
Always quicker than accessing your places menu.


Pazartesi, Kasım 19, 2007

MY super heros

A good laugh to start a shitty Monday morning