<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>Autarchy of the Private CaveSoftware &#187;</title> <atom:link href="http://bogdan.org.ua/categories/software/feed" rel="self" type="application/rss+xml" /><link>http://bogdan.org.ua</link> <description>Tiny bits of bioinformatics, [web-]programming etc</description> <lastBuildDate>Fri, 03 Feb 2012 22:51:18 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Megahack of Stratfor</title><link>http://bogdan.org.ua/2012/01/09/megahack-of-stratfor.html</link> <comments>http://bogdan.org.ua/2012/01/09/megahack-of-stratfor.html#comments</comments> <pubDate>Mon, 09 Jan 2012 02:25:41 +0000</pubDate> <dc:creator>Bogdan</dc:creator> <category><![CDATA[Links]]></category> <category><![CDATA[Misc]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[anonymous]]></category> <category><![CDATA[antisec]]></category> <category><![CDATA[drupal]]></category> <category><![CDATA[fourkitchens]]></category> <category><![CDATA[lulzsec]]></category> <category><![CDATA[stratfor]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1801</guid> <description><![CDATA[If you haven&#8217;t heard yet &#8211; stratfor.com was hacked in December 2011, leaking full information about 75k credit cards (including owner&#8217;s addresses and CVV codes) and 860k (right, almost a million) user accounts. All Stratfor email archives were also reportedly stolen (around 160-200 GB of data), but those were not made publicly available on the [...]]]></description> <content:encoded><![CDATA[<p>If you haven&#8217;t heard yet &#8211; stratfor.com was hacked in December 2011, leaking full information about 75k credit cards (including owner&#8217;s addresses and CVV codes) and 860k (right, almost a million) user accounts. All Stratfor email archives were also reportedly stolen (around 160-200 GB of data), but those were not made publicly available on the internet &#8211; unlike the credit cards and user accounts information, which is still relatively easy to find and download.</p><p>I do not really recollect anything that large. Well, not counting dropbox&#8217;s 4-hour window of &#8220;any password fits all accounts&#8221;, but that was different.</p><p>Here are some of the news items about this seriously large hacking incident:</p><ul><li><a
href="http://www.nytimes.com/2011/12/26/technology/hackers-breach-the-web-site-of-stratfor-global-intelligence.html?_r=1" rel="nofollow" >NYTimes (Dec. 25, 2011)</a></li><li><a
href="http://online.wsj.com/article/APf0a1519595c04b17ad9a84120d03cf1d.html" rel="nofollow" >WSJ (Dec. 25, 2011)</a></li><li><a
href="http://edition.cnn.com/2011/12/26/tech/web/anonymous-hack-stratfor/" rel="nofollow" >CNN (Dec. 25, 2011)</a></li><li>relatively above-average write-up from <a
href="http://www.wired.com/threatlevel/2011/12/antisec-hits-private-intel-firm-million-of-docs-allegedly-lifted/" rel="nofollow" >Wired (Dec. 26, 2011)</a></li><li><a
href="http://abcnews.go.com/US/hacking-group-anonymous-vows-hit/story?id=15234349" rel="nofollow" >ABCNews (Dec. 26, 2011)</a></li><li><a
href="http://www.theregister.co.uk/2012/01/03/stratfor_mega_hack/" rel="nofollow" >The Register (Jan. 3, 2012)</a></li></ul><p>Here come more technical reports:</p><ul><li>short <a
href="http://pastebin.com/f7jYf5Wd" rel="nofollow" >pastebin document</a>, supposedly by the hackers</li><li><a
href="http://cryptome.org/0005/stratfor-hack.htm" rel="nofollow" >cryptome</a> keeps track of the data being removed from the internet</li><li>a 1MB <a
href="http://bolt.thexfil.es/84e9h!t" rel="nofollow" >report by the hackers</a></li><li>TheTechGerald has <a
href="http://www.thetechherald.com/articles/Report-Analysis-of-the-Stratfor-Password-List" rel="nofollow" >some analysis of the leaked stratfor passwords</a> (Jan. 2, 2012)</li></ul><p>TheTechGerald&#8217;s analysis linked to above got my attention. Unfortunately, a while ago I&#8217;ve subscribed to stratfor&#8217;s &#8220;free intelligence mailing list&#8221;, and was wondering if my account information is now publicly available. I was the most worried about the password I&#8217;ve used to subscribe, because of the risk of using the same password somewhere else.</p><p>Unlike TheTechGerald, I haven&#8217;t used any dictionaries &#8211; just the default configuration of a well-known tool for finding weak passwords. Within a single hour, ~100k passwords were decrypted (~12% of all). Till the end of the day, ~50k more passwords were decrypted (totalling 17.4% of 860k). At this point my password was still safe, and I&#8217;ve found a way to verify that it is not used anywhere else, so I&#8217;ve aborted further decryption.</p><p>There are a few simple conclusions:</p><ul><li><strong>anybody who had a stratfor account must verify that he/she isn&#8217;t using that password anywhere else</strong>, because if 1 PC can get 17% of all the passwords in less than a day, it is only a matter of short time until all the leaked passwords will be decrypted and made publicly available in various &#8220;md5 decryption databases&#8221;</li><li>system owners should run periodic screenings for weak passwords (and implement policies to prevent creating obviously weak passwords from the very beginning)</li><li>md5 is very fast to decrypt/bruteforce &#8211; a much slower hashing function wouldn&#8217;t hurt; also, using a more complex hashing approach, maybe even with a closed-source shared library, could help</li><li>single-factor authentication (password-based) is likely to get replaced with 2-factor authentication in the nearest future</li><li>one may enjoy increased personal data safety by using throw-away passwords in conjunction with antispam mailboxes like spam.la and mailinator.com (at least 1600 users &#8211; 0.186% &#8211; did use these services).</li></ul><p><span
id="more-1801"></span><br
/> Fortunately, the top 10 passwords (by their counts) were exclusively &#8220;throw-away&#8221;, and added up to ~10% of the decrypted passwords. (I&#8217;m not showing any, as that would unnecessarily simplify further decryption &#8211; maybe thetechgerald should have also been more vague about actual passwords.)</p><p>Sooner or later this significant-size corpus of real-life passwords will find its way (after decryption by those who would actually use leaked passwords to gain unauthorized access) into various wordlists and wordlist mutation rules, making it even easier to decrypt any future leaks. This is where 2-factor authentication will, hopefully, come in handy to protect against similar leaks.</p><p>I wonder if I should put up a page &#8220;Check if my password was among those 860k&#8221;, to help people easily identify if they should change theirs &#8211; not even necessarily being a Stratfor subscriber. Unless similar pages/services had already been put up by others.</p><p>It is also unclear what will the future of Stratfor be, taking into account that their website is still dysfunctional.</p><p>It is sad to see Drupal (stratfor.com&#8217;s CMS) involved here. However, I have no idea if their installation was up to date, and if their website was the point of entry. The hacklog suggests that attackers somehow obtained the password of one of the system administrators, and then used it for SSH access, which would save Drupal&#8217;s face (Drupal&#8217;s security record to date was pretty reassuring).</p> ]]></content:encoded> <wfw:commentRss>http://bogdan.org.ua/2012/01/09/megahack-of-stratfor.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>tudu: a beautiful ncurses to-do list application</title><link>http://bogdan.org.ua/2011/10/11/tudu-a-beautiful-ncurses-to-do-list-application.html</link> <comments>http://bogdan.org.ua/2011/10/11/tudu-a-beautiful-ncurses-to-do-list-application.html#comments</comments> <pubDate>Tue, 11 Oct 2011 12:15:21 +0000</pubDate> <dc:creator>Bogdan</dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[ncurses]]></category> <category><![CDATA[tudu]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1722</guid> <description><![CDATA[tudu is just what it says in the title, and is written in C. All the functions are mapped to keys. Extremely flexible: you can use it either as a simple to-do list, or utilize a bunch of optional features (priorities, schedules, deadlines, categories, tags, maybe something else). If you (like me) love ncurses &#8211; [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://cauterized.net/~meskio/tudu/" rel="nofollow" >tudu</a> is just what it says in the title, and is written in C.<br
/> All the functions are mapped to keys. Extremely flexible: you can use it either as a simple to-do list, or utilize a bunch of optional features (priorities, schedules, deadlines, categories, tags, maybe something else).</p><p>If you (like me) love ncurses &#8211; you will love tudu <img
src='http://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> Just give it a try.</p><p><img
src="http://bogdan.org.ua/wp-content/uploads/2011/10/tudu.jpg" alt="" title="tudu" width="680" height="400" class="alignnone size-full wp-image-1724" /><br
/> Screenshot copyright: Ruben Pollan (tudu author).</p> ]]></content:encoded> <wfw:commentRss>http://bogdan.org.ua/2011/10/11/tudu-a-beautiful-ncurses-to-do-list-application.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Good advice: /bin/false is not security</title><link>http://bogdan.org.ua/2011/10/01/good-advice-bin-false-is-not-security.html</link> <comments>http://bogdan.org.ua/2011/10/01/good-advice-bin-false-is-not-security.html#comments</comments> <pubDate>Sat, 01 Oct 2011 21:38:30 +0000</pubDate> <dc:creator>Bogdan</dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[Links]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[false]]></category> <category><![CDATA[nologin]]></category> <category><![CDATA[port forwarding]]></category> <category><![CDATA[ssh]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1706</guid> <description><![CDATA[SSH Security and You &#8211; /bin/false is *not* security.]]></description> <content:encoded><![CDATA[<p><a
href="http://www.semicomplete.com/articles/ssh-security/" rel="nofollow" >SSH Security and You &#8211; /bin/false is *not* security</a>.</p> ]]></content:encoded> <wfw:commentRss>http://bogdan.org.ua/2011/10/01/good-advice-bin-false-is-not-security.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Phusion Passenger Apache users guide</title><link>http://bogdan.org.ua/2011/08/14/phusion-passenger-apache-users-guide.html</link> <comments>http://bogdan.org.ua/2011/08/14/phusion-passenger-apache-users-guide.html#comments</comments> <pubDate>Sun, 14 Aug 2011 21:07:40 +0000</pubDate> <dc:creator>Bogdan</dc:creator> <category><![CDATA[Links]]></category> <category><![CDATA[Notepad]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Apache]]></category> <category><![CDATA[passenger]]></category> <category><![CDATA[phusion]]></category> <category><![CDATA[rails]]></category> <category><![CDATA[ruby]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1669</guid> <description><![CDATA[Phusion Passenger Apache users guide Also as a PDF.]]></description> <content:encoded><![CDATA[<p><a
href="http://www.modrails.com/documentation/Users%20guide%20Apache.html" rel="nofollow" >Phusion Passenger Apache users guide</a></p><p>Also as a <a
href='http://bogdan.org.ua/wp-content/uploads/2011/08/passenger_apache_guide.pdf'>PDF</a>.</p> ]]></content:encoded> <wfw:commentRss>http://bogdan.org.ua/2011/08/14/phusion-passenger-apache-users-guide.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>How to remotely convert live 1xHDD/LVM Linux server to 2xHDD RAID1/LVM (GRUB2, GPT)</title><link>http://bogdan.org.ua/2011/05/17/how-to-remotely-convert-live-hdd-lvm-linux-server-to-raid1-grub2-gpt.html</link> <comments>http://bogdan.org.ua/2011/05/17/how-to-remotely-convert-live-hdd-lvm-linux-server-to-raid1-grub2-gpt.html#comments</comments> <pubDate>Tue, 17 May 2011 13:23:05 +0000</pubDate> <dc:creator>Bogdan</dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[GPT]]></category> <category><![CDATA[grub2]]></category> <category><![CDATA[LVM]]></category> <category><![CDATA[mdadm]]></category> <category><![CDATA[RAID]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1593</guid> <description><![CDATA[Assumptions: current HDD is /dev/sda, it has a GPT (with bios_grub being /dev/sda1), separate /boot partition (/dev/sda2), and a physical LVM volume (/dev/sda3), where LVM holds all the remaining partitions (root, /home, /srv, &#8230;); LVM is properly configured, and system reboots with no problems your new drive is /dev/sdb, it is identical to /dev/sda, and [...]]]></description> <content:encoded><![CDATA[<p>Assumptions:</p><ul><li>current HDD is /dev/sda, it has a GPT (with bios_grub being /dev/sda1), separate /boot partition (/dev/sda2), and a physical LVM volume (/dev/sda3), where LVM holds all the remaining partitions (root, /home, /srv, &#8230;); LVM is properly configured, and system reboots with no problems</li><li>your new drive is /dev/sdb, it is identical to /dev/sda, and it comes empty from the manufacturer (this is important! wipe the drive if it is not empty, especially if it used to be a part of another RAID)</li><li>your system is Debian or Debian-based; in this exact example I&#8217;ve been using Ubuntu Server 10.04</li><li>your LVM volume group is named vg0</li><li>make sure you understand what each command does before executing it</li><li>you do have an external backup of all your important data, and you do understand that the following operations are potentially dangerous to your data integrity</li></ul><p>Inspired by: <a
href="http://www200.pair.com/mecham/raid/raid1-degraded-etch.html" rel="nofollow" >Debian Etch RAID guide</a>, <a
href="http://serverfault.com/questions/267819/convert-1x2tb-hdd-with-lvm-into-2x2tb-hdd-with-raid1lvm-or-with-lvm-mirroring" rel="nofollow" >serverfault question</a>.<br
/> <span
id="more-1593"></span></p><ol><li>Create the GPT on the new drive:<br
/> <strong>parted /dev/sdb mklabel gpt</strong></li><li>Get the list of partitions on /dev/sda:<br
/> <strong>parted -m /dev/sda print</strong></li><li>Create /dev/sdb partitions similarly to what you have on /dev/sda (my example numbers follow, use your numbers here):<br
/> <strong>parted /dev/sdb mkpart bios_grub 1049kB 2097kB</strong><br
/> <strong>parted /dev/sdb mkpart boot 2097kB 258MB</strong><br
/> <strong>parted /dev/sdb mkpart lvm 258MB 2000GB</strong></li><li>Set proper flags on partitions:<br
/> <strong>parted /dev/sdb set 1 bios_grub on</strong> (GPT doesn&#8217;t have MBR, so you create a 1-MB partition instead to hold grub2&#8242;s boot code)<br
/> <em>(possibly optional)</em> <strong>parted /dev/sdb set 2 raid on</strong><br
/> <em>(possibly optional)</em> <strong>parted /dev/sdb set 3 raid on</strong></li><li><em>(possibly optional)</em> To make sure /dev/sdb1 (the bios_grub) indeed contains grub&#8217;s boot code, I did <strong>dd if=/dev/sda1 of=/dev/sdb1</strong></li><li><strong>apt-get install mdadm</strong></li><li>Note: at this point, older tutorials suggest adding a bunch of raid* kernel modules to /etc/modules and to grub&#8217;s list of modules to load. I&#8217;m not sure this is really necessary, but do see the tutorials mentioned at the top for more information. If you do modify the lists of modules &#8211; don&#8217;t forget to run <strong>update-initramfs -u</strong>.</li><li>Create two initially-degraded RAID1 devices (one for /boot, another for LVM):<br
/> <strong>mdadm &ndash;&ndash;create /dev/md0 &ndash;&ndash;level=1 &ndash;&ndash;raid-devices=2 /dev/sdb2 missing</strong><br
/> <strong>mdadm &ndash;&ndash;create /dev/md1 &ndash;&ndash;level=1 &ndash;&ndash;raid-devices=2 /dev/sdb3 missing</strong></li><li>Store the configuration of your RAID1 to the mdadm.conf file (important! this is not done automatically!)<br
/> <strong>mdadm -Es >> /etc/mdadm/mdadm.conf</strong></li><li>Verify the contents of your mdadm.conf:<br
/> <strong>cat /etc/mdadm/mdadm.conf</strong><br
/> <strong>dpkg-reconfigure mdadm</strong>, and enable booting in degraded mode</li><li>Copy your current /boot (/dev/sda2) to the new /dev/md0 /boot partition:<br
/> (one can use dd here as well, but for some reason my attempt at dd failed writing 1 last byte of data)<br
/> <strong>mkdir /mnt/md0</strong><br
/> <strong>mount /dev/md0 /mnt/md0</strong><br
/> <strong>cp -a /boot/* /mnt/md0/</strong><br
/> <strong>umount /dev/md0</strong><br
/> <strong>rmdir /mnt/md0</strong></li><li>Now extend your existing volume group to include the newly-created /dev/md1:<br
/> <strong>pvcreate /dev/md1</strong><br
/> <strong>vgextend vg0 /dev/md1</strong></li><li>Verify the list of logical volumes you curently have: enter <strong>lvm</strong> shell, and type <strong>lvs</strong>. Here&#8217;s what I had:<br
/> LV   VG    Attr   LSize   Origin Snap%  Move Log Copy%  Convert<br
/> home vg0   -wi-ao   1.70t<br
/> logs vg0   -wi-ao   4.66g<br
/> root vg0   -wi-ao  10.24g<br
/> srv  vg0   -wc-ao 100.00g<br
/> swap vg0   -wi-ao   1.86g<br
/> tmp  vg0   -wi-ao   4.66g</li><li>Now, you can move all the logical volumes to new physical volume in one command: <strong>pvmove /dev/sda3 /dev/md1</strong>. Personally, remembering the problem I had with dd from /dev/sda2 to /dev/md0, I decided to move all logical volumes one-by-one; as this takes time, you may consider joining these operations with <strong>;</strong> or <strong>&#038;&</strong>, and putting the /tmp last (as the easiest one to re-create if it fails to move):<br
/> <strong>pvmove &ndash;&ndash;name home /dev/sda3 /dev/md1</strong><br
/> <strong>pvmove &ndash;&ndash;name srv /dev/sda3 /dev/md1</strong><br
/> <strong>pvmove &ndash;&ndash;name logs /dev/sda3 /dev/md1</strong><br
/> <strong>pvmove &ndash;&ndash;name swap /dev/sda3 /dev/md1</strong><br
/> <strong>pvmove &ndash;&ndash;name root /dev/sda3 /dev/md1</strong><br
/> <strong>pvmove &ndash;&ndash;name tmp /dev/sda3 /dev/md1</strong></li><li>To be safer, I ran FS check on a few volumes I could umount:<br
/> <strong>umount /dev/mapper/vg0-srv</strong><br
/> <strong>fsck -f /dev/mapper/vg0-srv</strong><br
/> <strong>mount /dev/mapper/vg0-srv</strong><br
/> <strong>umount /dev/mapper/vg0-tmp</strong><br
/> <strong>fsck -f /dev/mapper/vg0-tmp</strong><br
/> <strong>mount /dev/mapper/vg0-tmp</strong></li><li>Remove /dev/sda3 from the physical space available to your volume group:<br
/> <strong>vgreduce vg0 /dev/sda3</strong></li><li>Install grub2 to both drives, so as to make them both bootable in case of failure:<br
/> <strong>grub-install &#8216;(hd0)&#8217;</strong><br
/> <strong>grub-install &#8216;(hd1)&#8217;</strong></li><li>Edit <strong>/etc/fstab</strong>, pointing /boot to /dev/md0. You may use UUIDs here, but please do not use UUIDs from mdadm.conf &#8211; those are different from FS-UUIDs, instead do <strong>ls -l /dev/disk/by-uuid</strong> to find the UUID of /dev/md0. Personally, I had no problems just using /dev/md0.</li><li>Now is the time to add your original /dev/sda to the RAID1; be absolutely sure you have moved all the data off that drive, because these commands will destroy it:<br
/> <strong>mdadm &ndash;&ndash;manage &ndash;&ndash;add /dev/md0 /dev/sda2</strong><br
/> <strong>mdadm &ndash;&ndash;manage &ndash;&ndash;add /dev/md1 /dev/sda3</strong><br
/> Re-syncing array will take some time.</li><li>To be on the safe side, you may want to run again <strong>update-initramfs -u</strong> and <strong>update-grub</strong>; I have also edited /etc/grub.d/40_custom, adding there 2 more boot options: from /dev/sda2 and /dev/sdb2 (/boot on both drives) &#8211; have no idea if that will work, but having more boot options didn&#8217;t hurt</li><li>Reboot into your new system. Actually, at this point reboot is only necessary to verify that your system is bootable &#8211; you may delay this reboot as long as you want to.</li><li>Many tutorials also suggest testing your RAID1 by manually &#8220;degrading&#8221; it, trying to boot, and then rebuilding it back. I haven&#8217;t done that, but you may want to.</li></ol><p>Improvement suggestions, criticism and thank-you are welcome in the comments.</p> ]]></content:encoded> <wfw:commentRss>http://bogdan.org.ua/2011/05/17/how-to-remotely-convert-live-hdd-lvm-linux-server-to-raid1-grub2-gpt.html/feed</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Generate .mood moodbar files for your whole music collection</title><link>http://bogdan.org.ua/2011/04/10/generate-mood-moodbar-files-for-your-whole-music-collection.html</link> <comments>http://bogdan.org.ua/2011/04/10/generate-mood-moodbar-files-for-your-whole-music-collection.html#comments</comments> <pubDate>Sun, 10 Apr 2011 20:21:46 +0000</pubDate> <dc:creator>Bogdan</dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[Links]]></category> <category><![CDATA[Notepad]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[amarok]]></category> <category><![CDATA[moodbar]]></category> <category><![CDATA[music]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1561</guid> <description><![CDATA[Amarok moodbar wiki page has 2 nice scripts to generate .mood files for your whole music collection (to be displayed by amarok when playing). Both scripts should be started from the directory where you keep your music. The .mood files will be generated next to the source music files (in the same directories). You can [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://amarok.kde.org/wiki/Moodbar" rel="nofollow" >Amarok moodbar wiki</a> page has 2 nice scripts to generate .mood files for your whole music collection (to be displayed by amarok when playing).</p><p><span
id="more-1561"></span></p><p>Both scripts should be started from the directory where you keep your music. The .mood files will be generated next to the source music files (in the same directories). You can modify the scripts to have the moods stored to $HOME/.kde/share/apps/amarok/moods/, so as not to clutter your music directories.</p><p>Script for multicore CPUs (will not overwrite existing mood files):</p><div
class="igBar"><span
id="lcode-4"><a
href="#" rel="nofollow"  onclick="javascript:showPlainTxt('code-4'); return false;">PLAIN TEXT</a></span></div><div
class="syntax_hilite"><span
class="langName">CODE:</span><div
id="code-4"><div
class="code"><ol><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#!/bin/bash</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">NUMCPU=<span
style="color:#CC0000;">"$(grep ^processor /proc/cpuinfo | wc -l)"</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">find . -type f -regextype posix-awk -iregex <span
style="color:#CC0000;">'.*<span
style="color:#000099; font-weight:bold;">\.</span>(mp3|ogg|flac|wma)'</span> | while read i ; do</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;while <span
style="color:#006600; font-weight:bold;">&#91;</span> `jobs -p | wc -l` -ge $NUMCPU <span
style="color:#006600; font-weight:bold;">&#93;</span> ; do</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sleep <span
style="color:#800000;color:#800000;">0</span>.<span
style="color:#800000;color:#800000;">1</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;done</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;TEMP=<span
style="color:#CC0000;">"${i%.*}.mood"</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;OUTF=`echo <span
style="color:#CC0000;">"$TEMP"</span> | sed <span
style="color:#CC0000;">'s#<span
style="color:#000099; font-weight:bold;">\(</span>.*<span
style="color:#000099; font-weight:bold;">\)</span>/<span
style="color:#000099; font-weight:bold;">\(</span>[^,]*<span
style="color:#000099; font-weight:bold;">\)</span>#<span
style="color:#000099; font-weight:bold;">\1</span>/.<span
style="color:#000099; font-weight:bold;">\2</span>#'</span>`</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;if <span
style="color:#006600; font-weight:bold;">&#91;</span> ! -e <span
style="color:#CC0000;">"$OUTF"</span> <span
style="color:#006600; font-weight:bold;">&#93;</span> ; then</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;moodbar -o <span
style="color:#CC0000;">"$OUTF"</span> <span
style="color:#CC0000;">"$i"</span> &amp;</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;fi</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">done</div></li></ol></div></div></div><p></p><p>Script for single-threaded moods generation (will only overwrite the last-generated mood file from a previous run):</p><div
class="igBar"><span
id="lcode-5"><a
href="#" rel="nofollow"  onclick="javascript:showPlainTxt('code-5'); return false;">PLAIN TEXT</a></span></div><div
class="syntax_hilite"><span
class="langName">CODE:</span><div
id="code-5"><div
class="code"><ol><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#!/bin/bash</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">DIR=$<span
style="color:#006600; font-weight:bold;">&#123;</span><span
style="color:#800000;color:#800000;">1</span>:-.<span
style="color:#006600; font-weight:bold;">&#125;</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">LAST=.<span
style="">moodbar</span>-lastreadsong</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">C_RET=<span
style="color:#800000;color:#800000;">0</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">control_c<span
style="color:#006600; font-weight:bold;">&#40;</span><span
style="color:#006600; font-weight:bold;">&#41;</span>&nbsp; &nbsp; &nbsp; &nbsp; # run if user hits control-c</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span
style="color:#006600; font-weight:bold;">&#123;</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; echo <span
style="color:#CC0000;">"$1"</span>&gt; <span
style="color:#CC0000;">"$LAST"</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; echo <span
style="color:#CC0000;">"Exiting..."</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; exit</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span
style="color:#006600; font-weight:bold;">&#125;</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">if <span
style="color:#006600; font-weight:bold;">&#91;</span> -e <span
style="color:#CC0000;">"$LAST"</span> <span
style="color:#006600; font-weight:bold;">&#93;</span>; then</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; read filetodelete &lt;<span
style="color:#CC0000;">"$LAST"</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; rm <span
style="color:#CC0000;">"$filetodelete"</span> <span
style="color:#CC0000;">"$LAST"</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">fi</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">exec <span
style="color:#800000;color:#800000;">9</span>&lt;&lt;<span
style="color:#006600; font-weight:bold;">&#40;</span>find <span
style="color:#CC0000;">"$DIR"</span> -type f -regextype posix-awk -iregex <span
style="color:#CC0000;">'.*<span
style="color:#000099; font-weight:bold;">\.</span>(mp3|ogg|flac|wma)'</span><span
style="color:#006600; font-weight:bold;">&#41;</span> # you may need to add m4a and mp4</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">while read i</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">do</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; TEMP=<span
style="color:#CC0000;">"${i%.*}.mood"</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; OUTF=`echo <span
style="color:#CC0000;">"$TEMP"</span> | sed <span
style="color:#CC0000;">'s#<span
style="color:#000099; font-weight:bold;">\(</span>.*<span
style="color:#000099; font-weight:bold;">\)</span>/<span
style="color:#000099; font-weight:bold;">\(</span>[^,]*<span
style="color:#000099; font-weight:bold;">\)</span>#<span
style="color:#000099; font-weight:bold;">\1</span>/.<span
style="color:#000099; font-weight:bold;">\2</span>#'</span>`</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; trap <span
style="color:#CC0000;">'control_c &quot;$OUTF&quot;'</span> INT</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; if <span
style="color:#006600; font-weight:bold;">&#91;</span> ! -e <span
style="color:#CC0000;">"$OUTF"</span> <span
style="color:#006600; font-weight:bold;">&#93;</span> || <span
style="color:#006600; font-weight:bold;">&#91;</span> <span
style="color:#CC0000;">"$i"</span> -nt <span
style="color:#CC0000;">"$OUTF"</span> <span
style="color:#006600; font-weight:bold;">&#93;</span>; then</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; moodbar -o <span
style="color:#CC0000;">"$OUTF"</span> <span
style="color:#CC0000;">"$i"</span> || <span
style="color:#006600; font-weight:bold;">&#123;</span> C_RET=<span
style="color:#800000;color:#800000;">1</span>; echo <span
style="color:#CC0000;">"An error occurred!"</span>&gt;&amp;<span
style="color:#800000;color:#800000;">2</span>; <span
style="color:#006600; font-weight:bold;">&#125;</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; fi</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">done &lt;&amp;<span
style="color:#800000;color:#800000;">9</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">exec <span
style="color:#800000;color:#800000;">9</span>&lt;&amp;-</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">exit $C_RET</div></li></ol></div></div></div><p></p><p>That same page has a link to an older, somewhat more polished <a
href="http://forum.kde.org/viewtopic.php?f=119&#038;t=84811" rel="nofollow" >ruby script</a> for the same task. It requires a running instance of Amarok, and uses it's media collection to find music files and create mood files for them. This script can potentially (after a little editing) store .mood files either with the music or to the $HOME/.kde/... path mentioned above. It is for an older version of Amarok, and thus is not likely to work with e.g. Amarok 2.4</p><div
class="igBar"><span
id="lruby-6"><a
href="#" rel="nofollow"  onclick="javascript:showPlainTxt('ruby-6'); return false;">PLAIN TEXT</a></span></div><div
class="syntax_hilite"><span
class="langName">RUBY:</span><div
id="ruby-6"><div
class="ruby"><ol><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span
style="color:#008000; font-style:italic;">#!/usr/bin/ruby</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span
style="color:#008000; font-style:italic;"># Simple moodbar file management utility by Joe Rabinoff</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span
style="color:#008000; font-style:italic;"># This is also my first ever ruby script so bear with me</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$moodbar_folder = <span
style="color:#996600;">"#{ENV['HOME']}/.kde/share/apps/amarok/moods/"</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span
style="color:#9966CC; font-weight:bold;">def</span> usage<span
style="color:#006600; font-weight:bold;">&#40;</span><span
style="color:#006600; font-weight:bold;">&#41;</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span
style="color:#CC0066; font-weight:bold;">print</span> <span
style="color:#996600;">"This is the moodbar file management utility<span
style="color:#000099;">\n</span>"</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span
style="color:#CC0066; font-weight:bold;">print</span> <span
style="color:#996600;">"<span
style="color:#000099;">\n</span>"</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span
style="color:#CC0066; font-weight:bold;">print</span> <span
style="color:#996600;">"Usage is:<span
style="color:#000099;">\n</span>"</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span
style="color:#CC0066; font-weight:bold;">print</span> <span
style="color:#996600;">"&nbsp; &nbsp;moodbar_util.rb -rename&nbsp; &nbsp; Rename mood files"</span> \</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+ <span
style="color:#996600;">" from any old naming scheme to the current one<span
style="color:#000099;">\n</span>"</span> \</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; + <span
style="color:#996600;">"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (not applicable when mood"</span> \</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+ <span
style="color:#996600;">" files are stored with music)<span
style="color:#000099;">\n</span>"</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span
style="color:#CC0066; font-weight:bold;">print</span> <span
style="color:#996600;">"&nbsp; &nbsp;moodbar_util.rb -calcall&nbsp; &nbsp;Calculate all un-calculated"</span> \</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; + <span
style="color:#996600;">" mood files<span
style="color:#000099;">\n</span>"</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span
style="color:#CC0066; font-weight:bold;">exit</span><span
style="color:#006600; font-weight:bold;">&#40;</span><span
style="color:#006666;color:#800000;">1</span><span
style="color:#006600; font-weight:bold;">&#41;</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span
style="color:#9966CC; font-weight:bold;">end</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span
style="color:#9966CC; font-weight:bold;">def</span> check_amarok_running<span
style="color:#006600; font-weight:bold;">&#40;</span><span
style="color:#006600; font-weight:bold;">&#41;</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; result = <span
style="color:#996600;">`dcop 'amarok*'`</span>.<span
style="color:#CC0066; font-weight:bold;">split</span><span
style="color:#006600; font-weight:bold;">&#40;</span><span
style="color:#996600;">"<span
style="color:#000099;">\n</span>"</span><span
style="color:#006600; font-weight:bold;">&#41;</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span
style="color:#0000FF; font-weight:bold;">return</span> <span
style="color:#006600; font-weight:bold;">&#40;</span>result.<span
style="color:#9900CC;">length</span>&gt; <span
style="color:#006666;color:#800000;">0</span><span
style="color:#006600; font-weight:bold;">&#41;</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span
style="color:#9966CC; font-weight:bold;">end</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span
style="color:#9966CC; font-weight:bold;">def</span> get_devices<span
style="color:#006600; font-weight:bold;">&#40;</span><span
style="color:#006600; font-weight:bold;">&#41;</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; result = <span
style="color:#996600;">`dcop amarok collection query 'SELECT id, lastmountpoint FROM devices;'`</span>.<span
style="color:#CC0066; font-weight:bold;">split</span><span
style="color:#006600; font-weight:bold;">&#40;</span><span
style="color:#996600;">"<span
style="color:#000099;">\n</span>"</span><span
style="color:#006600; font-weight:bold;">&#41;</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; ret = Hash.<span
style="color:#9900CC;">new</span><span
style="color:#006600; font-weight:bold;">&#40;</span><span
style="color:#006600; font-weight:bold;">&#41;</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; result.<span
style="color:#9900CC;">each_index</span> <span
style="color:#9966CC; font-weight:bold;">do</span> |i|</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; ret<span
style="color:#006600; font-weight:bold;">&#91;</span>result<span
style="color:#006600; font-weight:bold;">&#91;</span>i<span
style="color:#006600; font-weight:bold;">&#93;</span>.<span
style="color:#9900CC;">to_i</span><span
style="color:#006600; font-weight:bold;">&#93;</span> = result<span
style="color:#006600; font-weight:bold;">&#91;</span>i+<span
style="color:#006666;color:#800000;">1</span><span
style="color:#006600; font-weight:bold;">&#93;</span> <span
style="color:#9966CC; font-weight:bold;">if</span> i % <span
style="color:#006666;color:#800000;">2</span> == <span
style="color:#006666;color:#800000;">0</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span
style="color:#9966CC; font-weight:bold;">end</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span
style="color:#0000FF; font-weight:bold;">return</span> ret</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span
style="color:#9966CC; font-weight:bold;">end</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span
style="color:#9966CC; font-weight:bold;">def</span> mood_name<span
style="color:#006600; font-weight:bold;">&#40;</span>url, deviceid<span
style="color:#006600; font-weight:bold;">&#41;</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; ret = url.<span
style="color:#CC0066; font-weight:bold;">gsub</span><span
style="color:#006600; font-weight:bold;">&#40;</span>/\//, ','<span
style="color:#006600; font-weight:bold;">&#41;</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span
style="color:#0000FF; font-weight:bold;">return</span> deviceid.<span
style="color:#9900CC;">to_s</span> + <span
style="color:#996600;">","</span> + ret</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span
style="color:#9966CC; font-weight:bold;">end</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span
style="color:#9966CC; font-weight:bold;">def</span> rename<span
style="color:#006600; font-weight:bold;">&#40;</span><span
style="color:#006600; font-weight:bold;">&#41;</span>&nbsp; &nbsp;</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span
style="color:#CC0066; font-weight:bold;">print</span> <span
style="color:#996600;">"Renaming mood files from outdated naming schemes...<span
style="color:#000099;">\n</span>"</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span
style="color:#008000; font-style:italic;"># As far as I can tell, the best way to do this is just select all</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span
style="color:#008000; font-style:italic;"># tracks, check the old possible moodbar names, and rename them</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; tracks = <span
style="color:#996600;">`dcop amarok collection query 'SELECT url, deviceid FROM tags;'`</span>.<span
style="color:#CC0066; font-weight:bold;">split</span><span
style="color:#006600; font-weight:bold;">&#40;</span><span
style="color:#996600;">"<span
style="color:#000099;">\n</span>"</span><span
style="color:#006600; font-weight:bold;">&#41;</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; devices = get_devices</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span
style="color:#006666;color:#800000;">0</span>.<span
style="color:#9900CC;">step</span><span
style="color:#006600; font-weight:bold;">&#40;</span>tracks.<span
style="color:#9900CC;">length</span>-<span
style="color:#006666;color:#800000;">1</span>, <span
style="color:#006666;color:#800000;">2</span><span
style="color:#006600; font-weight:bold;">&#41;</span> <span
style="color:#9966CC; font-weight:bold;">do</span> |i|</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; url&nbsp; &nbsp; &nbsp; = tracks<span
style="color:#006600; font-weight:bold;">&#91;</span>i<span
style="color:#006600; font-weight:bold;">&#93;</span>.<span
style="color:#CC0066; font-weight:bold;">sub</span><span
style="color:#006600; font-weight:bold;">&#40;</span>/\.<span
style="color:#006600; font-weight:bold;">&#91;</span>^\.<span
style="color:#006600; font-weight:bold;">&#93;</span>*$/, '.<span
style="color:#9900CC;">mood</span>'<span
style="color:#006600; font-weight:bold;">&#41;</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; deviceid = tracks<span
style="color:#006600; font-weight:bold;">&#91;</span>i+<span
style="color:#006666;color:#800000;">1</span><span
style="color:#006600; font-weight:bold;">&#93;</span>.<span
style="color:#9900CC;">to_i</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; path = url.<span
style="color:#CC0066; font-weight:bold;">sub</span><span
style="color:#006600; font-weight:bold;">&#40;</span>/\./, ''<span
style="color:#006600; font-weight:bold;">&#41;</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span
style="color:#9966CC; font-weight:bold;">if</span> devices.<span
style="color:#9900CC;">has_key</span>?<span
style="color:#006600; font-weight:bold;">&#40;</span>deviceid<span
style="color:#006600; font-weight:bold;">&#41;</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;path = devices<span
style="color:#006600; font-weight:bold;">&#91;</span>deviceid<span
style="color:#006600; font-weight:bold;">&#93;</span> + path</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span
style="color:#9966CC; font-weight:bold;">end</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; moodfile&nbsp; = $moodbar_folder + mood_name<span
style="color:#006600; font-weight:bold;">&#40;</span>url, deviceid<span
style="color:#006600; font-weight:bold;">&#41;</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; moodfile1 = $moodbar_folder + path.<span
style="color:#CC0066; font-weight:bold;">gsub</span><span
style="color:#006600; font-weight:bold;">&#40;</span>/\//, ','<span
style="color:#006600; font-weight:bold;">&#41;</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span
style="color:#9966CC; font-weight:bold;">next</span> <span
style="color:#9966CC; font-weight:bold;">if</span> FileTest.<span
style="color:#9900CC;">exists</span>?<span
style="color:#006600; font-weight:bold;">&#40;</span>moodfile<span
style="color:#006600; font-weight:bold;">&#41;</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span
style="color:#9966CC; font-weight:bold;">if</span> FileTest.<span
style="color:#9900CC;">exists</span>?<span
style="color:#006600; font-weight:bold;">&#40;</span>moodfile1<span
style="color:#006600; font-weight:bold;">&#41;</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span
style="color:#CC0066; font-weight:bold;">system</span><span
style="color:#006600; font-weight:bold;">&#40;</span><span
style="color:#996600;">"mv"</span>, <span
style="color:#996600;">"-f"</span>, moodfile1, moodfile<span
style="color:#006600; font-weight:bold;">&#41;</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span
style="color:#CC0066; font-weight:bold;">print</span> <span
style="color:#996600;">"Moved "</span>, moodfile1, <span
style="color:#996600;">" to "</span>, moodfile, <span
style="color:#996600;">"<span
style="color:#000099;">\n</span>"</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span
style="color:#9966CC; font-weight:bold;">end</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span
style="color:#9966CC; font-weight:bold;">end</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span
style="color:#9966CC; font-weight:bold;">end</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span
style="color:#9966CC; font-weight:bold;">def</span> calcall<span
style="color:#006600; font-weight:bold;">&#40;</span><span
style="color:#006600; font-weight:bold;">&#41;</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span
style="color:#CC0066; font-weight:bold;">print</span> <span
style="color:#996600;">"Calculating all nonexisting moodbars...<span
style="color:#000099;">\n</span><span
style="color:#000099;">\n</span>"</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; tracks = <span
style="color:#996600;">`dcop amarok collection query 'SELECT url, deviceid FROM tags;'`</span>.<span
style="color:#CC0066; font-weight:bold;">split</span><span
style="color:#006600; font-weight:bold;">&#40;</span><span
style="color:#996600;">"<span
style="color:#000099;">\n</span>"</span><span
style="color:#006600; font-weight:bold;">&#41;</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; devices = get_devices</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; withMusic = <span
style="color:#006600; font-weight:bold;">&#40;</span><span
style="color:#996600;">`dcop amarok script readConfig MoodsWithMusic`</span>.<span
style="color:#CC0066; font-weight:bold;">chomp</span> == <span
style="color:#996600;">"true"</span><span
style="color:#006600; font-weight:bold;">&#41;</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span
style="color:#006666;color:#800000;">0</span>.<span
style="color:#9900CC;">step</span><span
style="color:#006600; font-weight:bold;">&#40;</span>tracks.<span
style="color:#9900CC;">length</span>-<span
style="color:#006666;color:#800000;">1</span>, <span
style="color:#006666;color:#800000;">2</span><span
style="color:#006600; font-weight:bold;">&#41;</span> <span
style="color:#9966CC; font-weight:bold;">do</span> |i|</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; url&nbsp; &nbsp; &nbsp; = tracks<span
style="color:#006600; font-weight:bold;">&#91;</span>i<span
style="color:#006600; font-weight:bold;">&#93;</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; deviceid = tracks<span
style="color:#006600; font-weight:bold;">&#91;</span>i+<span
style="color:#006666;color:#800000;">1</span><span
style="color:#006600; font-weight:bold;">&#93;</span>.<span
style="color:#9900CC;">to_i</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; moodfile = <span
style="color:#996600;">""</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; songpath = url.<span
style="color:#CC0066; font-weight:bold;">sub</span><span
style="color:#006600; font-weight:bold;">&#40;</span>/\./, ''<span
style="color:#006600; font-weight:bold;">&#41;</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span
style="color:#9966CC; font-weight:bold;">if</span> devices.<span
style="color:#9900CC;">has_key</span>?<span
style="color:#006600; font-weight:bold;">&#40;</span>deviceid<span
style="color:#006600; font-weight:bold;">&#41;</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; songpath = devices<span
style="color:#006600; font-weight:bold;">&#91;</span>deviceid<span
style="color:#006600; font-weight:bold;">&#93;</span> + songpath</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span
style="color:#9966CC; font-weight:bold;">end</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span
style="color:#9966CC; font-weight:bold;">if</span> withMusic</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; moodfile = songpath.<span
style="color:#CC0066; font-weight:bold;">sub</span><span
style="color:#006600; font-weight:bold;">&#40;</span>/\.<span
style="color:#006600; font-weight:bold;">&#91;</span>^\.<span
style="color:#006600; font-weight:bold;">&#93;</span>*$/, '.<span
style="color:#9900CC;">mood</span>'<span
style="color:#006600; font-weight:bold;">&#41;</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; moodfile = File.<span
style="color:#9900CC;">dirname</span><span
style="color:#006600; font-weight:bold;">&#40;</span>moodfile<span
style="color:#006600; font-weight:bold;">&#41;</span> + <span
style="color:#996600;">"/."</span> + File.<span
style="color:#9900CC;">basename</span><span
style="color:#006600; font-weight:bold;">&#40;</span>moodfile<span
style="color:#006600; font-weight:bold;">&#41;</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span
style="color:#9966CC; font-weight:bold;">else</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; moodfile = $moodbar_folder \</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; + mood_name<span
style="color:#006600; font-weight:bold;">&#40;</span>url.<span
style="color:#CC0066; font-weight:bold;">sub</span><span
style="color:#006600; font-weight:bold;">&#40;</span>/\.<span
style="color:#006600; font-weight:bold;">&#91;</span>^\.<span
style="color:#006600; font-weight:bold;">&#93;</span>*$/, '.<span
style="color:#9900CC;">mood</span>'<span
style="color:#006600; font-weight:bold;">&#41;</span>, deviceid<span
style="color:#006600; font-weight:bold;">&#41;</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span
style="color:#9966CC; font-weight:bold;">end</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span
style="color:#9966CC; font-weight:bold;">next</span> <span
style="color:#9966CC; font-weight:bold;">if</span> FileTest.<span
style="color:#9900CC;">exists</span>?<span
style="color:#006600; font-weight:bold;">&#40;</span>moodfile<span
style="color:#006600; font-weight:bold;">&#41;</span> &amp;&amp; FileTest.<span
style="color:#9900CC;">size</span><span
style="color:#006600; font-weight:bold;">&#40;</span>moodfile<span
style="color:#006600; font-weight:bold;">&#41;</span>&gt; <span
style="color:#006666;color:#800000;">0</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span
style="color:#9966CC; font-weight:bold;">next</span> <span
style="color:#9966CC; font-weight:bold;">unless</span> FileTest.<span
style="color:#9900CC;">exists</span>?<span
style="color:#006600; font-weight:bold;">&#40;</span>songpath<span
style="color:#006600; font-weight:bold;">&#41;</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span
style="color:#CC0066; font-weight:bold;">print</span> <span
style="color:#996600;">"Saving moodbar for "</span>, songpath, <span
style="color:#996600;">"<span
style="color:#000099;">\n</span>"</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span
style="color:#CC0066; font-weight:bold;">print</span> <span
style="color:#996600;">"&nbsp; &nbsp;to file "</span>, moodfile, <span
style="color:#996600;">"<span
style="color:#000099;">\n</span>"</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span
style="color:#CC0066; font-weight:bold;">system</span><span
style="color:#006600; font-weight:bold;">&#40;</span><span
style="color:#996600;">"moodbar"</span>, <span
style="color:#996600;">"-o"</span>, moodfile, songpath<span
style="color:#006600; font-weight:bold;">&#41;</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span
style="color:#CC0066; font-weight:bold;">print</span> <span
style="color:#996600;">"<span
style="color:#000099;">\n</span>"</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span
style="color:#9966CC; font-weight:bold;">end</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span
style="color:#9966CC; font-weight:bold;">end</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$mode = ARGV<span
style="color:#006600; font-weight:bold;">&#91;</span><span
style="color:#006666;color:#800000;">0</span><span
style="color:#006600; font-weight:bold;">&#93;</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span
style="color:#9966CC; font-weight:bold;">if</span> !check_amarok_running</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span
style="color:#CC0066; font-weight:bold;">print</span> <span
style="color:#996600;">"Amarok is not running!&nbsp; Please start Amarok and re-run "</span> \</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span
style="color:#996600;">"this script.<span
style="color:#000099;">\n</span>"</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span
style="color:#9966CC; font-weight:bold;">end</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span
style="color:#9966CC; font-weight:bold;">if</span> $mode == <span
style="color:#996600;">"-rename"</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; rename</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span
style="color:#9966CC; font-weight:bold;">elsif</span> $mode == <span
style="color:#996600;">"-calcall"</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; calcall</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span
style="color:#9966CC; font-weight:bold;">else</span></div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; usage</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span
style="color:#9966CC; font-weight:bold;">end</span></div></li></ol></div></div></div><p></p> ]]></content:encoded> <wfw:commentRss>http://bogdan.org.ua/2011/04/10/generate-mood-moodbar-files-for-your-whole-music-collection.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Debunking the widespread myth of 2^32=4GB being the architectural limit</title><link>http://bogdan.org.ua/2011/04/10/debunking-widespread-myth-of-2-32-4gb-architectural-limit.html</link> <comments>http://bogdan.org.ua/2011/04/10/debunking-widespread-myth-of-2-32-4gb-architectural-limit.html#comments</comments> <pubDate>Sun, 10 Apr 2011 13:10:54 +0000</pubDate> <dc:creator>Bogdan</dc:creator> <category><![CDATA[Hardware]]></category> <category><![CDATA[Links]]></category> <category><![CDATA[Misc]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[32bit]]></category> <category><![CDATA[4GB]]></category> <category><![CDATA[myth]]></category> <category><![CDATA[PAE]]></category> <category><![CDATA[windows]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1555</guid> <description><![CDATA[Quite a number of people are aware of the PAE which can extend the addressable space from 32bit up to 36-48-52bit (depending on the implementation; as I understand, Windows PAE extends to 36 bits, or 64GB of addressable space). However, overwhelming numbers of internet pages continue insisting that a not-more-than-4GB limit for the 32bit Windows [...]]]></description> <content:encoded><![CDATA[<p>Quite a number of people are aware of the <abbr
title="Page Address Extension">PAE</abbr> which can extend the addressable space from 32bit up to 36-48-52bit (depending on the implementation; as I understand, Windows PAE extends to 36 bits, or 64GB of addressable space). However, overwhelming numbers of internet pages continue insisting that a not-more-than-4GB limit for the 32bit Windows is the consequence of <em>2^32 = 4GB architectural limit</em>.</p><p>There is an <a
href="http://www.geoffchappell.com/viewer.htm?doc=notes/windows/license/memory.htm" rel="nofollow" >excellent, in-depth, well-argumented article by Geoff Chappell</a> on the issue. Highly recommended in its entirety to those who want a complete understanding (additional side-reading and facts verification might be necessary).</p><p>A single citation to get you started:</p><blockquote><p>There is already on the Internet and elsewhere an awful lot of rubbish to read about this question. Hardly any of it would be worth citing even if I didn’t want to spare the authors the embarrassment. A surprising number of people who claim some sort of attention as expert commentators would have you believe that using more than 4GB of memory is mathematically impossible for any 32-bit operating system because 2 to the power of 32 is 4G and a 32-bit register can’t form an address above 4GB. If nothing else, these experts don’t know enough history: 2 to the 16 is only 64K and yet the wealth of Microsoft is founded on a 16-bit operating system that from its very first version was designed to use 640KB of RAM plus other memory in a physical address space of 1MB. Some remember this history and add seemingly plausible qualifications that exceeding 4GB is possible only at the price of nasty hacks that require everyone—well, all programmers—to jump through hoops. Fortunately, Intel’s processors are a lot more advanced than the 8086 from all those years ago.</p></blockquote><p>P.S. Unfortunately, patching the kernel won't help make Windows XP see more than 4GB RAM: even though the kernel itself does support more RAM (with PAE), starting with SP2 the <abbr
title="Hardware Abstraction Layer">HAL</abbr> was modified in a way prohibiting access to any RAM beyond 4GB. Patching may only be suggested to devoted geeks with Vista's and 7's.</p> ]]></content:encoded> <wfw:commentRss>http://bogdan.org.ua/2011/04/10/debunking-widespread-myth-of-2-32-4gb-architectural-limit.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>rtorrent-enhanced with ipfilter and GeoIP: Debian Squeeze amd64 package</title><link>http://bogdan.org.ua/2011/04/01/rtorrent-enhanced-with-ipfilter-and-geoip-debian-squeeze-amd64-package.html</link> <comments>http://bogdan.org.ua/2011/04/01/rtorrent-enhanced-with-ipfilter-and-geoip-debian-squeeze-amd64-package.html#comments</comments> <pubDate>Thu, 31 Mar 2011 23:15:49 +0000</pubDate> <dc:creator>Bogdan</dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[amd64]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[geoip]]></category> <category><![CDATA[ipfilter]]></category> <category><![CDATA[package]]></category> <category><![CDATA[rtorrent]]></category> <category><![CDATA[squeeze]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1530</guid> <description><![CDATA[rtorrent is an excellent ncurses rtorrent client. There are a few highly-popular patches, which haven't yet made it into the Squeeze's rtorrent version 0.8.6. Note: ArchLinux already has an rtorrent-extended package, so you may want to look at that one (instead of my Debian package below). I might use Arch's patchset next time to generate [...]]]></description> <content:encoded><![CDATA[<p><img
src="http://bogdan.org.ua/wp-content/uploads/2011/03/shot.png" alt="rtorrent-eyecandy" title="rtorrent-eyecandy (from http://karabaja.pondi.hr/packages/rtorrent-mod/shot.png)" width="698" height="380" class="alignnone size-full wp-image-1533" /><br
/> rtorrent is an excellent ncurses <del
datetime="2011-03-31T21:25:09+00:00">r</del>torrent client.</p><p>There are a few highly-popular patches, which haven't yet made it into the Squeeze's rtorrent version 0.8.6.</p><p><strong>Note</strong>: ArchLinux already has an <a
href="http://aur.archlinux.org/packages.php?ID=33756" rel="nofollow" >rtorrent-extended package</a>, so you may want to look at that one (instead of my Debian package below). I might use Arch's patchset next time to generate a truly extended rtorrent package.</p><p>I've incorporated 3 of such patches (<a
href="http://libtorrent.rakshasa.no/ticket/239" rel="nofollow" >#239</a> ipfilter, <a
href="http://libtorrent.rakshasa.no/ticket/2064" rel="nofollow" >#2064</a> GeoIP support, and <a
href="http://libtorrent.rakshasa.no/ticket/2171" rel="nofollow" >#2171</a> colours/eyecandy), and built a <a
href="/wp-content/uploads/2011/04/rtorrent_0.8.6-1_amd64.deb" rel="nofollow" >squeeze amd64 rtorrent-enhanced package</a>.</p><p><img
src="http://bogdan.org.ua/wp-content/uploads/2011/04/rtorrent-features.png" alt="" title="rtorrent-features" width="675" height="107" class="alignnone size-full wp-image-1537" /></p><p>A few excerpts to explain how these extra features are to be configured and used (all come from the above-mentioned trac tickets, some were edited/extended).</p><p><strong>ipfilter</strong></p><blockquote><p>ipfilter allows to selectively blacklist/whitelist peers - based on IP address range files (so-called ipfilter files). The ipfilter files may, for example, come from bluetack.co.uk. Each line of the file contains a record in this format: <strong>range_description:start_IP-end_IP</strong>, where <em>start_IP</em> should be less than or equal to <em>end_IP</em>. Multiple files can be used. Overlapping ranges are merged automatically. Both incoming and outgoing connections are checked against the filter. Exclusions are not supported, so connection to/from IPs in all the loaded ranges will be disallowed and dropped.</p></blockquote><blockquote><p>Include "ip_filter=<file,...>" directive in .rtorrent.rc. For example (paths are specified relative to user's home directory):<br
/> <strong>ip_filter=ipfilter/level1,ipfilter/level2</strong></p></blockquote><blockquote><p>It is probably a good idea to reload ipfilter files once in a while, so you can also include "reload_ip_filter" directive on schedule to refresh the filter. The same files named in "ip_filter" will be reloaded.</p><p><strong>schedule = filter,18:30:00,24:00:00,reload_ip_filter=</strong></p></blockquote><blockquote><p>To support the feature you may want to setup cron job to reload and unzip files from bluetack. Examples <a
href="http://libtorrent.rakshasa.no/ticket/239#comment:26" rel="nofollow" >here</a> and <a
href="http://pastebin.com/jLqT3qxL" rel="nofollow" >here</a>.</p></blockquote><p><strong>GeoIP</strong></p><blockquote><p>In the Peers view of each torrent a new column - CC, country code - is added, which shows peer's country code. When examining each peer, you will see more data from the GeoIP database (if you have the relevant files installed): AS num and city. At the very least, you need to have <strong>geoip-database</strong> installed. You can get free "lite" versions of <a
href="http://www.maxmind.com/app/geolitecity" rel="nofollow" >city</a>/<a
href="http://geolite.maxmind.com/download/geoip/database/asnum/" rel="nofollow" >AS</a>-databases, rename them (removing "lite") and put into an appropriate location to make rtorrent+geoip use them as well. Geop-isp data support isn't integrated into this rtorrent package.</p></blockquote><p><strong>Colours</strong></p><blockquote><p>This patch somewhat changes the way rtorrent shows torrents. Seeding torrents have bold titles, there are no half-displayed torrents at the top/bottom when scrolling, and you can configure colours for active/done torrents (ticket libtorrent.rakshasa.no/ticket/1382, which seems to be gone now). Source code and testing hint at these configurable colours: <em>done_fg_color, done_bg_color, active_fg_color, active_bg_color</em>, and at these possible values: 1 (red), 2 (green), 3 (yellow).</p></blockquote><p><strong>Geek's cellar</strong><br
/> A related (though not used in any way for the preparation of the package) resource is <a
href="https://calomel.org/rtorrent_mods.html" rel="nofollow" >rtorrent mods page</a>.</p><p>Relatively schematically, applying patches and building the package was performed in these steps (starting within some newly-created directory):</p><ol><li>sudo aptitude install cdbs devscripts [and whatever else you find you're missing]</li><li>apt-get source rtorrent</li><li>dpkg-source -x rtorrent_0.8.6-1.dsc</li><li>cd rtorrent-0.8.6</li><li>cdbs-edit-patch 01-ipfilter.patch</li><li>patch -p1 < /path/to/patch/239</li><li>exit 0</li><li>cdbs-edit-patch 02-geoip.patch</li><li>patch -p1 < /path/to/patch/2064-after-ipfilter</li><li>exit 0</li><li>cdbs-edit-patch 03-eyecandy.patch</li><li>patch -p1 < /path/to/patch/2171-mod-with-canvas</li><li>exit 0 [you could do all 3 patches together, but I prefer cleaner and manageable approaches]</li><li>[some weird operation to be explained below]</li><li>dpkg-buildpackage</li></ol><p>Weird operation: I didn't know how to make dpkg-buildpackage run autorun.sh (which is required for one of the patches I've used) before configure (could someone enlighten me how to do that?), so I started a new patch with cdbs-edit-patch, then ran one by one `autoreconf -if`, `./autorun.sh`, `./configure`, exited with zero status and was done with that problem. The resulting "patch" was 2MB large <img
src='http://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p> ]]></content:encoded> <wfw:commentRss>http://bogdan.org.ua/2011/04/01/rtorrent-enhanced-with-ipfilter-and-geoip-debian-squeeze-amd64-package.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Introduction to Python for bioinformatics</title><link>http://bogdan.org.ua/2011/02/25/introduction-to-python-for-bioinformatics.html</link> <comments>http://bogdan.org.ua/2011/02/25/introduction-to-python-for-bioinformatics.html#comments</comments> <pubDate>Fri, 25 Feb 2011 12:03:55 +0000</pubDate> <dc:creator>Bogdan</dc:creator> <category><![CDATA[Bioinformatics]]></category> <category><![CDATA[Links]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[Software]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1451</guid> <description><![CDATA[This overview presentation is two years old, but still a highly valuable resource: modules and tools mentioned are alive and useful. I think this is the second presentation by Giovanni I'm embedding (first one being about GNU/make for bioinformatics). Introduction to python for bioinformatics]]></description> <content:encoded><![CDATA[<p>This overview presentation is two years old, but still a highly valuable resource: modules and tools mentioned are alive and useful.<br
/> I think this is the second presentation by Giovanni I'm embedding (first one being about GNU/make for bioinformatics).</p><div
style="width:425px" id="__ss_1320208"><strong
style="display:block;margin:12px 0 4px"><a
href="http://www.slideshare.net/giovanni/introduction-to-python-for-bioinformatics" rel="nofollow"  title="Introduction to python for bioinformatics">Introduction to python for bioinformatics</a></strong><object
id="__sse1320208" width="425" height="355"><param
name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=introduction-090421044444-phpapp02&#038;stripped_title=introduction-to-python-for-bioinformatics&#038;userName=giovanni" /><param
name="allowFullScreen" value="true"/><param
name="allowScriptAccess" value="always"/><embed
name="__sse1320208" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=introduction-090421044444-phpapp02&#038;stripped_title=introduction-to-python-for-bioinformatics&#038;userName=giovanni" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object></div> ]]></content:encoded> <wfw:commentRss>http://bogdan.org.ua/2011/02/25/introduction-to-python-for-bioinformatics.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>How to easily install any PyPi/easy_install python module on Debian</title><link>http://bogdan.org.ua/2011/02/16/how-to-easily-install-any-pypi-easy_install-python-module-on-debian.html</link> <comments>http://bogdan.org.ua/2011/02/16/how-to-easily-install-any-pypi-easy_install-python-module-on-debian.html#comments</comments> <pubDate>Wed, 16 Feb 2011 17:22:20 +0000</pubDate> <dc:creator>Bogdan</dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[Notepad]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[debianize]]></category> <category><![CDATA[easy_install]]></category> <category><![CDATA[pycassa]]></category> <category><![CDATA[PyPi]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1430</guid> <description><![CDATA[Imagine you need to install pycassa (which uses easy_install). Here are the 2 (at maximum) very simple steps to have it properly debianized and installed on your Debian/Ubuntu: if you don't have the python-stdeb package: sudo aptitude install python-stdeb pypi-install pycassa That's it. Refer to stdeb readme for more information. You will need that if [...]]]></description> <content:encoded><![CDATA[<p>Imagine you need to install <a
href="https://github.com/pycassa/pycassa" rel="nofollow" >pycassa</a> (which uses easy_install). Here are the 2 (at maximum) very simple steps to have it properly debianized and installed on your Debian/Ubuntu:</p><ul><li>if you don't have the python-stdeb package: <strong>sudo aptitude install python-stdeb</strong></li><li><strong>pypi-install pycassa</strong></li></ul><p>That's it.</p><p>Refer to <a
href="https://github.com/astraw/stdeb#readme" rel="nofollow" >stdeb readme</a> for more information. You will need that if there are dependencies - which might not be resolved automatically by stdeb.</p><p>Before stdeb, it wasn't exactly trivial to <a
href="http://showmedo.com/videotutorials/video?name=linuxJensMakingDeb" rel="nofollow" >make a .deb from python module</a>.</p> ]]></content:encoded> <wfw:commentRss>http://bogdan.org.ua/2011/02/16/how-to-easily-install-any-pypi-easy_install-python-module-on-debian.html/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>MySQL as NoSQL with HandlerSocket: 750000 qps</title><link>http://bogdan.org.ua/2011/01/25/mysql-as-nosql-with-handlersocket-750000-qps.html</link> <comments>http://bogdan.org.ua/2011/01/25/mysql-as-nosql-with-handlersocket-750000-qps.html#comments</comments> <pubDate>Tue, 25 Jan 2011 16:36:11 +0000</pubDate> <dc:creator>Bogdan</dc:creator> <category><![CDATA[Links]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[HandlerSocket]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[NoSQL]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1348</guid> <description><![CDATA[HandlerSocket provides a direct access to InnoDB storage, bypassing SQL interpretation layer. With in-RAM data, it may raise MySQL performance to 750000 queries per second.]]></description> <content:encoded><![CDATA[<p>HandlerSocket provides a direct access to InnoDB storage, bypassing SQL interpretation layer. With in-RAM data, it may <a
href="http://yoshinorimatsunobu.blogspot.com/2010/10/using-mysql-as-nosql-story-for.html" rel="nofollow" >raise MySQL performance to 750000 queries per second</a>.</p><p><a
href="http://bogdan.org.ua/wp-content/uploads/2011/01/mysql_handlersocket.png"><img
src="http://bogdan.org.ua/wp-content/uploads/2011/01/mysql_handlersocket-500x299.png" alt="" title="mysql_handlersocket" width="500" height="299" class="alignleft size-medium wp-image-1351" /></a></p> ]]></content:encoded> <wfw:commentRss>http://bogdan.org.ua/2011/01/25/mysql-as-nosql-with-handlersocket-750000-qps.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Light web-based collaborative project management tools</title><link>http://bogdan.org.ua/2011/01/10/light-web-based-collaborative-project-management-tools.html</link> <comments>http://bogdan.org.ua/2011/01/10/light-web-based-collaborative-project-management-tools.html#comments</comments> <pubDate>Mon, 10 Jan 2011 15:47:55 +0000</pubDate> <dc:creator>Bogdan</dc:creator> <category><![CDATA[Links]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[basecamp]]></category> <category><![CDATA[codebase]]></category> <category><![CDATA[collaborative]]></category> <category><![CDATA[collabtive]]></category> <category><![CDATA[egroupware]]></category> <category><![CDATA[ofuz]]></category> <category><![CDATA[open atrium]]></category> <category><![CDATA[project management]]></category> <category><![CDATA[project-open]]></category> <category><![CDATA[projectfork]]></category> <category><![CDATA[projectpier]]></category> <category><![CDATA[railscollab]]></category> <category><![CDATA[redmine]]></category> <category><![CDATA[teambox]]></category> <category><![CDATA[todoist]]></category> <category><![CDATA[web-based]]></category> <category><![CDATA[wedoist]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1248</guid> <description><![CDATA[Updated on the 5th of March, 2010 (added flowdock and pivotal tracker, and also personal experience using a few of the previously described tools). Back in 2007 I wrote a brief review of web-based project management tools. After that, I started using dotProject for personal projects management. I'm still using it, but for collaborative project [...]]]></description> <content:encoded><![CDATA[<p><ins
datetime="2011-03-05T13:19:28+00:00">Updated</ins> on the 5th of March, 2010 (added flowdock and pivotal tracker, and also personal experience using a few of the previously described tools).</p><p>Back in 2007 I wrote a <a
href="http://bogdan.org.ua/2007/01/21/project-management-software.html">brief review of web-based project management tools</a>. After that, I <a
href="http://bogdan.org.ua/2007/02/02/dotproject-first-impressions.html">started using dotProject</a> for personal projects management. I'm still using it, but for collaborative project management, communication, and tasks/milestones tracking dotProject isn't perfect.</p><p>I need a tool, which is</p><ul><li>collaborative</li><li>web-based (to allow effective collaboration)</li><li>preferably free</li><li>has concise per-project activity log</li><li>minimal required functionality: tasks, milestones, files, and status updates.</li></ul><p>After trying a few things, our small team settled for now on using github + <del
datetime="2011-08-12T12:41:21+00:00">pivotaltracker</del> jira + confluence + flowdock.</p><p>Here's a full list of tools briefly reviewed. I've been already using ProjectPier, so I'll start with this software.<br
/> <span
id="more-1248"></span><br
/> <a
href="http://www.projectpier.org/" rel="nofollow" >ProjectPier</a> (used myself)</p><ul><li>dashboard: all events log</li><li>interface similar to Basecamp; themable/skinnable</li><li>all the basic features are there (milestones, tasks, task lists, messages, files)</li><li>modular (functionality is in plugins)</li><li>easy to install (requires PHP and MySQL)</li><li>is being maintained/developed (maybe slowly, but that doesn't mean much)</li></ul><p>Not much to add. Simple, functional, worked good for a 1-person "team" (that is, for personal projects management). Have no idea how it scales to more people.</p><p><a
href="http://collabtive.o-dyn.de/" rel="nofollow" >Collabtive</a></p><ul><li>desktop: just an overview, no log of events; project view has 'activities' log</li><li>[too much?] eye-candy, JS-reach default interface (themable/skinnable)</li><li>projects, tasks, milestones, messages, files</li><li>calendar, time tracking</li><li>is being maintained/developed</li></ul><p><a
href="http://openatrium.com/" rel="nofollow" >Open Atrium</a></p><ul><li>Drupal-based, thus probably the most flexible (but requires time investments to change functionality)</li><li>6 features: blog, wiki, calendar, to-do list, shoutbox, and a dashboard to manage it all</li><li>has "recent activity" log</li><li>issues tracking</li><li>I guess it is heavier than others in use patterns: requires more clicking and typing (as it has more features), and there seem to be no concepts of milestones and projects - just tasks</li></ul><p><a
href="http://projectfork.net/" rel="nofollow" >Projectfork</a></p><ul><li>possibly Joomla-based</li><li>free, with commercial add-ons, themes, and maybe support</li><li>projects, milestones, tasks with priorities, files</li><li>calendar, discussion board, time tracking</li><li>activity stream (premium add-on)</li></ul><p><a
href="http://www.egroupware.org/" rel="nofollow" >EGroupware</a></p><ul><li>hosted, commercial</li><li>free community version is available for download</li><li>projects, tasks, sub-tasks, files</li><li>address book, calendar, chat, issue tracking system, time tracking</li><li>knowledge base, wiki</li><li>news, polls</li><li>interface seems very responsive (JS-reach)</li><li>large, feature-reach: might be an overkill where basecamp would do just fine</li><li>actively developed</li></ul><p><a
href="http://www.project-open.com/" rel="nofollow" >]project-open[</a></p><ul><li>not reviewed: seems even more feature-reach (complicated) than EGroupware</li></ul><p><a
href="http://www.redmine.org/" rel="nofollow" >Redmine</a></p><ul><li>doesn't seem to use "milestone" and "task" concepts</li><li>issue tracking, gantt charts, calendar, time tracking</li><li>wiki, files, forums, roadmap (similar to trac)</li><li>repository browser (among others, git and svn are supported)</li><li>is maintained/developed</li></ul><p><a
href="http://www.codebasehq.com/" rel="nofollow" >Codebase</a></p><ul><li>non-free</li><li>issue tracker for git/mercurial/others with project management features</li><li>wiki, time tracking, milestones, files</li></ul><p><a
href="http://www.ofuz.com/opensource/" rel="nofollow" >Ofuz</a></p><ul><li>paid hosted version (free up to 5 projects), free version available for download</li><li>contacts, time tracking, invoices</li><li>projects, tasks, documents, files</li><li>tight email integration (e.g. continue discussions by email, with replies logged to Ofuz)</li></ul><p><a
href="http://rubyforge.org/projects/railscollab/" rel="nofollow" >RailsCollab</a></p><ul><li>activecollab-inspired, ProjectPier-based Ruby software</li><li>interface (and features) very similar to ProjectPier</li><li>tasks and task lists, milestones, files, messages</li><li>time-tracking</li><li>development/maintenance stalled in Feb 2010</li></ul><p><a
href="https://teambox.com/?rf=135452" rel="nofollow" >Teambox</a> (used myself)</p><ul><li>hosted service (free up to 3 projects), community edition available for download; RoR-based</li><li><em>free plan has search disabled</em></li><li>projects, tasks, task lists, files</li><li>dashboard</li><li>pages/wiki/writeboard, discussions</li><li>gantt charts, calendar, twitter-like status updates, time-tracking</li><li>light interface</li><li>clients for mobile devices</li><li>email notifications and email-to-web functionality</li></ul><p>Seems best for conversations-oriented projects. A few times posted updates took lots of time to become visible to other team members (far not immediate, so comparison to twitter does not give the right idea), and page refreshes (even forced) didn't help. Tasks system is basically an extension of conversations: once you created a task, you can only "extend" it with comments, but not edit. Personally, I found the tasks implementation too awkward to use - it might be different for writing-related projects. I liked the Pages functionality: it provides a good (easy and quick) way of organizing information accumulated by the project. Basically, we ended up using Teambox as a repository for external and internal documentation - but not for status updates, chats or planning.</p><p>As free time permits, I would love to compile a feature table, comparing all these tools, together with subjective "easy-of-use" scores (maybe collected with a poll of some kind). Any contributions towards this simple goal are welcome. If comments fail to work for you - use the <a
href="/contact" rel="nofollow" >contact</a> page.</p><p>A few more related web-tools follow.</p><p><a
href="http://pivotaltracker.com/" rel="nofollow" >Pivotal Tracker</a> (currently using)</p><ul><li>agile projects management</li><li>concepts: icebox, backlog, current, done</li><li>has: features, bugs, chores, releases; each of these can have description, comments and short tasks (all very easy to add and organize)</li><li>features can have their complexity estimated in points, which are then used to calculate weekly team velocity, and also to move tasks from the backlog panel into current panel</li></ul><p>I'm new to agile development tools, and after getting used to it - Pivotal Tracker is good. It is also useful as a place to keep the things you would like to <em>eventually</em> implement - just append these to the end of the icebox, and then start-move to backlog/current when determined to implement.</p><p><a
href="http://flowdock.com/" rel="nofollow" >Flowdock</a> (currently using)</p><ul><li>web-chat with history saved as an infinite scrollable page</li><li>has a concept of "flows" (similar to chat rooms in campfire)</li><li>tags (tab-autocomplete possible when writing messages); can be added/removed to/from existing entries</li><li>files can be inserted directly into chat stream</li><li>separate views for posted URLs and files</li><li>full-text search (a recent feature), and search by tags</li><li>mobile device support (haven't tried)</li><li>various desktop notification tools for all platforms (Linux, Mac, Windows); has minimally-configurable sound notifications</li><li>tracks online/idle/offline statuses (e.g. <em>idle for X hours</em> or <em>offline for Y hours</em>)</li><li>mails can be sent to a flow, and they can have tags</li><li>Influx: an aggregator of external events (github, twitter, RSS, mails, PivotalTracker, Confluence and others)</li></ul><p>Flowdock is just... convenient. After trying teambox, present.ly and campfire, we seem to have settled on this one for in-project communication (our team currently has only 3 people, though). The most convenient feature is probably the built-in aggregator.</p><p><a
href="http://wedoist.com/" rel="nofollow" >WeDoist</a></p><ul><li>collaborative to-do lists</li><li>tasks (maybe also sub-tasks), status updates, group chat</li><li>hosted solution</li></ul><p><a
href="http://todoist.com/" rel="nofollow" >ToDoist</a></p><ul><li>1-person projects, tasks, sub-tasks</li><li>hosted solution</li><li>opera widget at http://widgets.opera.com/widget/15372/</li></ul><p><a
href="http://slimtimer.com/" rel="nofollow" >SlimTimer</a> (using this one)</p><ul><li>simple (perfect? <img
src='http://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ) tasks-based timetracker with nice reports feature</li><li>hosted solution, has free plan</li></ul><p><a
href="http://present.ly/" rel="nofollow" class="broken_link">Present.ly</a> (used myself, would use again)</p><ul><li>"corporate twitter"</li><li>hash-tags autocompletion</li><li>files can be attached</li><li>"attach text" - when 140 symbols is not enough</li><li>direct messaging and replies; replies can be viewed in threaded mode</li><li>mobile devices support (haven't tried)</li><li>configurable email alerts</li><li>concepts helping organize data: topics, feeds, tags</li><li>separate views for files and links to find them faster</li></ul><p>Overall, present.ly is very cool for within-team status updates - that is, to keep track of what anybody's doing.</p><p><a
href="http://present.ly/" rel="nofollow" class="broken_link">Campfire</a> (used myself)</p><ul><li>web-chat with "rooms" (e.g. by topic, by department etc)</li><li>each day is saved as a transcript of chats</li><li>files can be attached directly within the chat flow</li><li>full-text searchable</li><li>free use tier implies chat-stream embedded ads (can be removed with adblock+ and element hiding helper)</li><li>can be configured to track external resources (e.g. github commits), though those do not look as good as in flowdock</li></ul><p>Overall, campfire is a nice chat. The best thing they have is the event sound - probably the best I've heard.</p><p>Finally, nice mantra (except for the very last phrase) from ToDoist - "The Zen of Todoist":</p><blockquote><p>Now is better than later.<br
/> Later is better than never.<br
/> Organized is better than messy.<br
/> Big things are composed by smaller things.<br
/> Smaller things are done by action.<br
/> Think like a person of action.<br
/> Act like a person of thought.<br
/> The beginning is half of every action.<br
/> The longest journey starts with the first step.<br
/> Everything should be made as simple as possible.<br
/> But not simpler.<br
/> Celebrate any progress.<br
/> Don't wait to get perfect.<br
/> Deadlines and stress are a part of life.</p></blockquote> ]]></content:encoded> <wfw:commentRss>http://bogdan.org.ua/2011/01/10/light-web-based-collaborative-project-management-tools.html/feed</wfw:commentRss> <slash:comments>8</slash:comments> </item> <item><title>Microsoft&#8217;s perspective on OpenOffice.org</title><link>http://bogdan.org.ua/2010/12/26/microsofts-perspective-on-openoffice-org.html</link> <comments>http://bogdan.org.ua/2010/12/26/microsofts-perspective-on-openoffice-org.html#comments</comments> <pubDate>Sun, 26 Dec 2010 10:37:21 +0000</pubDate> <dc:creator>Bogdan</dc:creator> <category><![CDATA[Misc]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[microsoft]]></category> <category><![CDATA[ms office]]></category> <category><![CDATA[openoffice.org]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1231</guid> <description><![CDATA[On the 24th of September 2010 Microsoft posted a video showcase titled "A few perspectives on OpenOffice.org". Here's the page with the video: http://www.microsoft.com/showcase/en/US/details/faaf9eb8-77c6-4bed-bc08-c069a7bfbb04. It asks to install silverlight, and if you don't want that - look for the Watch as WMV direct videostream link. Just a single quote from Glyn Moody, Computerworld UK: The [...]]]></description> <content:encoded><![CDATA[<p>On the 24th of September 2010 Microsoft posted a video showcase titled "A few perspectives on OpenOffice.org". Here's the page with the video: <a
href="http://www.microsoft.com/showcase/en/US/details/faaf9eb8-77c6-4bed-bc08-c069a7bfbb04" rel="nofollow" >http://www.microsoft.com/showcase/en/US/details/faaf9eb8-77c6-4bed-bc08-c069a7bfbb04</a>. It asks to install silverlight, and if you don't want that - look for the <a
href="mms://msnvidweb.wmod.msecnd.net/a10026/e1/ds/us/CMG_US/CMG_Microsoft/9e361baf-9952-4d5e-9a9a-4b0bd0179d8d.wmv" rel="nofollow" >Watch as WMV</a> direct videostream link.</p><p>Just a single quote from <a
href="http://blogs.computerworlduk.com/open-enterprise/2010/10/microsoft-gives-its-blessing-to-openofficeorg/index.htm" rel="nofollow" >Glyn Moody</a>, Computerworld UK:</p><blockquote><p>The criticisms made in the video are not really the point - they are mostly about OpenOffice.org not being a 100% clone of Microsoft Office, and compatibility problems with Microsoft's proprietary formats. The key issue is the exactly the same as it was for the Mindcraft benchmarks. You don't compare a rival's product with your own if it is not comparable. And you don't make this kind of attack video unless you are really, really worried about the growing success of a competitor.</p></blockquote><p>See also what <a
href="http://www.infoworld.com/d/open-source/microsofts-fake-validation-openofficeorg-805" rel="nofollow" >Savio Rodriguez</a> (Infoworld) has to say about that video.</p> ]]></content:encoded> <wfw:commentRss>http://bogdan.org.ua/2010/12/26/microsofts-perspective-on-openoffice-org.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>How to relay outgoing postfix emails via another mail server (e.g. your ISP)</title><link>http://bogdan.org.ua/2010/12/04/how-to-relay-outgoing-postfix-emails-via-another-mail-server-isp-gmail.html</link> <comments>http://bogdan.org.ua/2010/12/04/how-to-relay-outgoing-postfix-emails-via-another-mail-server-isp-gmail.html#comments</comments> <pubDate>Sat, 04 Dec 2010 18:01:37 +0000</pubDate> <dc:creator>Bogdan</dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[Links]]></category> <category><![CDATA[Notepad]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[postfix]]></category> <category><![CDATA[relay]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1218</guid> <description><![CDATA[Here's a simple and clear guide for gmail, which also definitely works with other relay hosts. I've used it to configure my ISP's mail relay (they block outgoing port 25) on a Debian Squeeze laptop.]]></description> <content:encoded><![CDATA[<p>Here's a <a
href="http://ubuntu-tutorials.com/2008/11/11/relaying-postfix-smtp-via-smtpgmailcom/" rel="nofollow" >simple and clear guide for gmail</a>, which also definitely works with other relay hosts. I've used it to configure my ISP's mail relay (they block outgoing port 25) on a Debian Squeeze laptop.</p> ]]></content:encoded> <wfw:commentRss>http://bogdan.org.ua/2010/12/04/how-to-relay-outgoing-postfix-emails-via-another-mail-server-isp-gmail.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>How to replace newlines with commas, tabs etc (merge lines)</title><link>http://bogdan.org.ua/2010/11/16/how-to-replace-newlines-with-commas-tabs-etc-merge-lines.html</link> <comments>http://bogdan.org.ua/2010/11/16/how-to-replace-newlines-with-commas-tabs-etc-merge-lines.html#comments</comments> <pubDate>Tue, 16 Nov 2010 08:20:45 +0000</pubDate> <dc:creator>Bogdan</dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[Bioinformatics]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[Notepad]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[awk]]></category> <category><![CDATA[grep]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[paste]]></category> <category><![CDATA[sed]]></category> <category><![CDATA[sort]]></category> <category><![CDATA[tr]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1208</guid> <description><![CDATA[Imagine you need to get a few lines from a group of files with missing identifier mappings. I have a bunch of files with content similar to this one: ENSRNOG00000018677 1368832_at 25233 ENSRNOG00000002079 1369102_at 25272 ENSRNOG00000043451 25353 ENSRNOG00000001527 1388013_at 25408 ENSRNOG00000007390 1389538_at 25493 In the example above I need '25353', which does not have corresponding [...]]]></description> <content:encoded><![CDATA[<p>Imagine you need to get a few lines from a group of files with missing identifier mappings. I have a bunch of files with content similar to this one:</p><blockquote><p> ENSRNOG00000018677      1368832_at      25233<br
/> ENSRNOG00000002079      1369102_at      25272<br
/> ENSRNOG00000043451                            25353<br
/> ENSRNOG00000001527      1388013_at      25408<br
/> ENSRNOG00000007390      1389538_at      25493</p></blockquote><p>In the example above I need '25353', which does not have corresponding affy_probeset_id in the 2nd column.</p><p>It is clear how to do that:</p><div
class="igBar"><span
id="lcode-13"><a
href="#" rel="nofollow"  onclick="javascript:showPlainTxt('code-13'); return false;">PLAIN TEXT</a></span></div><div
class="syntax_hilite"><span
class="langName">CODE:</span><div
id="code-13"><div
class="code"><ol><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">sort -u *_affy_ensembl.<span
style="">txt</span> | grep -v <span
style="color:#CC0000;">'_at'</span> | awk <span
style="color:#CC0000;">'{print $2}'</span></div></li></ol></div></div></div><p></p><p>This outputs a column of required IDs (EntrezGene in this example):</p><blockquote><p> 116720<br
/> 679845<br
/> 309295<br
/> 364867<br
/> 298220<br
/> 298221<br
/> 25353</p></blockquote><p>However, I need these IDs as a comma-separated list, not as newline-separated list.</p><p>There are several ways to achieve the desired result (only the last pipe commands differ):</p><div
class="igBar"><span
id="lcode-14"><a
href="#" rel="nofollow"  onclick="javascript:showPlainTxt('code-14'); return false;">PLAIN TEXT</a></span></div><div
class="syntax_hilite"><span
class="langName">CODE:</span><div
id="code-14"><div
class="code"><ol><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">sort -u *_affy_ensembl.<span
style="">txt</span> | grep -v <span
style="color:#CC0000;">'_at'</span> | awk <span
style="color:#CC0000;">'{print $2}'</span> | gawk <span
style="color:#CC0000;">'$1=$1'</span> ORS=<span
style="color:#CC0000;">', '</span></div></li></ol></div></div></div><p></p><div
class="igBar"><span
id="lcode-15"><a
href="#" rel="nofollow"  onclick="javascript:showPlainTxt('code-15'); return false;">PLAIN TEXT</a></span></div><div
class="syntax_hilite"><span
class="langName">CODE:</span><div
id="code-15"><div
class="code"><ol><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">sort -u *_affy_ensembl.<span
style="">txt</span> | grep -v <span
style="color:#CC0000;">'_at'</span> | awk <span
style="color:#CC0000;">'{print $2}'</span> | tr <span
style="color:#CC0000;">'<span
style="color:#000099; font-weight:bold;">\n</span>'</span> <span
style="color:#CC0000;">','</span></div></li></ol></div></div></div><p></p><div
class="igBar"><span
id="lcode-16"><a
href="#" rel="nofollow"  onclick="javascript:showPlainTxt('code-16'); return false;">PLAIN TEXT</a></span></div><div
class="syntax_hilite"><span
class="langName">CODE:</span><div
id="code-16"><div
class="code"><ol><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">sort -u *_affy_ensembl.<span
style="">txt</span> | grep -v <span
style="color:#CC0000;">'_at'</span> | awk <span
style="color:#CC0000;">'{print $2}'</span> | sed <span
style="color:#CC0000;">':a;N;$!ba;s/<span
style="color:#000099; font-weight:bold;">\n</span>/, /g'</span></div></li></ol></div></div></div><p></p><div
class="igBar"><span
id="lcode-17"><a
href="#" rel="nofollow"  onclick="javascript:showPlainTxt('code-17'); return false;">PLAIN TEXT</a></span></div><div
class="syntax_hilite"><span
class="langName">CODE:</span><div
id="code-17"><div
class="code"><ol><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">sort -u *_affy_ensembl.<span
style="">txt</span> | grep -v <span
style="color:#CC0000;">'_at'</span> | awk <span
style="color:#CC0000;">'{print $2}'</span> | sed <span
style="color:#CC0000;">':q;N;s/<span
style="color:#000099; font-weight:bold;">\n</span>/, /g;t q'</span></div></li></ol></div></div></div><p></p><div
class="igBar"><span
id="lcode-18"><a
href="#" rel="nofollow"  onclick="javascript:showPlainTxt('code-18'); return false;">PLAIN TEXT</a></span></div><div
class="syntax_hilite"><span
class="langName">CODE:</span><div
id="code-18"><div
class="code"><ol><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">sort -u *_affy_ensembl.<span
style="">txt</span> | grep -v <span
style="color:#CC0000;">'_at'</span> | awk <span
style="color:#CC0000;">'{print $2}'</span> | paste -s -d <span
style="color:#CC0000;">","</span></div></li></ol></div></div></div><p></p><p>These solutions differ in efficiency and (slightly) in output. <strong>sed</strong> will read all the input into its buffer to replace newlines with other separators, so it might not be best for large files. <strong>tr</strong> might be the most efficient, but I haven't tested that. <strong>paste</strong> will re-use delimiters, so you cannot really get comma-space ", " separation with it.</p><p>Sources: <a
href="http://www.linuxquestions.org/questions/programming-9/sed-how-do-you-replace-end-of-line-with-a-space-637013/" rel="nofollow" >linuxquestions 1 (explains used sed commands)</a>, <a
href="http://www.linuxquestions.org/questions/programming-9/merge-lines-in-a-file-using-sed-191121/" rel="nofollow" >linuxquestions 2</a>, <a
href="http://www.cyberciti.biz/faq/linux-unix-sed-replace-newline/" rel="nofollow" >nixcraft</a>.</p> ]]></content:encoded> <wfw:commentRss>http://bogdan.org.ua/2010/11/16/how-to-replace-newlines-with-commas-tabs-etc-merge-lines.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>How to record Skype calls on Linux: use free Skype Call Recorder</title><link>http://bogdan.org.ua/2010/11/11/how-to-record-skype-calls-on-linux-use-free-skype-call-recorder.html</link> <comments>http://bogdan.org.ua/2010/11/11/how-to-record-skype-calls-on-linux-use-free-skype-call-recorder.html#comments</comments> <pubDate>Thu, 11 Nov 2010 13:06:53 +0000</pubDate> <dc:creator>Bogdan</dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[Links]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[skype]]></category> <category><![CDATA[skype call recorder]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1205</guid> <description><![CDATA[Just came across Skype Call Recorder - an awesome in its functionality+simplicity tool to record skype calls. Highly recommended! It worked immediately for me, and default settings are good enough not to bother tweaking. Well, I know that because I did tweak a few to get more nerdiness, but normal people don't need that. SCR [...]]]></description> <content:encoded><![CDATA[<p>Just came across <a
href="http://atdot.ch/scr/" rel="nofollow" >Skype Call Recorder</a> - an awesome in its functionality+simplicity tool to record skype calls. Highly recommended!</p><p>It worked immediately for me, and default settings are good enough not to bother tweaking. Well, I know that because I did tweak a few to get more nerdiness, but normal people don't need that.</p><p><a
href="http://atdot.ch/scr/download/" rel="nofollow" >SCR download page</a> has packages for Ubuntu, Debian/i386, Xandros, RPM-based distributions, Gentoo - and as its free, you can of course just use the <del
datetime="2010-11-11T12:48:13+00:00">f</del>source<del
datetime="2010-11-11T12:48:13+00:00">, Luke</del>!</p><p>At the time of writing, a package for Debian/amd64 was not available, but it is really easy to build one.<br
/> Here's mine: <a
href="http://bogdan.org.ua/wp-content/uploads/2010/11/skype-call-recorder-debian_0.8_amd64.deb">skype-call-recorder-debian_0.8_amd64.deb</a></p> ]]></content:encoded> <wfw:commentRss>http://bogdan.org.ua/2010/11/11/how-to-record-skype-calls-on-linux-use-free-skype-call-recorder.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Overlaying gene expression data onto pathways from databases</title><link>http://bogdan.org.ua/2010/11/05/overlaying-gene-expression-data-onto-pathways-from-databases.html</link> <comments>http://bogdan.org.ua/2010/11/05/overlaying-gene-expression-data-onto-pathways-from-databases.html#comments</comments> <pubDate>Fri, 05 Nov 2010 13:20:06 +0000</pubDate> <dc:creator>Bogdan</dc:creator> <category><![CDATA[Bioinformatics]]></category> <category><![CDATA[Links]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[biocarta]]></category> <category><![CDATA[data]]></category> <category><![CDATA[expression]]></category> <category><![CDATA[genmapp]]></category> <category><![CDATA[KEGG]]></category> <category><![CDATA[microarray]]></category> <category><![CDATA[pathvisio]]></category> <category><![CDATA[pathway]]></category> <category><![CDATA[pathway explorer]]></category> <category><![CDATA[wikipathways]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1174</guid> <description><![CDATA[Superimposing gene expression data onto pathways from databases is a common task in the final steps of microarray data analysis - that is, biological interpretation and results discussion. I have found many tools which claim to facilitate this procedure. Some of them are reviewed below (in no specific order). Pathway Explorer by Bernhard Mlecnik was [...]]]></description> <content:encoded><![CDATA[<p>Superimposing gene expression data onto pathways from databases is a common task in the final steps of microarray data analysis - that is, biological interpretation and results discussion.</p><p>I have found many tools which claim to facilitate this procedure. Some of them are reviewed below (in no specific order).<br
/> <span
id="more-1174"></span><br
/> <a
href="https://pathwayexplorer.genome.tugraz.at/" rel="nofollow" >Pathway Explorer</a> by Bernhard Mlecnik was last updated in 2007, but is fully functional (I believe it is being maintained without changes to the last-updated date). Both online and downloadable Java applications are available. Note that for downloadable application you will need to obtain a license key - the procedure is well documented and was very fast for me.<br
/> <a
href="http://bogdan.org.ua/wp-content/uploads/2010/11/pe.png"><img
src="http://bogdan.org.ua/wp-content/uploads/2010/11/pe-500x371.png" alt="" title="Pathway Explorer" width="500" height="371" class="aligncenter size-medium wp-image-1176" /></a><br
/> Pathway Explorer supports import from 3 sources: KEGG xml files, biocarta URLs, and GenMAPP URLs. Import from KEGG does work as described in the short manual, and seems functional (I had some problems exporting/saving the resulting picture, but didn't investigate further). Biocarta import seems to work, but for some reason does not display expression levels of pathway components. I could not test the import of GenMAPP pathways, because they are not available online.</p><p>I found Pathway Explorer good, but then switched to PathVisio (reviewed next), because for some reason Зathway Explorer was recognising only a small fraction of genes from my expression data. It could be that identifiers mappings are outdated, but this is just a guess.</p><p><a
href="http://www.pathvisio.org/" rel="nofollow" >PathVisio</a> appears to be a spin-off of <a
href="http://www.genmapp.org/" rel="nofollow" >GenMAPP</a> and <a
href="http://www.wikipathways.org/" rel="nofollow" >WikiPathways</a>. It excells at importing/visualizing WikiPathways data, which even comes bundled with PathVisio Java application. It is easier to use than Pathway Explorer, and it seems to recognize more genes (although still not all the genes which are present in the data). There is KEGG pathways support, but it is not always usable - many edges (links between genes/proteins) are absent, so instead of a pathway you get a bunch of nodes relevant to a pathway, but cannot really see how they are connected. PathVisio supports an insanely long list of database identifiers, so it is highly unlikely that you will have to map your data to use a different identifier. This pathway mapper exports to several formats, including PNG and PDF.</p><p><a
href="http://bogdan.org.ua/wp-content/uploads/2010/11/pv.png"><img
src="http://bogdan.org.ua/wp-content/uploads/2010/11/pv-500x302.png" alt="" title="PathVisio" width="500" height="302" class="aligncenter size-medium wp-image-1181" /></a></p><p>I could not fully test <a
href="http://lbb.ut.ac.ir/projects/Affy2KEGG/WS/affy2keggWs.jsp" rel="nofollow" class="broken_link">AffyWEB</a>, because it doesn't list rat arrays we used. Trying their barley genome example did work, so the tool is probably functional. It overlays your expression data onto KEGG pathways.</p><p><a
href="http://bogdan.org.ua/wp-content/uploads/2010/11/map00030.png"><img
src="http://bogdan.org.ua/wp-content/uploads/2010/11/map00030-500x345.png" alt="" title="AffyWEB" width="500" height="345" class="aligncenter size-medium wp-image-1177" /></a></p><p><a
href="http://www.g-language.org/data/marray/software/map2swf.cgi " rel="nofollow" >G-language Microarray System</a> is a comparatively simple pathway visualizer. It accepts CSV files containing EntrezGene IDs column with a single column of expression values normalized to 1-100 range, fetches requested KEGG pathway, and generates a Flash (SWF) object depicting that pathway with coloured components. It does work with sample data. I was too lazy to normalize my expression data to [1;100] range, and SWF is not exactly a usable format, so I haven't tested this tool any further (you can right-click to zoom in the flash pathway below).<br
/> <object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
id="fm_ecj00010_265509479"
class="flashmovie"
width="500"
height="800"><param
name="movie" value="http://bogdan.org.ua/wp-content/uploads/2010/11/ecj00010.swf" /> <!--[if !IE]>--> <object
type="application/x-shockwave-flash"
data="http://bogdan.org.ua/wp-content/uploads/2010/11/ecj00010.swf"
name="fm_ecj00010_265509479"
width="500"
height="800"> <!--<![endif]--><p><a
href="http://adobe.com/go/getflashplayer" rel="nofollow" ><img
src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p> <!--[if !IE]>--> </object> <!--<![endif]--> </object><p>If time permits (or work requires) this post may be extended with the reviews of <a
href="http://www.genmapp.org/" rel="nofollow" >GenMAPP</a>, <a
href="http://gepat.sourceforge.net/screenshots.htm" rel="nofollow" >GEPAT</a>, <a
href="https://stat.ethz.ch/pipermail/bioconductor/2008-June/023112.html" rel="nofollow" >KEGG2heatmap script</a>, <a
href="http://akt.ucsf.edu/EGAN/downloads.php" rel="nofollow" >EGAN</a>, <a
href="http://mapman.gabipd.org/web/guest/mapman" rel="nofollow" >MapMan</a>, <a
href="http://bioinformatics.oxfordjournals.org/content/20/13/2156.abstract" rel="nofollow" >Pathway Miner</a>, <a
href="http://nar.oxfordjournals.org/content/32/suppl_2/W460.full" rel="nofollow" >ArrayXPath</a>, <a
href="http://nar.oxfordjournals.org/content/35/suppl_2/W625.full" rel="nofollow" >VisANT</a>, <a
href="http://www.win.tue.nl/~mwestenb/spotxplore/" rel="nofollow" >SpotXplore</a>, and maybe others.</p><p>Please comment to share your experience using pathway expression overlaying tools or to suggest other tools.</p> ]]></content:encoded> <wfw:commentRss>http://bogdan.org.ua/2010/11/05/overlaying-gene-expression-data-onto-pathways-from-databases.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>ask.debian.net: stackoverflow for Debian with Shapado</title><link>http://bogdan.org.ua/2010/10/19/ask-debian-net-stackoverflow-for-debian-with-shapado.html</link> <comments>http://bogdan.org.ua/2010/10/19/ask-debian-net-stackoverflow-for-debian-with-shapado.html#comments</comments> <pubDate>Mon, 18 Oct 2010 22:41:13 +0000</pubDate> <dc:creator>Bogdan</dc:creator> <category><![CDATA[Links]]></category> <category><![CDATA[Misc]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[shapado]]></category> <category><![CDATA[stackoverflow]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1158</guid> <description><![CDATA[ask.debian.net is a StackOverflow-like Q&#038;A website built with OSS Shapado. That's my first encounter of Shapado, so it was interesting to read Shapado authors' justification and a related question on meta.SO.]]></description> <content:encoded><![CDATA[<p><img
src="http://bogdan.org.ua/wp-content/uploads/2010/10/4b917d9519ce95468f00000b.png" alt="" title="ask.debian.net" width="140" height="60" class="alignleft size-full wp-image-1160" /><a
href="http://ask.debian.net/" rel="nofollow" >ask.debian.net</a> is a <a
href="http://stackoverflow.com/" rel="nofollow" >StackOverflow</a>-like Q&#038;A website built with OSS <a
href="http://shapado.com/" rel="nofollow" >Shapado</a>.</p><p>That's my first encounter of Shapado, so it was interesting to read Shapado authors' <a
href="http://blog.ricodigo.com/2009/9/27/shapado-a-foss-replacement-for-stackoverflow/shapado" rel="nofollow" class="broken_link">justification</a> and a related question on <a
href="http://meta.stackoverflow.com/questions/45988/will-a-clone-force-stack-overflow-to-open-source" rel="nofollow" >meta.SO</a>.</p> ]]></content:encoded> <wfw:commentRss>http://bogdan.org.ua/2010/10/19/ask-debian-net-stackoverflow-for-debian-with-shapado.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Installing DeadBeef music player on Debian</title><link>http://bogdan.org.ua/2010/10/16/installing-deadbeef-music-player-on-debian.html</link> <comments>http://bogdan.org.ua/2010/10/16/installing-deadbeef-music-player-on-debian.html#comments</comments> <pubDate>Sat, 16 Oct 2010 12:59:55 +0000</pubDate> <dc:creator>Bogdan</dc:creator> <category><![CDATA[Links]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[deadbeef]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[music]]></category> <category><![CDATA[player]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1148</guid> <description><![CDATA[In my previous post on CUE sheet support in Linux music players I mentioned DeaDBeeF. Unfortunately, DeaDBeeF is not yet available as a Debian package. Fortunately, Alexey Smirnov (the author of DeaDBeeF) maintains a github repository deadbeef-debian which has simple instructions on installing DeaDBeeF in Debian (citing with minor edits): 1) download deadbeef from sourceforge [...]]]></description> <content:encoded><![CDATA[<p>In my previous post on <a
href="http://bogdan.org.ua/2010/04/30/the-list-of-linux-music-players-with-cue-sheet-support.html">CUE sheet support in Linux music players</a> I mentioned <a
href="http://deadbeef.sourceforge.net/about.html" rel="nofollow" >DeaDBeeF</a>. Unfortunately, DeaDBeeF is not yet available as a Debian package.</p><p>Fortunately, <a
href="http://github.com/asv" rel="nofollow" >Alexey Smirnov</a> (the author of DeaDBeeF) maintains a github repository <a
href="http://github.com/asv/deadbeef-debian" rel="nofollow" >deadbeef-debian</a> which has simple instructions on installing DeaDBeeF in Debian (citing with minor edits):<span
id="more-1148"></span></p><blockquote><p> 1) <a
href="http://deadbeef.sourceforge.net/download.html" rel="nofollow" >download deadbeef</a> from sourceforge (<a
href="http://sourceforge.net/projects/deadbeef/files/deadbeef-0.4.2.tar.bz2/download" rel="nofollow" >0.4.2</a> as of the moment of writing)<br
/> 2) tar xvf deadbeef-X.Y.Z.tar.bz2<br
/> 3) $ cd deadbeef-X.Y.Z/<br
/> 4) $ git clone git://github.com/asv/deadbeef-debian.git debian<br
/> 5) $ dpkg-buildpackage -rfakeroot -us -uc -i -I".git"<br
/> 6) (install any dependencies reported by <strong>dpkg-checkbuilddeps</strong>, wait for the build to finish)<br
/> 7) $ sudo dpkg -i ../deadbeef_X.Y.Z-R_yourarch.deb<br
/> <img
src='http://bogdan.org.ua/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> Enjoy DeaDBeeF!</p></blockquote><p><strong>Hint</strong>: dpkg-buildpackage accepts -j<strong>NumJobs</strong> option for multi-core/multi-CPU systems.</p> ]]></content:encoded> <wfw:commentRss>http://bogdan.org.ua/2010/10/16/installing-deadbeef-music-player-on-debian.html/feed</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Linux server remote backup options</title><link>http://bogdan.org.ua/2010/10/03/linux-server-remote-backup-options.html</link> <comments>http://bogdan.org.ua/2010/10/03/linux-server-remote-backup-options.html#comments</comments> <pubDate>Sun, 03 Oct 2010 19:40:37 +0000</pubDate> <dc:creator>Bogdan</dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[Links]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[backup]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[dirvish]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[remote]]></category> <category><![CDATA[server]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1111</guid> <description><![CDATA[Recently I finally managed to configure remote (aka off-site) backup for my Debian server. As always, I started with a comparison of existing solutions. Debian has a number of packages enabling remote (over the network) backup: backupPC, backupninja, backup-manager, dirvish, duplicity, luckybackup, rdiff-backup, and some others. In my setup I wanted backups to be initiated [...]]]></description> <content:encoded><![CDATA[<p>Recently I finally managed to configure remote (aka <em>off-site</em>) backup for my Debian server. As always, I started with a comparison of existing solutions.</p><p>Debian has a number of packages enabling remote (over the network) backup: <a
href="http://packages.debian.org/en/lenny/backuppc" rel="nofollow" >backupPC</a>, <a
href="http://packages.debian.org/en/lenny/backupninja" rel="nofollow" >backupninja</a>, <a
href="http://packages.debian.org/en/lenny/backup-manager" rel="nofollow" >backup-manager</a>, <a
href="http://packages.debian.org/en/squeeze/dirvish" rel="nofollow" >dirvish</a>, <a
href="http://packages.debian.org/en/lenny/duplicity" rel="nofollow" >duplicity</a>, <a
href="http://packages.debian.org/en/squeeze/luckybackup" rel="nofollow" >luckybackup</a>, <a
href="http://packages.debian.org/lenny/rdiff-backup" rel="nofollow" >rdiff-backup</a>, and some others.</p><p><span
id="more-1111"></span>In my setup I wanted backups to be initiated by the external backup server (as opposed to <em>internal</em>, production server initiated backup). Also, I was going to backup linux server to another linux box. Thus, it would be preferable to have support for rsync on both boxes and hardlinks on the backup box. I needed backup to be run regularly, I didn't need any kind of GUI, and I would prefer to keep a bunch of older backups around (in case the most recent backup is of a compromised system, for example). Also, having an incremental backup of SQL databases was yet another requirement.</p><p>A few tools more or less matched my requirements: backupPC, duplicity, rdiff-backup, and dirvish.</p><p><a
href="http://backuppc.sourceforge.net/" rel="nofollow" >backupPC</a>, judging from its description and a few tutorial articles, is a cool piece of software. I think I might use it next time. But this time I really had no need for over-SMB backups (intended for Windows boxes), and no need for a nice administrative web-interface to backupPC. If not these extra features (which I don't currently need) I'd go for backupPC. Here's a <a
href="https://help.ubuntu.com/community/BackupPC" rel="nofollow" >guide for Ubuntu</a>.</p><p><a
href="http://duplicity.nongnu.org/" rel="nofollow" >Duplicity</a> claims to still be in beta, thus I haven't given it a try. <a
href="http://www.nongnu.org/rdiff-backup/" rel="nofollow" >rdiff-backup</a> seemed a bit too simple (and with no ready templates to get working regular backups faster), so I skipped that one as well.</p><p><a
href="http://www.dirvish.org/" rel="nofollow" >Dirvish</a> really caught my attention, partially thanks to a good and relatively <em>short</em> <a
href="http://dtcsupport.gplhost.com/PmWiki/Backup-With-Dirvish-And-Automysqlbackup" rel="nofollow" >quick-start tutorial</a>. That tutorial also mentions <a
href="http://packages.debian.org/en/squeeze/automysqlbackup" rel="nofollow" >automysqlbackup</a> - a nice, almost no-configuration tool to take regular dumps of MySQL databases. In combination, these two now regularly backup up my whole server to another linux box.</p><p>I would definitely recommend using dirvish+automysqlbackup for remote/off-site backup needs. However, other solutions might be as good or better for your use case.</p> ]]></content:encoded> <wfw:commentRss>http://bogdan.org.ua/2010/10/03/linux-server-remote-backup-options.html/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
