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

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 = rel_a_b.b_id and rel_a_b.a_id = for xml path(’’) ),1,1,’’) as vals_combined from a[/default]

Dovecot process gone bezerk

Today I’ve had some serious battles with Dovecot running on a wild cpu time spending spree. I recently made an apt-get upgrade on my Debian system. Somwhere in there things went awkward. An imap process simply wouldn’t stop on /etc/init.d/dovecot stop nor kill -9 [dovecot-pid] The process took 100% cpu and eventually the whole system, including kernel, froze. Had to cold reboot it via IPMI three times! Thank god for IPMI.