terça-feira, 29 de julho de 2008

How to flash BIOS

wget http://www.fdos.org/bootdisks/autogen/FDOEM.144.gz
gunzip FDOEM.144.gz
mount -t vfat -o loop FDOEM.144 /mnt/temp
cp 1400_A09.EXE /mnt/temp (Dell Vostro 1400 BIOS A.09)
umount /mnt/temp
mkisofs -o bootable_freedos.iso -b FDOEM.144 FDOEM.144
cdrecord -v dev=0,0,0 speed=4 -eject bootable_freedos.iso

sexta-feira, 18 de julho de 2008

Java: Fix JDK6 on Xorg

Locking assertion failure. Example: Linux + JDK6 + Netbeans.

Try this as root:

export LIBXCB_ALLOW_SLOPPY_LOCK=true

Or this:

sed -i 's/XINERAMA/FAKEEXTN/g' /opt/java/jre/lib/i386/xawt/libmawt.so

Or:

export LIBXCB_ALLOW_SLOPPY_LOCK=1

Shell: external variable in awk

awk -v x=0 'NF != 6 { ++x } END { print x, NR }' out.lst

This time we're passing awk an external variable. When you do this you have to tell awk what you're doing be prefixing the variable with -v. So we've initialized x to be equal to zero before actually starting our awk program.

Shell: Killing child processes from a pid


for child in $(ps -o pid,ppid -ax | \
awk "{ if ( \$2 == $pid ) { print \$1 }}")
do
echo "Killing child process $child because ppid = $pid"
kill $child
done

Drunk Penguins

Drunk Penguins
Drunk Penguins