Using swftools to extract resources from flash swf files

There’s a nifty tool called Swftools out there which enables you to extract resource files out of an swf file (Adobe Flash). This little bash one-liner will extract all sounds from an swf file: for i in swfextract soundboard.swf |grep Sounds:|cut -c 24-|sed ’s/,//g’; do swfextract -s $i soundboard.swf

Your old backup is about to become unreadable

After spending a few hours in the past weekend, copying old photographs and various other files from CD’s and DVDs in the archive, I have sadly learned that discs do have a limited durability. Out of 24 CD-R’s my computer was unable to read 6 of them. For the record, the CD-R’s were burned in the years 2000 and 2001 and are of various brands. If you have precious data on CD’s or DVDs, my advice to you is to back it up on other media - now.

Group_concat in T-SQL

You may wish group_concat while working with MS SQL Server. Here’s a solution! Say you have these tables: a: id, content b: id, val rel_a_b: a_id, b_id The SQL query [default]select a.*, stuff( ( select cast(’;’ as varchar(max)) + b.val from b inner join rel_a_b on b.id = rel_a_b.b_id and rel_a_b.a_id = a.id for xml path(’’) ),1,1,’’) as vals_combined from a[/default]

dvbloopback in Linux 2.6.38

Compiling and using sasc-ng and dvbloopback with Linux 2.6.38 is a hassle. Here’s how to get it working. Prequisites: Ubuntu Lucid Kernel 2.6.38-11-generic We need to patch both the kernel dvb module as well as the dvbloopback source. Download linux-2.6.38-dvb-mutex.patch to your home folder. $ sudo apt-get install linux-headers-uname -r Now let’s get the kernel source, patch it, and recompile the dvb-core module. $ cd /usr/src $ sudo apt-get source kernel-image-uname -r $ cd linux-2.

Extending an LVM volume

The following commands adds a new partition to an existing lvm volume. Tested on Ubuntu 10.04. First, find out your volume name using: sudo vgdisplay

Afatech 9015 in Linux

I recently got a noname USB DVB-T receiver which I’ve been trying to get to work on my Debian GNU/Linux laptop. While inserting the device, here’s syslog output: