<?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>Robert Basic &#187; Software</title>
	<atom:link href="http://robertbasic.com/blog/category/software/feed/" rel="self" type="application/rss+xml" />
	<link>http://robertbasic.com/blog</link>
	<description>the magic of coding...</description>
	<lastBuildDate>Mon, 30 Jan 2012 13:15:05 +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>Configuring 2 monitors with xrandr</title>
		<link>http://robertbasic.com/blog/configuring-2-monitors-with-xrandr/</link>
		<comments>http://robertbasic.com/blog/configuring-2-monitors-with-xrandr/#comments</comments>
		<pubDate>Sun, 25 Dec 2011 16:47:11 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[monitors]]></category>
		<category><![CDATA[x11]]></category>
		<category><![CDATA[xrandr]]></category>

		<guid isPermaLink="false">http://robertbasic.com/blog/?p=1437</guid>
		<description><![CDATA[My current, most used set up, includes a laptop and a second screen attached to it. The laptop is always to the left of the second monitor and together they give one big screen with a total resolution of 3046&#215;1050. From time to time, X11 gets confused and shows the same image, with the same [...]]]></description>
			<content:encoded><![CDATA[<p>My current, most used set up, includes a laptop and a second screen attached to it. The laptop is always to the left of the second monitor and together they give one big screen with a total resolution of 3046&#215;1050. From time to time, X11 gets confused and shows the same image, with the same resolution, on both monitors.</p>
<p>The tool which can help fix this is <a href="http://www.x.org/wiki/Projects/XRandR">xrandr</a>.</p>
<p>First, query X11 to find out what monitors there are:</p>
<pre name="code" class="bash">
$ xrandr -q
</pre>
<p>Once the monitor IDs are known, this fixes things for me:</p>
<pre name="code" class="bash">
$ xrandr --output VGA1 --auto --right-of LVDS1
</pre>
<p>Where LVDS1 is the laptop&#8217;s screen and VGA1 is the second screen.</p>
<p>Happy hackin&#8217;!</p>
]]></content:encoded>
			<wfw:commentRss>http://robertbasic.com/blog/configuring-2-monitors-with-xrandr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading to Fedora 16</title>
		<link>http://robertbasic.com/blog/upgrading-to-fedora-16/</link>
		<comments>http://robertbasic.com/blog/upgrading-to-fedora-16/#comments</comments>
		<pubDate>Sat, 12 Nov 2011 20:39:49 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[grub2]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[xfce]]></category>

		<guid isPermaLink="false">http://robertbasic.com/blog/?p=1347</guid>
		<description><![CDATA[Decided today to upgrade my laptop to Fedora 16, which was released a few days ago. I first switched to Fedora (with XFCE as the desktop environment) from Ubuntu in August, I think. An excellent decision as it is working really great for me. XFCE is also great, really happy that I made this switch. [...]]]></description>
			<content:encoded><![CDATA[<p>Decided today to upgrade my laptop to <a href="http://fedoraproject.org/">Fedora 16</a>, which was released a few days ago. I first switched to Fedora (with XFCE as the desktop environment) from Ubuntu in August, I think. An excellent decision as it is working really great for me. <a href="http://xfce.org/">XFCE</a> is also great, really happy that I made this switch.</p>
<p>Anyway, the upgrade from Fedora 15 to 16 went smoothly (although a bit slow, thanks to my shitty internet connection), using the <a href="http://fedoraproject.org/wiki/How_to_use_PreUpgrade">PreUpgrade</a> script/process. I was a bit sceptical about doing an upgrade and not a cleanstall, but gave it a shot after all (note: every time I tried a dist-upgrade with Ubuntu it failed miserably). PreUpgrade was downloading stuff for a bunch of hours and (about) an hour of installing them, the upgrade was&#8230; Done. Fedora 16 just booted up and I was using my laptop just as before.</p>
<p>I did the post upgrade steps from the above linked article, but the <code>yum distro-sync</code> step failed; it was complaining something about a &#8220;Transaction Check Error&#8221; for a libdvdcss package. I simply disabled the <strong>rpm.livna.org</strong> software source, re-run the distro-sync, it did it&#8217;s thing and then re-enabled the source.</p>
<p>The second thing that &#8220;wasn&#8217;t working&#8221; is that Apache and MySQL were not starting on bootup, so I ran chkconfig for both of &#8216;em:</p>
<pre name="code" class="bash">
$ chkconfig --levels 235 mysqld on
$ chkconfig --levels 235 httpd on
</pre>
<p>Lastly, grub was upgraded to grub2. It was working fine, just that it was showing the grub menu on startup, which is a bit silly given that I&#8217;m running only one OS on this machine. Anyway, added the following lines to <code>/etc/default/grub</code>:</p>
<pre name="code" class="bash">
GRUB_DISABLE_RECOVERY=true
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=0 # I actually edited this line, from 5 to 0
</pre>
<p>and ran:</p>
<pre name="code" class="bash">
$ grub2-mkconfig -o /boot/grub2/grub.cfg
</pre>
<p>I also thought for a while that there was an issue with my wifi, that it&#8217;s dropping connection randomly, but it only happened once, so I don&#8217;t know what to do with it.</p>
<p>Happy hackin&#8217;!</p>
]]></content:encoded>
			<wfw:commentRss>http://robertbasic.com/blog/upgrading-to-fedora-16/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debugging two PHP projects in Netbeans at the same time</title>
		<link>http://robertbasic.com/blog/debugging-two-php-projects-in-netbeans-at-the-same-time/</link>
		<comments>http://robertbasic.com/blog/debugging-two-php-projects-in-netbeans-at-the-same-time/#comments</comments>
		<pubDate>Fri, 19 Aug 2011 08:48:54 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[xdebug]]></category>
		<category><![CDATA[xdebug_break]]></category>

		<guid isPermaLink="false">http://robertbasic.com/blog/?p=1201</guid>
		<description><![CDATA[I&#8217;m currently working on some Symfony2 bundles and I have one Netbeans project for the main Symfony2 app and one project for the bundle. The bundle files are completely separated from the app and they are just linked (ln -s) together. It works great, except for the case when I need to debug some part [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently working on some Symfony2 bundles and I have one Netbeans project for the main Symfony2 app and one project for the bundle. The bundle files are completely separated from the app and they are just linked (<code>ln -s</code>) together. It works great, except for the case when I need to debug some part of the bundle&#8217;s code with Netbeans + xdebug. The debugger starts for the &#8220;main&#8221; project, which is the Symfony2 app, but setting breakpoints with Netbeans (y&#8217;know, by clicking the line number) for the bundle doesn&#8217;t really work, as those are in the other project and not in the debugged one, rendering the whole debugging useless.</p>
<p><a href="https://lh6.googleusercontent.com/-KhpIuTwjVCI/Tk4h6npl_jI/AAAAAAAAAq0/oFw9naQjc8w/s144/Screenshot.png"><img alt="" src="https://lh6.googleusercontent.com/-KhpIuTwjVCI/Tk4h6npl_jI/AAAAAAAAAq0/oFw9naQjc8w/s400/Screenshot.png" title="xdebug_break at work" class="alignright" width="400" height="70" /></a></p>
<p>The solution is pretty easy actually: instead of setting breakpoints with Netbeans, use <code>xdebug_break()</code> where you want the break to happen and it will happily be caught by the IDE. After the break happened use the &#8220;Step into&#8221; (F7) functionality to see what&#8217;s going on.</p>
]]></content:encoded>
			<wfw:commentRss>http://robertbasic.com/blog/debugging-two-php-projects-in-netbeans-at-the-same-time/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Changing Jenkins&#8217; home directory on Ubuntu</title>
		<link>http://robertbasic.com/blog/changing-jenkins-home-directory-on-ubuntu/</link>
		<comments>http://robertbasic.com/blog/changing-jenkins-home-directory-on-ubuntu/#comments</comments>
		<pubDate>Thu, 04 Aug 2011 08:19:25 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[jenkins]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://robertbasic.com/blog/?p=1185</guid>
		<description><![CDATA[I&#8217;ve started to play around with Jenkins yesterday and I kinda don&#8217;t like that it&#8217;s default home directory is /var/lib/jenkins so I changed it to /home/jenkins, so I&#8217;m throwing the steps needed out here for future reference. First, stop jenkins: robert@odin:~$ sudo /etc/init.d/jenkins stop Create the new home directory and move existing stuff from the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve started to play around with <a href="http://jenkins-ci.org/">Jenkins</a> yesterday and I kinda don&#8217;t like that it&#8217;s default home directory is /var/lib/jenkins so I changed it to /home/jenkins, so I&#8217;m throwing the steps needed out here for future reference.</p>
<p>First, stop jenkins:</p>
<pre name="code" class="bash">
robert@odin:~$ sudo /etc/init.d/jenkins stop
</pre>
<p>Create the new home directory and move existing stuff from the old home to the new one:</p>
<pre name="code" class="bash">
robert@odin:~$ sudo usermod -m -d /home/jenkins jenkins
</pre>
<p>Now, I didn&#8217;t manage to set the ENV JENKINS_HOME to the new home, it was always using the old one, so I edited the init.d script:</p>
<pre name="code" class="bash">
robert@odin:~$ sudo vi /etc/init.d/jenkins
</pre>
<p>and in the &#8220;DAEMON_ARGS=&#8230;&#8221; line change JENKINS_HOME env to <code>--env=JENKINS_HOME=/home/jenkins</code>. In the end the whole line reads something like:</p>
<pre name="code" class="bash">
DAEMON_ARGS="--name=$NAME --inherit --env=JENKINS_HOME=/home/jenkins --output=$JENKINS_LOG --pidfile=$PIDFILE"
</pre>
<p>Update on September 20th: Vranac blogged about how to change the <a href="http://blog.code4hire.com/2011/09/changing-the-jenkins-home-directory-on-ubuntu-take-2/">JENKINS_HOME properly</a></p>
<p>Start jenkins</p>
<pre name="code" class="bash">
robert@odin:~$ sudo /etc/init.d/jenkins start
</pre>
<p>and go to <code>http://server:port/configure</code> and verify that jenkins works as before and is using the new home.</p>
<p>Happy hackin&#8217;!</p>
]]></content:encoded>
			<wfw:commentRss>http://robertbasic.com/blog/changing-jenkins-home-directory-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debugging Zend Framework unit tests with Xdebug and NetBeans</title>
		<link>http://robertbasic.com/blog/debugging-zend-framework-unit-tests-with-xdebug-and-netbeans/</link>
		<comments>http://robertbasic.com/blog/debugging-zend-framework-unit-tests-with-xdebug-and-netbeans/#comments</comments>
		<pubDate>Sun, 24 Jul 2011 13:38:20 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[tests]]></category>
		<category><![CDATA[unit testing]]></category>
		<category><![CDATA[xdebug]]></category>
		<category><![CDATA[zend dojo]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://robertbasic.com/blog/?p=1162</guid>
		<description><![CDATA[I&#8217;ve spent this weekend hacking on some unit tests for Zend\Dojo and I ran into an issue where I need Xdebug to, well, debug. Note, that this is not for debugging a Zend Framework application, but for debugging Zend Framework itself. I am using Netbeans + Xdebug to debug regular code, but debugging unit tests [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve spent this weekend hacking on some <a href="https://github.com/robertbasic/zf2/tree/dojo">unit tests for Zend\Dojo</a> and I ran into an issue where I need Xdebug to, well, debug. Note, that this is not for debugging a Zend Framework application, but for debugging Zend Framework itself. I am using Netbeans + Xdebug to debug regular code, but debugging unit tests was something completely new for me. Turns out, it&#8217;s not entirely different from &#8220;regular&#8221; debugging.</p>
<p>Greatest help to figure out this was Raphael Dohms&#8217; blog post <a href="http://blog.rafaeldohms.com.br/2011/05/13/debugging-phpunit-tests-in-netbeans-with-xdebug/">&#8220;Debugging PHPUnit tests in Netbeans with Xdebug&#8221;</a>. Almost worked out fine, but Netbeans complained about a missing index file and the autoload of files was&#8230; not really working. After a bit of poking around, the solution was to go to File -> Project Properties -> Run Configuration and set the &#8220;Index File&#8221; to /path/to/zend_framework_2/tests/_autoload.php &#8211; no more missing index file and the autoload works too!</p>
<p>Starting the debug session stays the same as explained in Raphael&#8217;s post: click &#8220;Debug project&#8221; (CTRL+F5), go to the terminal and just type something like:</p>
<pre name="code" class="bash">
robert@odin:~/www/zf2/tests$ /path/to/phpunit-debug Zend/Dojo/DojoTest.php
</pre>
<p>Netbeans will pick up the connection and debugging can start!</p>
<p>Happy hackin&#8217;!</p>
]]></content:encoded>
			<wfw:commentRss>http://robertbasic.com/blog/debugging-zend-framework-unit-tests-with-xdebug-and-netbeans/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>pecl install apc fails on Ubuntu</title>
		<link>http://robertbasic.com/blog/pecl-install-apc-fails-on-ubuntu/</link>
		<comments>http://robertbasic.com/blog/pecl-install-apc-fails-on-ubuntu/#comments</comments>
		<pubDate>Sun, 10 Apr 2011 10:29:58 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[apc]]></category>
		<category><![CDATA[libpcre3]]></category>
		<category><![CDATA[pecl]]></category>

		<guid isPermaLink="false">http://robertbasic.com/blog/?p=1062</guid>
		<description><![CDATA[I was just installing APC on an Ubuntu server (what else to do on a Sunday morning?) with the standard set of commands: sudo apt-get install php-pear php5-dev sudo pecl install apc but the pecl install apc died with a bunch of &#8220;/tmp/pear/temp/APC/apc.c:430: error: ‘apc_regex’ has no member named ‘preg’&#8221; and similar messages. Luckily, I [...]]]></description>
			<content:encoded><![CDATA[<p>I was just installing APC on an Ubuntu server (what else to do on a Sunday morning?) with the standard set of commands:</p>
<pre name="code" class="bash">
sudo apt-get install php-pear php5-dev
sudo pecl install apc
</pre>
<p>but the <code>pecl install apc</code> died with a bunch of &#8220;/tmp/pear/temp/APC/apc.c:430: error: ‘apc_regex’ has no member named ‘preg’&#8221; and similar messages. Luckily, I can use google which led me to this <a href="http://serverfault.com/questions/206633/failed-to-instal-apc-via-pecl-install-apc/209577#209577">serverfault answer</a>: I was missing the &#8220;libpcre3-dev&#8221; package. After doing a quick <code>sudo apt-get install libcpre3-dev</code> APC got installed correctly.</p>
]]></content:encoded>
			<wfw:commentRss>http://robertbasic.com/blog/pecl-install-apc-fails-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing FreeBSD 8.2</title>
		<link>http://robertbasic.com/blog/installing-freebsd-8-2/</link>
		<comments>http://robertbasic.com/blog/installing-freebsd-8-2/#comments</comments>
		<pubDate>Sun, 27 Mar 2011 18:18:38 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[realtek]]></category>
		<category><![CDATA[rtl8187]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://robertbasic.com/blog/?p=1058</guid>
		<description><![CDATA[As I&#8217;m currently in the progress of installing FreeBSD on my first machine (out of 4), writing the process down for future reference sounds like a pretty good idea :) I&#8217;ve installed it from the CD image. The installation process was straightforward, altho either the boot loader or freebsd was getting confused in the first [...]]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;m currently in the progress of installing <a href="http://www.freebsd.org/">FreeBSD</a> on my first machine (out of 4), writing the process down for future reference sounds like a pretty good idea :)</p>
<p>I&#8217;ve installed it <a href="http://www.freebsd.org/where.html">from the CD image</a>. The installation process was straightforward, altho either the boot loader or freebsd was getting confused in the first few attempts because I was installing it on the slave HDD. After installing it on the master, everything went fine.</p>
<p>On this machine I&#8217;m using a <a href="http://uk.level1.com/product_d.php?id=410">LevelOne WNC0305 USB wireless card</a> which uses realtek&#8217;s dreaded RTL8187 chipset. After a bit of a googling, I ended up on the freebsd 8.2 hardware notes page, which in the <a href="http://www.freebsd.org/releases/8.2R/hardware.html#WLAN">wireless section</a> lists all the available wireless drivers. From there I figured I need to use the <a href="http://www.freebsd.org/cgi/man.cgi?query=urtw&#038;sektion=4&#038;manpath=FreeBSD+8.2-RELEASE">urtw driver</a>, that is to add:</p>
<pre name="code" class="bash">
if_urtw_load="YES"
</pre>
<p>to the /boot/loader.conf file. After rebooting the machine, it recognised my wireless card as urtw0. Hooray! Now to connect to the wireless router and onto the world.</p>
<p>For that, this message about <a href="http://forum.nginx.org/read.php?23,41676,41698#msg-41698">(not) getting the ifconfig scan results</a> helped me out, this bit to be precise:</p>
<pre name="code" class="bash">
# ifconfig wlan0 create wlandev urtw0
# ifconfig wlan0 up list scan
</pre>
<p>and it listed my router correctly. To make it stay that way after rebooting, I&#8217;ve added this to the /etc/rc.conf file (I might note that it was empty before this):</p>
<pre name="code" class="bash">
wlans_urtw0="wlan0"
</pre>
<p>At this time I figured I just could ssh to one of the servers in the office (we run freebsds there) and &#8220;steal&#8221; rest of the configuration, so I ended up with a /etc/rc.conf file something like this:</p>
<pre name="code" class="bash">
hostname="freebsd_box"
wlans_urtw0="wlan0"
ifconfig_wlan0="inet 192.168.0.100 netmask 255.255.255.0"
defaultrouter="192.168.0.1"
</pre>
<p>Reboot once again and I can ping anything via IP, but not via hostnames. Again, this (ooold) message about <a href="http://lists.freebsd.org/pipermail/freebsd-questions/2005-July/094364.html">DNS settings in freebsd</a> showed me the right direction &#8211; /etc/resolv.conf:</p>
<pre name="code" class="bash">
nameserver ip.of.name.server1
nameserver ip.of.name.server2
</pre>
<p>Reboot and everything is working fine! Victory!</p>
<p>Next step was (is) to fetch/update the <a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html">ports database</a>:</p>
<pre name="code" class="bash">
# csup -L 2 -h cvsup.freebsd.org /usr/share/examples/cvsup/ports-supfile
</pre>
<p>From here I believe it&#8217;s all about installing software from the ports which should be all fine.</p>
<p>Happy hackin&#8217;!</p>
]]></content:encoded>
			<wfw:commentRss>http://robertbasic.com/blog/installing-freebsd-8-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Netbeans tip &#8211; task filters</title>
		<link>http://robertbasic.com/blog/quick-netbeans-tip-task-filters/</link>
		<comments>http://robertbasic.com/blog/quick-netbeans-tip-task-filters/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 19:45:48 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[filters]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[tasks]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://robertbasic.com/blog/?p=898</guid>
		<description><![CDATA[I&#8217;m using Netbeans as my main IDE for PHP and Python projects for over a year now, yet only now I have stumbled upon this feature &#8211; creating filters for tasks that show up in the &#8220;Tasks&#8221; window (Ctrl+6 shortcut to show/hide the window). To be honest, I wasn&#8217;t even using it (until now), cause, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m using Netbeans as my main IDE for PHP and Python projects for over a year now, yet only now I have stumbled upon this feature &#8211; creating filters for tasks that show up in the &#8220;Tasks&#8221; window (Ctrl+6 shortcut to show/hide the window).</p>
<div id="attachment_899" class="wp-caption alignright" style="width: 310px"><a href="http://robertbasic.com/blog/wp-content/uploads/2010/04/screenshot-phpplaneta-netbeans-ide-68.png"><img src="http://robertbasic.com/blog/wp-content/uploads/2010/04/screenshot-phpplaneta-netbeans-ide-68-300x192.png" alt="Task filters" title="screenshot-phpplaneta-netbeans-ide-68" width="300" height="192" class="size-medium wp-image-899" /></a><p class="wp-caption-text">Task filters</p></div>
<div id="attachment_900" class="wp-caption alignright" style="width: 310px"><a href="http://robertbasic.com/blog/wp-content/uploads/2010/04/screenshot-task-list-filter.png"><img src="http://robertbasic.com/blog/wp-content/uploads/2010/04/screenshot-task-list-filter-300x127.png" alt="Setting rules for the filter" title="screenshot-task-list-filter" width="300" height="127" class="size-medium wp-image-900" /></a><p class="wp-caption-text">Setting rules for the filter</p></div>
<p>To be honest, I wasn&#8217;t even using it (until now), cause, by default it shows all the todo-s and issues from all the files from the current project. This can produce a pretty big list if (like me) you have Zend Framework, Pear and other frameworks and libraries set on the include path for the project you&#8217;re working in, as the little <code>@todo</code>-s will show up from those files, too.</p>
<p>Filters to the rescue. On the &#8220;Tasks&#8221; window there&#8217;s that little icon of that whatever-it&#8217;s-called showed on the first image, where you can create and edit filters. I&#8217;ve created a simple one, which excludes todo-s from files that have &#8220;Zend&#8221; in their location and includes only from PHP files (second image).</p>
<p>Me likes this feature.</p>
]]></content:encoded>
			<wfw:commentRss>http://robertbasic.com/blog/quick-netbeans-tip-task-filters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bad Firebug!</title>
		<link>http://robertbasic.com/blog/bad-firebug/</link>
		<comments>http://robertbasic.com/blog/bad-firebug/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 21:21:30 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[escaping]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://robertbasic.com/blog/?p=833</guid>
		<description><![CDATA[We all know about Firebug, probably the best developer add-on out there, and how awesome it is and how many times it helped us debug some nasty Javascript code, mess around with CSS and HTML on-the-fly, to track the time load of every external page element our app loads&#8230; It&#8217;s so cool that it even [...]]]></description>
			<content:encoded><![CDATA[<p>We all know about <a class="zem_slink" href="http://www.getfirebug.com/" title="Firebug" rel="homepage">Firebug</a>, probably the best developer add-on out there, and how awesome it is and how many times it helped us debug some nasty Javascript code, mess around with CSS and HTML on-the-fly, to track the time load of every external page element our app loads&#8230; It&#8217;s so cool that it even has it&#8217;s own add-ons! (<a class="zem_slink" href="http://www.firephp.org/" title="FirePHP" rel="homepage">FirePHP</a>, <a class="zem_slink" href="http://developer.yahoo.com/yslow/" title="YSlow" rel="homepage">YSlow</a> and FireCookie). Really, it helps our developer lives to suck a bit less.</p>
<p><strong>Note: the following text is not about bashing other developers and their works, but to highlight the importance of proper input filtering. I myself have failed on this, several times.</strong></p>
<p><div id="attachment_844" class="wp-caption alignright" style="width: 250px"><a href="http://robertbasic.com/blog/wp-content/uploads/2009/12/omg_im_old.png"><img src="http://robertbasic.com/blog/wp-content/uploads/2009/12/omg_im_old-240x300.png" alt="OMG! I'm 1023 years old!" title="omg_im_old" class="size-medium wp-image-844" height="300" width="240"></a><p class="wp-caption-text">OMG! I'm 1023 years old!</p></div> Let&#8217;s go back to the part where we mess with the HTML by the means of this, may I say, application. You can add, hide, remove HTML elements, add, alter, remove, attributes from HTML elements&#8230; Adding, hiding, deleting &#8211; boring; altering &#8211; fun! I have this urge to try to break every form on every website I find. Not to do any harm, just to take a look how my fellow developer did his job and if I see anything that&#8217;s not right, I try to contact him to fix that, cause, y&#8217;know, I&#8217;m a nice person&#8230; Anyhow, I recently found some sites where all the textfields and textareas were filtered properly and no harm could be done &#8211; all my &#8220;hack&#8221; attempts were caught by their application. Nice. Oh, look, a select box! Right-click, inspect element, value=&#8221;xyz&#8221;, change that to value=&#8221;abc&#8221;, submit the form&#8230; and poof! A sexy SQL error. All that with the help of our li&#8217;l friend, Firebug. The elements where the user is required to provide some information &#8220;by hand&#8221; were processed correctly, but the select box was not.</p>
<p>OK, let&#8217;s take this one step further. On a site where the user can register an account and afterwards can edit his or hers profile. I register, go to the user panel, the usual stuff &#8211; change email, password, location, DoB (Date of Birth)&#8230; A quick inspection of the source &#8211; a hidden field &#8220;id&#8221; with a number in it. Hmm&#8230; Quickly, I register another account, note the &#8220;id&#8221; on that second account, go back to the first account, change the &#8220;id&#8221; of the first account to the &#8220;id&#8221; of the second account, change the DoB (just to see any actual information changing), click submit&#8230; &#8220;Your profile has been updated successfully.&#8221; Mine? Not really, the DoB is like it was in the first place&#8230; Go to the second account&#8230; Oh boy. I successfully changed the DoB of the second account, with my first account. Now, I haven&#8217;t seen their source code, but I can imagine what was going on. Something like this:</p>
<pre class="php" name="code">$id = (int)$_POST['id'];
$dob = $_POST['dob'];

$sql = "UPDATE users SET dob = '" . $dob . "' WHERE id = " . $id;
</pre>
<p>On the positive side, when I entered letters in that hidden field, I was told by the app that I haven&#8217;t filled all the fields correctly, which means they filtered even the hidden field, but skipped to check if that &#8220;id&#8221; is actually me.</p>
<p>OK, I know, the title is &#8220;Bad Firebug!&#8221; and the problems are actually about filtering user input, but I needed a catchy title to have your attention on Twitter :P</p>
<p>Even tho a field seems &#8220;unchangeable&#8221;, with a help of an awesome little app, it becomes changeable. And dangerous.</p>
<p>Filter input, escape output :)</p>
<p>P.S.: On the image above you can see my profile on a bulletin board, where I changed my year of birth from 1986 to 986 with Firebug. The years are in a select box; the lowest value is 1910. You can see my actual profile <a href="http://www.dizajnzona.com/forums/index.php?s=&amp;setlanguage=1&amp;langid=en&amp;showuser=12706&amp;cal_id=0">here</a>.</p>
<div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/445b648e-1e0c-40e5-812a-0e115d9334e7/" title="Reblog this post [with Zemanta]"><img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=445b648e-1e0c-40e5-812a-0e115d9334e7" alt="Reblog this post [with Zemanta]"></a><span class="zem-script more-related pretty-attribution"><script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"></script></span></div>
]]></content:encoded>
			<wfw:commentRss>http://robertbasic.com/blog/bad-firebug/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Moblin, Linux for netbooks</title>
		<link>http://robertbasic.com/blog/moblin-linux-for-netbooks/</link>
		<comments>http://robertbasic.com/blog/moblin-linux-for-netbooks/#comments</comments>
		<pubDate>Thu, 21 May 2009 10:57:24 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Blablabla]]></category>
		<category><![CDATA[Free time]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[about]]></category>
		<category><![CDATA[introduction]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[moblin]]></category>
		<category><![CDATA[netbook]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://robertbasic.com/blog/?p=720</guid>
		<description><![CDATA[Moblin got me curios and I wanted to test it out: Moblin is an open source project focused on building a Linux-based platform optimized for the next generation of mobile devices including Netbooks, Mobile Internet Devices, and In-vehicle infotainment systems. Cause I don&#8217;t own (yet!) a netbook, I installed it under VirtualBox (VB from now [...]]]></description>
			<content:encoded><![CDATA[<p><a class="zem_slink" href="http://www.moblin.org/" title="Moblin" rel="homepage">Moblin</a> got me curios and I wanted to test it out:</p>
<blockquote><p>Moblin is an <a class="zem_slink" href="http://www.wikinvest.com/concept/Open_Source" title="Open Source" rel="wikinvest">open source</a> project focused on building a Linux-based platform optimized for the next generation of mobile devices including Netbooks, <a class="zem_slink" href="http://en.wikipedia.org/wiki/Mobile_internet_device" title="Mobile internet device" rel="wikipedia">Mobile Internet Devices</a>, and In-vehicle infotainment systems.</p></blockquote>
<p>Cause I don&#8217;t own (yet!) a netbook, I installed it under <a class="zem_slink" href="http://www.virtualbox.org/" title="VirtualBox" rel="homepage">VirtualBox</a> (VB from now on). The image is 666 MB big and it comes not in an .iso, but in a .img format. But, VB, a really awesome software, had no troubles booting from it. As with the majority of Linux distros nowadays, Moblin image is also a <a class="zem_slink" href="http://en.wikipedia.org/wiki/Live_CD" title="Live CD" rel="wikipedia">Live CD</a>, which means you can run it, without installing it.</p>
<div id="attachment_729" class="wp-caption alignright" style="width: 310px"><a href="http://robertbasic.com/blog/wp-content/uploads/2009/05/step10.png"><img src="http://robertbasic.com/blog/wp-content/uploads/2009/05/step10-300x247.png" alt="Installing Moblin" title="Installing Moblin" class="size-medium wp-image-729" height="247" width="300"></a><p class="wp-caption-text">Installing Moblin</p></div>
<p>The preinstall process is made up from 6-7 steps: choosing the language, the keyboard layout, the timezone and, of course, the partitioning. Basically, it&#8217;s just another boring “Next-Next” process. The installation itself took around 6 minutes to finish. When it&#8217;s done, it asks for a username and a password.</p>
<p>The first boot went pretty quickly, considering that booting under VB takes longer than booting under regular installations. The thing about VB is that it needs, the so called “Guest Additions” installed on the guest machine, so that the guest machine can be used normally. In this case, I failed to install it: Moblin comes with one version of the <a class="zem_slink" href="http://www.kernel.org/" title="Linux kernel" rel="homepage">Linux kernel</a> and the additions are for another version of the kernel. This prevented me in my quest to test Moblin fully. Anyway, I&#8217;ve managed to take a few screenshots of it, all are uploaded to <a href="http://picasaweb.google.com/robertbasic.com/Moblin">my Picasa profile</a>.</p>
<div id="attachment_732" class="wp-caption alignleft" style="width: 310px"><a href="http://robertbasic.com/blog/wp-content/uploads/2009/05/screen1.png"><img src="http://robertbasic.com/blog/wp-content/uploads/2009/05/screen1-300x247.png" alt="The m_zone" title="The m_zone" class="size-medium wp-image-732" height="247" width="300"></a><p class="wp-caption-text">The m_zone</p></div>
<p>There was one thing that was strange. It has a “<a href="http://moblin.org/documentation/moblin-netbook-intro/how-get-around-moblin-netbook-ui/status-panel">Status panel</a>”, from which you can update your profiles on social networks. A really useful stuff. I just opened it up and updated <a href="http://twitter.com/robertbasic">my Twitter profile</a>. Almost. I wasn&#8217;t logged in to Twitter from it and Moblin didn&#8217;t say a word about it. It just happily said that my status is updated. Once I found the “<a href="http://moblin.org/documentation/moblin-netbook-intro/show-me-how-connect-stuff/setting-web-services">Web services</a>” panel I logged in and this time I was really updating my Twitter stream.</p>
<p>I really was hoping to test it normally and write a detailed review of it, but this guest additions thingy thought otherwise. Moblin is a great <a class="zem_slink" href="http://en.wikipedia.org/wiki/Linux_distribution" title="Linux distribution" rel="wikipedia">distro</a>, even in this beta stage I believe it&#8217;s useful. What do you think? Did you test it already, saw it in action?</p>
<p>One thing&#8217;s for sure: when I&#8217;ll get myself a netbook, it&#8217;ll run on Moblin.</p>
<p>Cheers!</p>
<p>P.S.: Check out the <a href="http://moblin.org/documentation/moblin-netbook-intro">Moblin intro</a>, too!</p>
<div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/5d894d6e-e1b1-4532-9dc5-735a118271b5/" title="Reblog this post [with Zemanta]"><img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=5d894d6e-e1b1-4532-9dc5-735a118271b5" alt="Reblog this post [with Zemanta]"></a><span class="zem-script more-related pretty-attribution"><script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"></script></span></div>
]]></content:encoded>
			<wfw:commentRss>http://robertbasic.com/blog/moblin-linux-for-netbooks/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

