<?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>A web-developer's blog</title>
	<atom:link href="http://blog.datamatrix-bg.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.datamatrix-bg.net</link>
	<description>Програмиране, линукс, хардуер и може би Аз :)</description>
	<lastBuildDate>Mon, 15 Jun 2009 10:20:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>ALIX 3d3 heatsink upgrade</title>
		<link>http://blog.datamatrix-bg.net/2009/06/10/alix-3d3-heatsink-upgrade/</link>
		<comments>http://blog.datamatrix-bg.net/2009/06/10/alix-3d3-heatsink-upgrade/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 20:22:20 +0000</pubDate>
		<dc:creator>DataMatrix</dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[embeded]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[robotics]]></category>
		<category><![CDATA[3d3]]></category>
		<category><![CDATA[alix]]></category>
		<category><![CDATA[alix 3d3]]></category>
		<category><![CDATA[amd]]></category>
		<category><![CDATA[cooler]]></category>
		<category><![CDATA[fan]]></category>
		<category><![CDATA[geode]]></category>
		<category><![CDATA[heatsink]]></category>
		<category><![CDATA[lx]]></category>
		<category><![CDATA[pc engines]]></category>
		<category><![CDATA[хардуер]]></category>

		<guid isPermaLink="false">http://blog.datamatrix-bg.net/?p=109</guid>
		<description><![CDATA[I have seen on the net, that some people put a 40x40cm heatsink on the AMD Geode LX processor. I&#8217;ve decided to try it myself. A few days ago I have measured using the lm-sensors package to check on the CPU temperature and to my amusement I saw 49 degrees celsius after boot and some [...]]]></description>
			<content:encoded><![CDATA[<p>I have seen on the net, that some people put a 40x40cm heatsink on the AMD Geode LX processor. I&#8217;ve decided to try it myself.</p>
<p>A few days ago I have measured using the <em>lm-sensors</em> package to check on the CPU temperature and to my amusement I saw 49 degrees celsius after boot and some ussage over the lan. Today I have bought a 7лв ($4.6) 4x4cm heatsink with a fan usually used for those older VGA cards form a few years ago. I&#8217;ve soldered the cables directly to the power connector to which I supply 12V. Now the temperature is 42.5-43 degrees celsius. Note that the room temperature is 2-3 degrees higher than a week ago during the previous measurement. It&#8217;s about 29 degrees here.</p>
<p>Update: I&#8217;ve removed some of the sticky tape on the heatsink in the form of a circle in the center and added thermal paste. Readings now:</p>
<blockquote><p>alix-d3d:~# sensors<br />
lm86-i2c-0-4c<br />
Adapter: CS5536 ACB0<br />
M/B Temp:    +34.0 C  (low  =  +0.0 C, high = +70.0 C)<br />
(crit = +85.0 C, hyst = +75.0 C)<br />
CPU Temp:    +40.0 C  (low  =  +0.0 C, high = +70.0 C)<br />
(crit = +85.0 C, hyst = +75.0 C)</p></blockquote>
<p><a href="http://blog.datamatrix-bg.net/wp-content/uploads/2009/06/img_1382.jpg"><img class="alignnone size-thumbnail wp-image-113" title="img_1382" src="http://blog.datamatrix-bg.net/wp-content/uploads/2009/06/img_1382-150x150.jpg" alt="img_1382" width="150" height="150" /></a> <a href="http://blog.datamatrix-bg.net/wp-content/uploads/2009/06/img_1383.jpg"><img class="alignnone size-thumbnail wp-image-114" title="img_1383" src="http://blog.datamatrix-bg.net/wp-content/uploads/2009/06/img_1383-150x150.jpg" alt="img_1383" width="150" height="150" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.datamatrix-bg.net/2009/06/10/alix-3d3-heatsink-upgrade/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian on alix 3d3</title>
		<link>http://blog.datamatrix-bg.net/2009/06/04/debian-on-alix-3d3/</link>
		<comments>http://blog.datamatrix-bg.net/2009/06/04/debian-on-alix-3d3/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 21:35:07 +0000</pubDate>
		<dc:creator>DataMatrix</dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[embeded]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[robotics]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[2.6.29.4]]></category>
		<category><![CDATA[3d3]]></category>
		<category><![CDATA[alix]]></category>
		<category><![CDATA[alix 3d3]]></category>
		<category><![CDATA[amd]]></category>
		<category><![CDATA[geode]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[lenny]]></category>
		<category><![CDATA[pc engines]]></category>

		<guid isPermaLink="false">http://blog.datamatrix-bg.net/?p=95</guid>
		<description><![CDATA[I&#8217;ve decided to supply my installation of Debian so that people that aren&#8217;t as stubborn or just don&#8217;t want to waste time can get up and running First of all you should take a 1 or 2GB flash drive (flash stick). A CF card would probably also work, but I haven&#8217;t tried one and so [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve decided to supply my installation of Debian so that people that aren&#8217;t as stubborn or just don&#8217;t want to waste time can get up and running <img src='http://blog.datamatrix-bg.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   First of all you should take a 1 or 2GB flash drive (flash stick). A CF card would probably also work, but I haven&#8217;t tried one and so I don&#8217;t know.  <strong>NOTE: ALL COMMANDS ARE EXECUTED IN ROOT SHELL. BE CAREFUL!</strong> First of all you sould format your flash drive. I&#8217;m using a 4GB pqi, but a 1GB would easily do (512MB is too close to the current size of 490MB of my installation) <span style="text-decoration: underline;"><strong>EDIT: After cleaning the apt cache (apt-get clean) the distribution is now 409MB on the flash drive and should be safe to put it on a 512MB partition without swap (on idle it consumes just 26/256MB RAM)</strong></span>. There are two ways to format the flash stick:</p>
<ul>
<li>Using terminal:
<ul>
<li>fdisk /dev/sdc</li>
<li>mkfs.ext3 -L &#8220;ROOTFS&#8221; /dev/sdc1</li>
<li>mkswap -L &#8220;SWAP&#8221; /dev/sdc5</li>
<li>Here in fdisk you should make a bootable partition at least 700MB big (data will fit on 512MB, but give it some space, just in case) data type should be 83. mkfs.ext3 will format the first partition on our flash drive with ext3. The last command gives it a label. If you plan to change the partition label from ROOTFS to something else first check where it is used. I&#8217;m sure that one place is /boot/grub/menu.lst file, since I made it boot from device by label and not id (like /dev/sda1), since it can change with adding new devices. Also make a 256MB swap partition, just to be on the safe side <img src='http://blog.datamatrix-bg.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ul>
</li>
<li>Using the gparted (preinstalled in Ubuntu Jaunty 9.04; <strong>GNOME</strong>).
<ul>
<li>You can run it by pressing alt+f2 and typing<br />
<blockquote><p>gksu gparted</p></blockquote>
<p>You would be prompted for your user password (you should be a sudoer &#8211; have sudo ability)</li>
<li> Use the button in the right top to change to the desired device. Rightclick on the partition that exists on the flash and choose <em>unmount</em>. Now that the partition is unmounted you can delete it &#8211; choose delete from the menu or simple select the partition and press DELETE on your keyboard. Do that on all partitions on the flash drive, if there is more than one. <strong>THIS WILL CAUSE PERMANENT DATA LOSS ON THE DEVICE BEING FORMATED! BACKUP YOUR STUFF BEFORE FORMATING!</strong></li>
<li> Click on the empty space with right mouse button and choose New Partition on simply press Ctrl+N to open the new partition dialog. I decided to go with a 1GB partition this time.<br />
<a rel="http://blog.datamatrix-bg.net/wp-content/uploads/2009/06/screenshot.png" href="http://blog.datamatrix-bg.net/wp-content/uploads/2009/06/screenshot.png" target="_blank"><img class="alignnone size-full wp-image-97" title="gparted create new ext3 partition" src="http://blog.datamatrix-bg.net/wp-content/uploads/2009/06/screenshot.png" alt="gparted create new ext3 partition" width="450" height="303" /></a><br />
On the remaining space I decided to make a 256MB swap partition, just in case <img src='http://blog.datamatrix-bg.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  From the &#8220;New Partition&#8221; dialog choose &#8220;extended partition&#8221; instead of primary and leave it to take all the remaining space. Then in this extended partition create a new partition (logical) with type <strong>linux-swap</strong>. I&#8217;ve labeled it SWAP, but this shouldn&#8217;t be nesessary.</p>
<p>I&#8217;ve ended up with this:</p>
<p><a rel="http://blog.datamatrix-bg.net/wp-content/uploads/2009/06/screenshot-dev-sdc-gparted.png" href="http://blog.datamatrix-bg.net/wp-content/uploads/2009/06/screenshot-dev-sdc-gparted.png" target="_blank"><img class="alignnone size-full wp-image-98" title="screenshot-dev-sdc-gparted" src="http://blog.datamatrix-bg.net/wp-content/uploads/2009/06/screenshot-dev-sdc-gparted.png" alt="screenshot-dev-sdc-gparted" width="450" height="303" /></a><br />
This is about it, push APPLY to apply the changes. Everything should go fine, but sometimes it just gives up with an error after deleting the original partition. On the empty flash repeat the remaining steps and it should work fine.<br />
Now rightclick on the new partition and choose Manage Flags and checkout the &#8220;boot&#8221; flag.</li>
</ul>
</li>
<li> Now that we have out partition, it&#8217;s time to mount back the new ext3 partition and put in the required files.
<ul>
<li>cd /media</li>
<li>mkdir ROOTFS</li>
<li>mount -t ext3 /dev/sdc1 /media/ROOTFS</li>
</ul>
<p>*NOTE ALL COMMANDS SHOULD BE RUNNED AS ROOT*<br />
If everything went ok and the newly formated partition mounted, you have green light to download the archived distribution:</p>
<blockquote><p>wget http://blog.datamatrix-bg.net/wp-content/uploads/2009/06/ROOTFS.tar.gz</p></blockquote>
<p>Do a</p>
<blockquote><p>md5sum ROOTFS.tar.gz</p></blockquote>
<p>and compare the sum with c3d41fbf94b31f0d58f05ed502396f8f &#8211; this is the sum at my end. <span style="text-decoration: underline;"><strong>EDIT: The updated archive with removed apt cache files has a checksum of 933fa4bafe7e86d47758bed582d8d08c</strong></span><br />
If the sum matches &#8211; march on with the extracting the files:</p>
<blockquote><p>tar xzvf ROOTFS.tar.gz</p></blockquote>
<p>You should see a lot of files.</li>
<li> You should now have a complete linux on your flash drive, all that remains is the bootloader.
<ul>
<li>go to a chrooted shell:chroot /media/ROOTFS /bin/bash</li>
<li>Edit /boot/grub/device.map (mcedit /boot/grub/device.map) and put in it<br />
<blockquote><p>(hd0) /dev/sdc</p></blockquote>
<p>/dev/sdc is the flash drive on the development machine.<br />
You should bind /dev/ with /media/ROOTFS/dev so that you can run grub-install:</p>
<blockquote><p>mount &#8211;bind /dev/ /media/ROOTFS/dev</p></blockquote>
<p>Now execute from the chrooted shell (chroot /media/ROOTFS /bin/bash)</p>
<blockquote><p>grub-install &#8211;root-directory=/ /dev/sdc</p></blockquote>
</li>
<li> While still in the chroot-ed shell you can change your root password:<br />
<blockquote><p>passwd root</p></blockquote>
</li>
<li> Exit the chroot shell (exit);<br />
Now unmount the partition using umount /dev/sdc1 and put the flash stick on your alix. It should run without problem.</li>
<li> If you have a monitor and a usb keyboard, you can logon with user &#8220;root&#8221; and password &#8220;datamatrix&#8221; if you haven&#8217;t changed it.<br />
There is a ssh server installed on the platform and the eth0 interface is configured with a static address of 192.168.47.47/24<br />
You can access it from there. Also there is the lm-sensors installed and the &#8220;sensors&#8221; command should tell you the core and chipset temperature. Mine runs at 49 degrese celsius.</li>
</ul>
<p>If you have any notices, improvement notes or just plain comments, please leave them bellow. I would be happy to see them and answer any questions.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.datamatrix-bg.net/2009/06/04/debian-on-alix-3d3/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>PC Engines alix3d3 with Debian Lenny</title>
		<link>http://blog.datamatrix-bg.net/2009/06/04/pc-engines-alix3d3-with-debian-lenny/</link>
		<comments>http://blog.datamatrix-bg.net/2009/06/04/pc-engines-alix3d3-with-debian-lenny/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 14:18:43 +0000</pubDate>
		<dc:creator>DataMatrix</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[embeded]]></category>
		<category><![CDATA[robotics]]></category>
		<category><![CDATA[2.6.29.4]]></category>
		<category><![CDATA[3d3]]></category>
		<category><![CDATA[alix]]></category>
		<category><![CDATA[alix 3d3]]></category>
		<category><![CDATA[amd]]></category>
		<category><![CDATA[compile kernel]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[geode]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[lenny]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[pc engines]]></category>

		<guid isPermaLink="false">http://blog.datamatrix-bg.net/?p=80</guid>
		<description><![CDATA[I have recently bought an alix 3d3 board from ReloadBG. It&#8217;s intended to be used in my robotics projects. Since I am a Linux user and Debian distro family fan, I&#8217;ve decided to put Debian Lenny (Debian 5) on it. First of all I have made a minimal installation on a 4GB flash stick using [...]]]></description>
			<content:encoded><![CDATA[<p>I have recently bought an <a href="http://www.pcengines.ch/alix3d3.htm" target="_blank">alix 3d3</a> board from <a href="http://www.reloadbg.com/" target="_blank">ReloadBG</a>. It&#8217;s intended to be used in my robotics projects. Since I am a Linux user and <a href="http://www.debian.org/" target="_blank">Debian</a> distro family fan, I&#8217;ve decided to put <a href="http://www.debian.org/releases/lenny/" target="_blank">Debian Lenny (Debian 5)</a> on it. First of all I have made a minimal installation on a 4GB flash stick using the <em>debootstrap</em> (<a href=" http://packages.ubuntu.com/jaunty/debootstrap" target="_blank"> http://packages.ubuntu.com/jaunty/debootstrap</a> , http://packages.debian.org/lenny/debootstrap ) program. You can read about the process here: <a href="http://darwish-07.blogspot.com/2007/08/constructing-minimal-debian-linux-usb.html" target="_blank">http://darwish-07.blogspot.com/2007/08/constructing-minimal-debian-linux-usb.html</a>. After going to a chroot-ed shell I run <em><span style="font-family: courier new;">grub-install &#8211;root-directory=/ /dev/sdb </span></em>to setup grub on the flash stick. There isn&#8217;t anything complex here. If you put the flash stick in the alix 3d3, plug in a monitor and give it some power (a standart 12V adapter works good) you would most probably see the kernel loading.</p>
<p>On the other hand everything goes wrong as I decided to boot without the monitor (vga port empty). I&#8217;ve waited for a few minutes for the board to reply my pings via the ethernet port (I&#8217;ve set up a static ip address in the interfaces file). I&#8217;ve plugged back the monitor and the screen was just showing &#8220;Starting Up&#8230; Detecting EDD (edd=off to disable)&#8230; ok&#8221; or something like that and nothing more. After 3-4 minutes it resumed normal boot. I&#8217;ve read somewhere that this is a but in the EDD module in the kernel, elsewhere that the alix phoenix bios is to blame (some vga ddc bug). I&#8217;ve even read that you should turn off &#8220;HPET&#8221; in the kernel using kernel paramters, but it turned out that the kernel parameter for disabling hpet or edd doesn&#8217;t work. Firstly I was thinking how to trick the system into thinking that there is a monitor still attached, asked arount how to do it. Some people and sources from the net pointed in usign some 75 Omh resistors to pull some of the pins to ground, but I&#8217;ve decided to try something else first (I&#8217;ve even read at ubuntuforums that on alix3c3 you need to put a paperclip between 2 of the vga pins, but that seemed desperate). I&#8217;ve went with the building a custom kernel option. I used this article as guidence: <a href="http://www.falkotimme.com/howtos/debian_kernel2.6_compile/" target="_blank">http://www.falkotimme.com/howtos/debian_kernel2.6_compile/</a>. You can follow that guide. I used <a href="http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.29.4.tar.gz" target="_blank">http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.29.4.tar.gz</a>. Keep in mind that you need about 500-600MB of free space. It turned out that you also need zlib headers ( zlib-dev or currently in jaunty the package is<br />
zlib1g-dev ). I&#8217;ve removed EDID in firmware and also disabled HPET and EDD. You can download the complete config file here: <a href="http://blog.datamatrix-bg.net/wp-content/uploads/2009/06/config" target="_blank">config</a></p>
<p>I&#8217;ve started the build process, it took about 1 hour 30 minuts on a AMD Athlon 64 X2 (2.3GHz per core); 2GB RAM; Debian Lenny system. Build time may vary. In the end I ended up with having a .deb fire in my /usr/src directory. You can download the compiled kernel here: <a href="http://blog.datamatrix-bg.net/wp-content/uploads/2009/06/linux-image-2.6.29.4_datamatrix.alix3d3.1.0_i386.deb">linux-image-2.6.29.4_datamatrix.alix3d3.1.0_i386.deb</a>. All that is left to do is to install the package using <em>dpkg</em>, updating initrd image using <em>mkinitramfs</em> (debian/ubuntu) and modifying /boot/grub/menu.lst to add the new kernel. It boots about as fast as before (~40-50 seconds) and has a bit more verbose debugging, but I think it would be useful.</p>
<p>My &#8220;hardware&#8221;: <a href="http://img.datamatrix-bg.net/robotics/IMG_1222.JPG" target="_blank">http://img.datamatrix-bg.net/robotics/IMG_1222.JPG</a></p>
<p>Comments are welcome!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.datamatrix-bg.net/2009/06/04/pc-engines-alix3d3-with-debian-lenny/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Amarok now playing with dcop</title>
		<link>http://blog.datamatrix-bg.net/2009/03/28/amarok-now-playing-with-dcop/</link>
		<comments>http://blog.datamatrix-bg.net/2009/03/28/amarok-now-playing-with-dcop/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 19:46:44 +0000</pubDate>
		<dc:creator>DataMatrix</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Systems and Modifications]]></category>
		<category><![CDATA[amarok]]></category>
		<category><![CDATA[dcop]]></category>
		<category><![CDATA[now playing]]></category>

		<guid isPermaLink="false">http://blog.datamatrix-bg.net/?p=67</guid>
		<description><![CDATA[Нещо ме беше хванала пак тая муза дето ми се пишат разни странни кодове и по-точно човърках конфигурацията на conky &#8211; ~/.conkyrc и по едно време като гледах възможностите от разни други прейъри да взима информацията какво свири, но няма за амарок, реших да си го направя сам. Бях чувал от един познат (Пройнов) за [...]]]></description>
			<content:encoded><![CDATA[<p>Нещо ме беше хванала пак тая муза дето ми се пишат разни странни кодове и по-точно човърках конфигурацията на <a title="Conky system monitor" href="http://conky.sourceforge.net/" target="_blank">conky</a> &#8211; ~/.conkyrc и по едно време като гледах възможностите от разни други прейъри да взима информацията какво свири, но няма за амарок, реших да си го направя сам. Бях чувал от един познат (Пройнов) за скрипт на амарок, който обновява настроението в скайп, това може би ми беше първоначалната идея, но документацията на скайп за комуникация по dbus или друг подобен интерфейс е неекзистентна. Та реших, че конки ще казва какво дрънчи в амарок. Конфигурацията на конки изглежда ето така:</p>
<pre>background              no
update_interval         1.0
double_buffer           yes

use_xft                 no
xftfont                 Monospace:size=10
xftalpha                0.8

own_window              yes
own_window_transparent  yes
own_window_type         override
own_window_hints        undecorated,below,sticky,skip_taskbar,skip_pager
#on_bottom              yes

minimum_size            300 42
draw_shades             yes
draw_outline            yes
draw_borders            yes
draw_graph_borders      no
stippled_borders        0
border_margin           3
border_width            0

default_color           white
default_shade_color     black
default_outline_color   black

alignment               top_right
#gap_x                  362
gap_y                   30
#gap_y                  10

no_buffers              yes

TEXT
${alignc}${color #F09000}${nodename} [Ma26${kernel} ${machine}
${alignc}${time %R:%S %d.%m.%Y}
${color #707070}${hr}
${color #F09000}M${color #707070}:${color white} ${mem}${color #707070}/${color white}${memmax} ${color #F09000}S${color #707070}:${color white} ${swap}${color #707070}/${colorwhite}${swapmax}        ${color #F09000}P${color #707070}:${color white} ${running_processes}${color #707070}/${color white}${processes}
${color #707070}${hr}${color white}
${color #F09000}CPU0${color #707070}:${color white} ${cpu cpu0}% ${freq 1}MHz ${cpubar cpu0}
${color #F09000}CPU1${color #707070}:${color white} ${cpu cpu1}% ${freq 2}MHz ${cpubar cpu1}
${color #F09000}BAT${color #707070}:${color white} ${battery_percent}%  ${battery_bar}
${if_up wlan1}
${color #707070}${hr}
${alignc}${color F09000}Wireless${color #707070}:${color white} wlan1
${color #F09000}ESSID${color #707070}:${color white}  ${wireless_essid wlan1}
${color #F09000}Signal${color #707070}:${color white} ${wireless_link_bar wlan1}
${endif}${color #707070}${hr}
${color white}${scroll 50 ${execpi 1 /usr/bin/php ~/dev/amarok_now_playing.php</pre>
<p>Скрипта който вади данните от амарока е написан на php (в оригинал повечето са на перл). Използват се тръби (pipe) и функцията popen() (която е г/д една и съща и в перл и в php), която връща handle към съответната тръба. Имам инсталиран пакета php5-cli за да мога да изпълнявам php скриптове. Ето го кода:</p>
<pre class="brush: php; title: ;">&lt;?php error_reporting(E_ALL);

$commands=array();
$commands['player']=array();
$commands['player'][]='artist';
$commands['player'][]='title';
//$commands['player'][]='rating';
//$commands['player'][]='trackPlayCounter';
$commands['player'][]='currentTime';
$commands['player'][]='totalTime';

$type='player';

$results=array();
foreach($commands['player'] as $cmd)
{
/* Add redirection so we can get stderr. */
$handle = popen('dcop amarok '.$type.' '.$cmd, 'r');
//echo &quot;'$handle'; &quot; . gettype($handle) . &quot;\n&quot;;
$read = fread($handle, 2096);
$results[]=trim($read);
pclose($handle);
}
echo $results[0].' - '.$results[1].' '.$results[2].'/'.$results[3].' | ';
?&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.datamatrix-bg.net/2009/03/28/amarok-now-playing-with-dcop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Усмивка!</title>
		<link>http://blog.datamatrix-bg.net/2009/03/21/%d1%83%d1%81%d0%bc%d0%b8%d0%b2%d0%ba%d0%b0/</link>
		<comments>http://blog.datamatrix-bg.net/2009/03/21/%d1%83%d1%81%d0%bc%d0%b8%d0%b2%d0%ba%d0%b0/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 21:25:20 +0000</pubDate>
		<dc:creator>DataMatrix</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[107]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[funny]]></category>
		<category><![CDATA[peugeot]]></category>
		<category><![CDATA[smile]]></category>
		<category><![CDATA[the smiling car]]></category>
		<category><![CDATA[усмивка]]></category>

		<guid isPermaLink="false">http://blog.datamatrix-bg.net/?p=62</guid>
		<description><![CDATA[Тъй като не съм писал от много време, реших да пусна нещо забавно]]></description>
			<content:encoded><![CDATA[<div id="attachment_61" class="wp-caption alignnone" style="width: 610px"><img class="size-full wp-image-61" title="The Smiling Car" src="http://blog.datamatrix-bg.net/wp-content/uploads/2009/03/1237493876_03.jpg" alt="Усмивка :)" width="600" height="516" /><p class="wp-caption-text">Усмивка <img src='http://blog.datamatrix-bg.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p></div>
<p>Тъй като не съм писал от много време, реших да пусна нещо забавно <img src='http://blog.datamatrix-bg.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.datamatrix-bg.net/2009/03/21/%d1%83%d1%81%d0%bc%d0%b8%d0%b2%d0%ba%d0%b0/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Шофьорска книжка &#8211; част 1</title>
		<link>http://blog.datamatrix-bg.net/2009/02/16/%d1%88%d0%be%d1%84%d1%8c%d0%be%d1%80%d1%81%d0%ba%d0%b0-%d0%ba%d0%bd%d0%b8%d0%b6%d0%ba%d0%b0-%d1%87%d0%b0%d1%81%d1%82-1/</link>
		<comments>http://blog.datamatrix-bg.net/2009/02/16/%d1%88%d0%be%d1%84%d1%8c%d0%be%d1%80%d1%81%d0%ba%d0%b0-%d0%ba%d0%bd%d0%b8%d0%b6%d0%ba%d0%b0-%d1%87%d0%b0%d1%81%d1%82-1/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 19:52:25 +0000</pubDate>
		<dc:creator>DataMatrix</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.datamatrix-bg.net/?p=53</guid>
		<description><![CDATA[Така, утре ще подавам документи за издаване на шофьорско свидетелство. Сега ще опиша какво трябваше да направя, за да стигна до този момент: 1. Свързах се с инструктора по кормуване, в случая инж. Йордан Милчев за да се запиша за шофьорски курс категория &#8220;B&#8221;. За издаване на курсисткия картон беше нужно копие за завършено основно [...]]]></description>
			<content:encoded><![CDATA[<p>Така, утре ще подавам документи за издаване на шофьорско свидетелство. Сега ще опиша какво трябваше да направя, за да стигна до този момент:</p>
<p>1. Свързах се с инструктора по кормуване, в случая <a href="http://www.milchev.net/" target="_blank">инж. </a><a title="ЕТ &quot;МИЛЧЕВ - Йордан Милчев&quot;" href="http://milchev.net/" target="_blank">Йордан Милчев</a> за да се запиша за шофьорски курс категория &#8220;B&#8221;. За издаване на курсисткия картон беше нужно копие за завършено <strong>основно образование</strong> (не съм сигурен трябваше ли да представям орегинал), снимка (формат за документи). Също така попълних данните в курсистката си карта, което в същност е самото записване. Според школата в която се запишете, може в цената на курсовете да са включени набор примерни листовки, отговори с обяснение и &#8220;Безопасност на движението по пътищата + Устройство на автомобила&#8221;</p>
<div id="attachment_55" class="wp-caption alignnone" style="width: 526px"><img class="size-full wp-image-55" title="photo-0014" src="http://blog.datamatrix-bg.net/wp-content/uploads/2009/02/photo-0014.jpg" alt="листовки, отговори и безопасност на движението по пътищата" width="516" height="387" /><p class="wp-caption-text">листовки, отговори и безопасност на движението по пътищата</p></div>
<p>Учите от малката книжка, мъчите се с листовките известно време и после се явявате на изпит листовки (вътрешен и пред ДАИ). Взимате си изпита и продължавате с курса &#8211; кормуване. След известно време полагате вътрешни изпити (при мен бяха 2 броя) по кормуване, където не ви &#8220;късат&#8221;, но ви казват грешките и пропуските. Когато направите 32 часа кормуване (1 час е 40 минути (учебен час)), се явявате на изпит по кормуване пред ДАИ. При полагането на изпитите пред ДАИ задължително носете личен документ (лична карта или паспорт), при което документа трябва да е валиден (едно момиче от нашата група не бе допуснато до изпит на листовки, защото личната й карта беше изтекла). При листовките решавате 2 листа &#8211; А и Б, като лист Б е с по-виска трудност. Имате право на 5 грешки (за категория С са 3). На изпита по кормуване ще Ви обяснят за какво може да ви &#8220;скъсат&#8221;. Ето някои примери: Отнемане на предимство, влизане срещу забранителен знак, минаване на червено и т.н. След като минете изпита по кормуване (изпитващият даде оценка &#8220;ДА&#8221;), получавате удостовенения за положени теоритичен и практичен изпити.</p>
<p>Слез изпитите трябва да минете и курс по &#8220;Първа долекарска помощ&#8221; в БЧК. Когато го карах аз, курса сруваше 35лв и траеше 4 часа, сега чух, че е станал 50лв и 6 часа, след което получавате удостоверението от БЧК, което важи 4 години. След това трябва да закупите от книжарница <strong>Карта за медицински преглед на водач на моторно превозно средство</strong>, след което трябва да посетите клиника/поликлиника/болница, където минавате на очен кабинет и уши-нос-гърло и накрая отивате на регистратурата, където ви го подпечатват, след като платите такса 15лв (към дата 16.02.2009). Трябва си също още 1 ксерокопие на дипломата за завършено основно/средно/висше образование, снимка (формат за личен документ) с давност не повече от 6 месеца.</p>
<p><a href="http://www.kat.mvr.bg/ukazanieSUMPS.htm" target="_blank">http://www.kat.mvr.bg/ukazanieSUMPS.htm</a></p>
<blockquote><p>2. За първоначално издаване на свидетелство за управление на МПС:</p>
<p>* документ за самоличност по ЗБДС;<br />
* документ за платена такса;<br />
* карта за медицински преглед на водач на МПС или протокол от ТОЛЕК* или ТЦЛЕК*;<br />
* удостоверение за завършен курс по обучение за водач на МПС;<br />
* удостоверение за завършен курс за долекарска помощ от БЧК;<br />
* удостоверение за психологическа годност /за категории С, Д, Ттм и Ттб/;<br />
* квитанция за дължими платени глоби по ЗДВП / ако има нарушения /;<br />
* Диплом /оригинал и копие / за завършено основно, средно или висше образование ;.</p></blockquote>
<p>Ето я цялата бумащина, която трябваше да подготвя:</p>
<div id="attachment_57" class="wp-caption alignnone" style="width: 335px"><img class="size-full wp-image-57" title="photo-0015" src="http://blog.datamatrix-bg.net/wp-content/uploads/2009/02/photo-0015.jpg" alt="документи" width="325" height="429" /><p class="wp-caption-text">документи</p></div>
<p>Горе-долу това е. Утре сутринта пред КАТ.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.datamatrix-bg.net/2009/02/16/%d1%88%d0%be%d1%84%d1%8c%d0%be%d1%80%d1%81%d0%ba%d0%b0-%d0%ba%d0%bd%d0%b8%d0%b6%d0%ba%d0%b0-%d1%87%d0%b0%d1%81%d1%82-1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Ураа!</title>
		<link>http://blog.datamatrix-bg.net/2009/02/06/46/</link>
		<comments>http://blog.datamatrix-bg.net/2009/02/06/46/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 12:42:06 +0000</pubDate>
		<dc:creator>DataMatrix</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[КАТ]]></category>
		<category><![CDATA[шофьорска книжка]]></category>
		<category><![CDATA[шофьорски курс]]></category>

		<guid isPermaLink="false">http://blog.datamatrix-bg.net/?p=46</guid>
		<description><![CDATA[Взех си шофьорският изпит Остана опъването на палатка пред КАТ някоя сутрин и ще обясня подробно цялата процедура по получаването на шофьорски права. Шофьорски курсове (София) -&#62;http://www.milchev.net/]]></description>
			<content:encoded><![CDATA[<p>Взех си шофьорският изпит <a href="http://droneguard.deviantart.com/art/Can-we-go-NAO-93805556" target="_blank"><img class="alignnone size-full wp-image-45" title="can_we_go_nao_by_droneguard" src="http://blog.datamatrix-bg.net/wp-content/uploads/2009/02/can_we_go_nao_by_droneguard.gif" alt="can_we_go_nao_by_droneguard" width="50" height="20" /></a><br />
Остана опъването на палатка пред КАТ някоя сутрин и ще обясня подробно цялата процедура по получаването на шофьорски права.</p>
<p><a href="http://www.milchev.net/" target="_blank">Шофьорски курсове (София) -&gt;http://www.milchev.net/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.datamatrix-bg.net/2009/02/06/46/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wireless проблем&#8230;</title>
		<link>http://blog.datamatrix-bg.net/2009/01/12/wireless-%d0%bf%d1%80%d0%be%d0%b1%d0%bb%d0%b5%d0%bc/</link>
		<comments>http://blog.datamatrix-bg.net/2009/01/12/wireless-%d0%bf%d1%80%d0%be%d0%b1%d0%bb%d0%b5%d0%bc/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 15:17:13 +0000</pubDate>
		<dc:creator>DataMatrix</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[bad signal]]></category>
		<category><![CDATA[channel]]></category>
		<category><![CDATA[essid]]></category>
		<category><![CDATA[low speed]]></category>
		<category><![CDATA[wifi]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://blog.datamatrix-bg.net/?p=25</guid>
		<description><![CDATA[Ето една случка от работа: използваме wireless маршрутизатор (router) Linksys WRT54GC v2.0 и днес мрежата достигна до нова дефиниция на &#8220;бавно като охлюв&#8221; &#8211; пинг до доставчика отнемаше 40мс. Вярно, че се теглеше от някъде и някакъв торент, но проблема се оказа друг &#8211; използваме радио канал, който се използва и от друг рутер в [...]]]></description>
			<content:encoded><![CDATA[<p>Ето една случка от работа: използваме wireless маршрутизатор (router) Linksys WRT54GC v2.0 и днес мрежата достигна до нова дефиниция на &#8220;бавно като охлюв&#8221; &#8211; пинг до доставчика отнемаше 40мс. Вярно, че се теглеше от някъде и някакъв торент, но проблема се оказа друг &#8211; използваме радио канал, който се използва и от друг рутер в обхват, в случая ch. 6. Под линукс има няколко удобни &#8220;иструментчета&#8221;. Ако имате програма от типа на RaLink Config (аз имам един usb wireless transmiter с тази прогама), която показва наличните безжични мрежи, като показва и на кой канал са, тя ще ви е напълно достатъчно. Ето част от изхода на моята програма:</p>
<p><code><br />
datamatrix@pripyat:~$ sudo iwlist wlan1 scan<br />
wlan1     Scan completed<br />
          Cell 02 - Address: 00:18:39:##:##:##<br />
                    ESSID:&quot;&quot;<br />
                    Mode:Master<br />
                    Channel:6<br />
                    Frequency:2.437 GHz (Channel 6)<br />
~output omited~<br />
          Cell 05 - Address: 00:1E:E5:##:##:##<br />
                    ESSID:&quot;НАШАТА МРЕЖА&quot;<br />
                    Mode:Master<br />
                    Channel:6<br />
                    Frequency:2.437 GHz (Channel 6)<br />
</code></p>
<p>Смених мрежата на 7 и смених режима от 802.11 B+G (mixed), на само G, тъй като нямаме B устройства. Сега скоростта се качи значително, пинга намаля и като цяло рутерчето се &#8220;отпушихи&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.datamatrix-bg.net/2009/01/12/wireless-%d0%bf%d1%80%d0%be%d0%b1%d0%bb%d0%b5%d0%bc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Шаренко за децата</title>
		<link>http://blog.datamatrix-bg.net/2009/01/09/%d1%88%d0%b0%d1%80%d0%b5%d0%bd%d0%ba%d0%be-%d0%b7%d0%b0-%d0%b4%d0%b5%d1%86%d0%b0%d1%82%d0%b0/</link>
		<comments>http://blog.datamatrix-bg.net/2009/01/09/%d1%88%d0%b0%d1%80%d0%b5%d0%bd%d0%ba%d0%be-%d0%b7%d0%b0-%d0%b4%d0%b5%d1%86%d0%b0%d1%82%d0%b0/#comments</comments>
		<pubDate>Fri, 09 Jan 2009 21:22:29 +0000</pubDate>
		<dc:creator>DataMatrix</dc:creator>
				<category><![CDATA[Web Systems and Modifications]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[highlight]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[код]]></category>
		<category><![CDATA[оцветяване]]></category>

		<guid isPermaLink="false">http://blog.datamatrix-bg.net/?p=9</guid>
		<description><![CDATA[Може би първото нещо, което забелязах че липсва в WordPress е бутонче &#8220;CODE&#8221; (имам предвид оцветяване на кода според езика, code бутон си има, но в обхвата на &#60;code&#62; не се обработват другите параметри и се оставя &#8220;както е&#8221;, като изключим замяната на специални символи по htmlspecialchars()). Оказа се, че тази функционалност не е заложена [...]]]></description>
			<content:encoded><![CDATA[<p>Може би първото нещо, което забелязах че липсва в WordPress е бутонче &#8220;CODE&#8221; (имам предвид оцветяване на кода според езика, code бутон си има, но в обхвата на &lt;code&gt; не се обработват другите параметри и се оставя &#8220;както е&#8221;, като изключим замяната на специални символи по <em><a target="_blank" href="http://php.net/htmlspecialchars">htmlspecialchars()</a></em>). Оказа се, че тази функционалност не е заложена по подразбиране и се постига след добавяне на &#8220;Plugin&#8221; (Добавка). 4ти резултат в <span style="color: #0000ff;">G</span><span style="color: #ff0000;">o</span><span style="color: #ffff00;">o</span><span style="color: #0000ff;">g</span><span style="color: #00ff00;">l</span><span style="color: #ff0000;">e</span> при търсене на &#8220;highlight php in wordpress&#8221; ме насочи към някакъв блог. Следвайки трохите стигнах до <a href="http://wordpress.org/extend/plugins/syntaxhighlighter/">http://wordpress.org/extend/plugins/syntaxhighlighter/</a><br />
И тъй като имам SSH (Secure SHell) достъп до сървъра, копирах пътя на архива (файла за сваляне). Преместих се в директорията на wordpress и от там отидох на<br />
<code>cd wp-content/plugins</code><br />
Последва<br />
<code>wget http://downloads.wordpress.org/plugin/syntaxhighlighter.zip</code><br />
wget е много удобен инструмент, чрез него може да теглите файлове от интернет през няколко различни протокола, без да имате графична среда или някакъв текстов browser.<br />
Разархивирането също е досадно лесно:<br />
<code>unzip syntaxhighlighter.zip</code><br />
Ако нямате unzip може да си го инсталирате (в случай, че имате имате администраторски права)<br />
<code>sudo apt-get install unzip</code><br />
<em>Забележка: аз използвам debian базирана дистрибуция. Синтаксисът при други дистрибуции, като Slackware или Fedora може да се различава</em><br />
След тази операция аз обичам да махам архива (<code>rm syntaxhighlighter.zip</code>)<br />
Сега е момента да влезете в администраторския панел на блога, раздел Plugins-&gt;Installed и да активирате добавката.</p>
<p>Ако обаче нямате директен достъп до сървъра, може да си изтеглите архива чрез линк-а по-горе и да отидете на Plugins-&gt;Add New, където има <strong>Install a plugin in .zip format</strong> (за тези, които не са разбрали, това значи <strong>инсталиране на добавка от zip архив</strong>), като там натискате Browse/Избери или каквото е бутончето след кутийката и си намирате zip архива който сте изтеглили. След това отивате в секция installed и активирате добавката. Може да изглежда сложно, но всъщност може да се направи за около 20-30 секунди.</p>
<style type="text/css">
.bar .tools a,a:visited { color: navy; }
</style>
<pre class="brush: php; title: ;">&lt;?php
    echo &quot;test&quot;;
?&gt;</pre>
<p>ПП: Наложи се да редактирам <strong>wp-content/plugins/syntaxhighlighter/files/SyntaxHighlighter.css</strong> и да променя фона (background-color: gray;) на <strong>.dp-highlighter .tools</strong> и <strong>.dp-highlighter ol</strong>, защото стиловете на темата правеха елементите нечетими.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.datamatrix-bg.net/2009/01/09/%d1%88%d0%b0%d1%80%d0%b5%d0%bd%d0%ba%d0%be-%d0%b7%d0%b0-%d0%b4%d0%b5%d1%86%d0%b0%d1%82%d0%b0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Започна се&#8230;</title>
		<link>http://blog.datamatrix-bg.net/2009/01/09/%d0%b7%d0%b0%d0%bf%d0%be%d1%87%d0%bd%d0%b0-%d1%81%d0%b5/</link>
		<comments>http://blog.datamatrix-bg.net/2009/01/09/%d0%b7%d0%b0%d0%bf%d0%be%d1%87%d0%bd%d0%b0-%d1%81%d0%b5/#comments</comments>
		<pubDate>Fri, 09 Jan 2009 19:32:22 +0000</pubDate>
		<dc:creator>DataMatrix</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[блог]]></category>
		<category><![CDATA[встъпление]]></category>
		<category><![CDATA[софтуер]]></category>
		<category><![CDATA[хардуер]]></category>

		<guid isPermaLink="false">http://blog.datamatrix-bg.net/?p=3</guid>
		<description><![CDATA[От около 1 година обмислям да си направя блог, но все не стигам до момента в който реално го има. Дори бях тръгнал да пиша собственна блог система, но поради липса на време проекта беше спрян, а след време &#8211; забравен (въпреки вече готовата база данни и около половината функционалност). Днес, след като говорих с [...]]]></description>
			<content:encoded><![CDATA[<p>От около 1 година обмислям да си направя блог, но все не стигам до момента в който реално го има. Дори бях тръгнал да пиша собственна блог система, но поради липса на време проекта беше спрян, а след време &#8211; забравен (въпреки вече готовата база данни и около половината функционалност). Днес, след като говорих с Иван и видях <a href="http://blog.zanev.net/" target="_blank">неговият блог</a>, реших (най-после) и аз да си направя. Смятам тук да пускам полезни кодове и да описвам проблеми, с които съм се сблъскал в работата си (а и извън нея) и впечатленията ми относно софтуер и хардуер.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.datamatrix-bg.net/2009/01/09/%d0%b7%d0%b0%d0%bf%d0%be%d1%87%d0%bd%d0%b0-%d1%81%d0%b5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

