<?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>Pieter Vogelaar</title>
	<atom:link href="http://pietervogelaar.nl/feed/" rel="self" type="application/rss+xml" />
	<link>http://pietervogelaar.nl</link>
	<description>Freelance PHP developer</description>
	<lastBuildDate>Thu, 12 Apr 2012 12:12:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Command &#8220;df&#8221; in linux shows incorrect free space after file removal</title>
		<link>http://pietervogelaar.nl/command-df-in-linux-shows-incorrect-free-space-after-file-removal/</link>
		<comments>http://pietervogelaar.nl/command-df-in-linux-shows-incorrect-free-space-after-file-removal/#comments</comments>
		<pubDate>Wed, 21 Mar 2012 13:22:55 +0000</pubDate>
		<dc:creator>Pieter Vogelaar</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[redhat]]></category>

		<guid isPermaLink="false">http://pietervogelaar.nl/?p=325</guid>
		<description><![CDATA[Today the &#8220;/tmp&#8221; directory was full on a server because of a huge log file. When I checked it with the command &#8220;df -h&#8221; is saw that the directory used 100% of disk space. After I removed the log file, &#8220;df -h&#8221; still displayed the same value. I thought that it might be a caching [...]]]></description>
			<content:encoded><![CDATA[<p>Today the &#8220;/tmp&#8221; directory was full on a server because of a huge log file. When I checked it with the command &#8220;df -h&#8221; is saw that the directory used 100% of disk space. After I removed the log file, &#8220;df -h&#8221; still displayed the same value. I thought that it might be a caching problem, but the fact is that deleting a file name doesn&#8217;t actually delete the file.<br />
It is not visible anymore if you execute the command &#8220;ls -sal&#8221;, but if some other process is holding the file open, it is not really deleted.</p>
<p>To see which process is keeping the file open:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">lsof +L1</div></div>
<p>Now you know the process, you can kill or restart it and the file will be released and deleted.</p>
]]></content:encoded>
			<wfw:commentRss>http://pietervogelaar.nl/command-df-in-linux-shows-incorrect-free-space-after-file-removal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solr 3.5 &#8211; Search case insensitive on a string field for exact match</title>
		<link>http://pietervogelaar.nl/solr-3-5-search-case-insensitive-on-a-string-field-for-exact-match/</link>
		<comments>http://pietervogelaar.nl/solr-3-5-search-case-insensitive-on-a-string-field-for-exact-match/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 11:10:50 +0000</pubDate>
		<dc:creator>Pieter Vogelaar</dc:creator>
				<category><![CDATA[Solr]]></category>
		<category><![CDATA[case insensitive string]]></category>
		<category><![CDATA[solr]]></category>

		<guid isPermaLink="false">http://pietervogelaar.nl/?p=306</guid>
		<description><![CDATA[Solr has by default in the schema.xml the field type &#8220;string&#8221; available. &#60;!-- The StrField type is not analyzed, but indexed/stored verbatim. --&#62; &#60;fieldType name=&#34;string&#34; class=&#34;solr.StrField&#34; sortMissingLast=&#34;true&#34; omitNorms=&#34;true&#34;/&#62; With this field type you can search with a string to get an exact match, instead of a contains match that the &#8220;text_general&#8221; field type will give [...]]]></description>
			<content:encoded><![CDATA[<p>Solr has by default in the schema.xml the field type &#8220;string&#8221; available.</p>
<div class="codecolorer-container xml default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">&lt;!-- The StrField type is not analyzed, but indexed/stored verbatim. --&gt;</span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fieldType</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;string&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;solr.StrField&quot;</span> <span style="color: #000066;">sortMissingLast</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000066;">omitNorms</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span></div></div>
<p>With this field type you can search with a string to get an exact match, instead of a contains match that the &#8220;text_general&#8221; field type will give you. However another difference is that the &#8220;text_general&#8221; field type is <strong>case insensitive</strong> by default and &#8220;string&#8221; is <strong>case sensitive</strong>.</p>
<p>To perform an case insensitive exact match search, you&#8217;ll have to add a custom field type in your Solr schema.xml, I called it &#8220;string_ci&#8221; (string case insensitive).</p>
<div class="codecolorer-container xml default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">&lt;!-- With this field type case is preserved for stored values, but a case insensitive field will</span><br />
<span style="color: #808080; font-style: italic;"> &nbsp; &nbsp; be provided to search on. Caveat: case insensitive wildcard search cannot be done since</span><br />
<span style="color: #808080; font-style: italic;"> &nbsp; &nbsp; wild card phrases bypass the query analyzer and will not be lowercased before matching</span><br />
<span style="color: #808080; font-style: italic;"> &nbsp; &nbsp; against the index. This means that the characters in wildcard phrases must be lowercase in</span><br />
<span style="color: #808080; font-style: italic;"> &nbsp; &nbsp; order to match.</span><br />
<span style="color: #808080; font-style: italic;">--&gt;</span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fieldType</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;string_ci&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;solr.TextField&quot;</span> <span style="color: #000066;">sortMissingLast</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000066;">omitNorms</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;analyzer</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;query&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;tokenizer</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;solr.KeywordTokenizerFactory&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;filter</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;solr.LowerCaseFilterFactory&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/analyzer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/fieldType<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://pietervogelaar.nl/solr-3-5-search-case-insensitive-on-a-string-field-for-exact-match/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Solr 3.5 &#8211; Stop words are not removed</title>
		<link>http://pietervogelaar.nl/solr-3-5-stop-words-are-not-removed/</link>
		<comments>http://pietervogelaar.nl/solr-3-5-stop-words-are-not-removed/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 09:49:20 +0000</pubDate>
		<dc:creator>Pieter Vogelaar</dc:creator>
				<category><![CDATA[Solr]]></category>
		<category><![CDATA[not removed]]></category>
		<category><![CDATA[solr]]></category>
		<category><![CDATA[stop words]]></category>

		<guid isPermaLink="false">http://pietervogelaar.nl/?p=300</guid>
		<description><![CDATA[At http://wiki.apache.org/solr/LanguageAnalysis stop word files can be downloaded for several languages. Also the one for the English language is more extended than the default one shipped with Solr. However if you enable them with the solr.StopFilterFactory the stop words still are not removed. This is caused by the &#8220;&#124;&#8221; pipe characters after each word. Solr [...]]]></description>
			<content:encoded><![CDATA[<p>At <a href="http://wiki.apache.org/solr/LanguageAnalysis" target="_blank">http://wiki.apache.org/solr/LanguageAnalysis</a> stop word files can be downloaded for several languages. Also the one for the English language is more extended than the default one shipped with Solr.</p>
<p>However if you enable them with the solr.StopFilterFactory the stop words still are not removed. This is caused by the &#8220;|&#8221; pipe characters after each word. Solr wants every word on a new line without anything else. Also replacement of | to # doesn&#8217;t work. This problem can be hard to discover if you expect that information provided by the Solr website should just work.</p>
<p>So to still contain the nice comments, it&#8217;s best to put them above each word. Besides that I replaced all | characters with #.</p>
<p>Stop words should be working perfectly now! If you want to use multiple stop word files check out <a href="http://pietervogelaar.nl/solr-multiple-stop-word-files">http://pietervogelaar.nl/solr-multiple-stop-word-files</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://pietervogelaar.nl/solr-3-5-stop-words-are-not-removed/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Solr 3.5 &#8211; Multiple stop word files</title>
		<link>http://pietervogelaar.nl/solr-3-5-multiple-stop-word-files/</link>
		<comments>http://pietervogelaar.nl/solr-3-5-multiple-stop-word-files/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 09:41:45 +0000</pubDate>
		<dc:creator>Pieter Vogelaar</dc:creator>
				<category><![CDATA[Solr]]></category>
		<category><![CDATA[multiple stop words]]></category>
		<category><![CDATA[solr]]></category>

		<guid isPermaLink="false">http://pietervogelaar.nl/?p=295</guid>
		<description><![CDATA[As of Solr version 1.3 it&#8217;s possible to use multiple stop word files. You can define multiple files comma seperated like this: &#60;filter class=&#34;solr.StopFilterFactory&#34; ignoreCase=&#34;true&#34; &#160; &#160;words=&#34;stopwords_en.txt,stopwords_nl.txt&#34; &#160; &#160;enablePositionIncrements=&#34;true&#34; /&#62;]]></description>
			<content:encoded><![CDATA[<p>As of Solr version 1.3 it&#8217;s possible to use multiple stop word files. You can define multiple files comma seperated like this:</p>
<div class="codecolorer-container xml default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;filter</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;solr.StopFilterFactory&quot;</span> <span style="color: #000066;">ignoreCase</span>=<span style="color: #ff0000;">&quot;true&quot;</span></span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">words</span>=<span style="color: #ff0000;">&quot;stopwords_en.txt,stopwords_nl.txt&quot;</span></span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">enablePositionIncrements</span>=<span style="color: #ff0000;">&quot;true&quot;</span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">/&gt;</span></span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://pietervogelaar.nl/solr-3-5-multiple-stop-word-files/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Git how to create remote branch from checked out master</title>
		<link>http://pietervogelaar.nl/git-how-to-create-remote-branch-from-checked-out-master/</link>
		<comments>http://pietervogelaar.nl/git-how-to-create-remote-branch-from-checked-out-master/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 09:45:25 +0000</pubDate>
		<dc:creator>Pieter Vogelaar</dc:creator>
				<category><![CDATA[Version control]]></category>
		<category><![CDATA[create remote branch]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[master]]></category>

		<guid isPermaLink="false">http://pietervogelaar.nl/?p=276</guid>
		<description><![CDATA[In a project you&#8217;ll reach at a certain point the need to start working on a new major version of your application, lets say version 2. Then you&#8217;ll probably want the current master to move to a branch with a name like &#8220;1.x&#8221; and from then on the master branch will contain version &#8220;2.x&#8221;. To [...]]]></description>
			<content:encoded><![CDATA[<p>In a project you&#8217;ll reach at a certain point the need to start working on a new major version of your application, lets say version 2. Then you&#8217;ll probably want the current master to move to a branch with a name like &#8220;1.x&#8221; and from then on the master branch will contain version &#8220;2.x&#8221;.</p>
<p>To accomplish this, you&#8217;ll have to do some simple steps. I assume you already have a Git clone on your computer, go to the root directory of your clone and make sure you are in the master branch.</p>
<pre>
git branch -a
</pre>
<p>The branch with the &#8220;*&#8221; character before the name is the active one. Create a new branch &#8220;1.x&#8221; based on the master:</p>
<pre>
git checkout -b 1.x
</pre>
<p>A local branch 1.x should be created, you can check with &#8220;git branch -a&#8221;. The next command pushes the branch to the remote repository origin and tracks it.</p>
<pre>
git push -u origin 1.x
</pre>
<p>The branch exists now locally and in the remote Git repository. The active local branch is 1.x, check with &#8220;git branch -a&#8221;. If you want to work on the master branch again execute:</p>
<pre>
git checkout master
</pre>
]]></content:encoded>
			<wfw:commentRss>http://pietervogelaar.nl/git-how-to-create-remote-branch-from-checked-out-master/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 11.04 / OpenPanel &#8211; Install Webalizer</title>
		<link>http://pietervogelaar.nl/ubuntu-11-04-openpanel-install-webalizer/</link>
		<comments>http://pietervogelaar.nl/ubuntu-11-04-openpanel-install-webalizer/#comments</comments>
		<pubDate>Sat, 12 Nov 2011 14:26:12 +0000</pubDate>
		<dc:creator>Pieter Vogelaar</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[OpenPanel]]></category>
		<category><![CDATA[Webalizer]]></category>

		<guid isPermaLink="false">http://pietervogelaar.nl/?p=241</guid>
		<description><![CDATA[Make sure you make all changes as user &#8220;root&#8221;. Install Webalizer apt-get install webalizer First change the default webalizer config. nano /etc/webalizer/webalizer.conf Incremental processing allows multiple partial log files to be used instead of one huge one. And OpenPanel creates multiple files by default, so lets set &#8220;incremental&#8221; to yes. #Incremental no Incremental yes OpenPanel [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Make sure you make all changes as user &#8220;root&#8221;.</strong></p>
<p>Install Webalizer</p>
<pre>
apt-get install webalizer
</pre>
<p>First change the default webalizer config.</p>
<pre>
nano /etc/webalizer/webalizer.conf
</pre>
<p>Incremental processing allows multiple partial log files to be used instead of one huge one. And OpenPanel creates multiple files by default, so lets set &#8220;incremental&#8221; to yes.</p>
<pre>
#Incremental     no
Incremental     yes
</pre>
<p>OpenPanel created apache log files per virtual host, so we don&#8217;t have to do that by ourselves. The access log files are located at &#8220;/var/log/apache2/openpanel/logs&#8221;.</p>
<p>To generate stats from an apache access log file, you&#8217;ll have to execute the following command:</p>
<pre>
/usr/bin/webalizer -c /etc/webalizer/webalizer.conf -n www.example.com -s www.example.com -r www.example.com -q -T -o /var/www/webalizer/www.example.com /var/log/apache2/openpanel/logs/www.example.com.log
</pre>
<p>I created a shell script to automatically create stats for all virtual hosts. Put it for example at &#8220;/opt/webstats.sh&#8221;</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;height:500px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/sh</span><br />
<br />
<span style="color: #007800;">logDir</span>=<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>openpanel<span style="color: #000000; font-weight: bold;">/</span>logs<br />
<span style="color: #007800;">webalizerConf</span>=<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>webalizer<span style="color: #000000; font-weight: bold;">/</span>webalizer.conf<br />
<span style="color: #007800;">webalizerStatsDir</span>=<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>webalizer<br />
<span style="color: #007800;">vhostDir</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>openpanel-admin<span style="color: #000000; font-weight: bold;">/</span>sites<br />
<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #800000;">${logDir}</span><br />
<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">*</span>.log<br />
<span style="color: #000000; font-weight: bold;">do</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-f</span> <span style="color: #800000;">${file}</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span><br />
&nbsp; &nbsp; <span style="color: #007800;">virtualHost</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">basename</span> <span style="color: #800000;">${file}</span> .log<span style="color: #000000; font-weight: bold;">`</span><br />
<br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># Only create stats from log files that belong to virtual hosts</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-d</span> <span style="color: #800000;">${vhostDir}</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${virtualHost}</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># Create stats directory for the virtual host if it doesn't exist yet </span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-d</span> <span style="color: #800000;">${webalizerStatsDir}</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${virtualHost}</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #800000;">${webalizerStatsDir}</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${virtualHost}</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">fi</span> <br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># Create stats</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>webalizer <span style="color: #660033;">-c</span> <span style="color: #800000;">${webalizerConf}</span> <span style="color: #660033;">-n</span> <span style="color: #800000;">${virtualHost}</span> \<br />
&nbsp; &nbsp; &nbsp; <span style="color: #660033;">-s</span> <span style="color: #800000;">${virtualHost}</span> <span style="color: #660033;">-r</span> <span style="color: #800000;">${virtualHost}</span> <span style="color: #660033;">-q</span> <span style="color: #660033;">-T</span> <span style="color: #660033;">-o</span> <span style="color: #800000;">${webalizerStatsDir}</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${virtualHost}</span> \<br />
&nbsp; &nbsp; &nbsp; <span style="color: #800000;">${logDir}</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${file}</span> &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">fi</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">fi</span><br />
<span style="color: #000000; font-weight: bold;">done</span></div></div>
<p>Create a cronjob for it with:</p>
<pre>
crontab -e
</pre>
<p>And add the following file to generate stats every 5 minutes:</p>
<pre>
*/5 * * * * /opt/webstats.sh
</pre>
<p>If you want to view the stats in your browser go to &#8220;http://myserveripaddress/webalizer/www.example.com&#8221;. But you probably also want access with &#8220;http://www.example.com/webalizer&#8221;. To make this happen, extend your virtual host file with:</p>
<pre>
nano /etc/apache2/openpanel.d/www.example.com.inc/extended.conf
</pre>
<p>And add:</p>
<pre>
Alias /webalizer /var/www/webalizer/www.example.com
</pre>
<p>Restart the Apache web server</p>
<pre>
service apache2 restart
</pre>
<p>And you&#8217;re done! Everything should be working smoothly now.</p>
<h2>Password protection</h2>
<p>Optionally, you can also add password protection to the Webalizer directory. This way your stats will not be publicly available for everyone. Add the following commands to add the protection.</p>
<pre>
nano /var/www/webalizer/.htaccess
</pre>
<p>And add:</p>
<pre>
AuthGroupFile /dev/null
AuthName "Password Protected Area"
AuthType Basic
AuthUserFile /var/www/webalizer/.htpasswd
require valid-user
</pre>
<p>Create .htpasswd:</p>
<pre>
touch /var/www/webalizer/.htpasswd
</pre>
<p>And add a user (for example &#8220;admin&#8221;), you&#8217;ll be prompted to define a password.</p>
<pre>
htpasswd /var/www/webalizer/.htpasswd admin
</pre>
<p>Restart Apache web server</p>
<pre>
service apache2 restart
</pre>
<p>All your virtual host stats are password protected now with the user/pass defined above.</p>
]]></content:encoded>
			<wfw:commentRss>http://pietervogelaar.nl/ubuntu-11-04-openpanel-install-webalizer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 11.04 &#8211; Netbeans 7 clear cache</title>
		<link>http://pietervogelaar.nl/ubuntu-11-04-netbeans-7-clear-cache/</link>
		<comments>http://pietervogelaar.nl/ubuntu-11-04-netbeans-7-clear-cache/#comments</comments>
		<pubDate>Wed, 09 Nov 2011 13:14:16 +0000</pubDate>
		<dc:creator>Pieter Vogelaar</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[clear cache]]></category>
		<category><![CDATA[netbeans 7]]></category>
		<category><![CDATA[ubuntu 11.04]]></category>

		<guid isPermaLink="false">http://pietervogelaar.nl/?p=237</guid>
		<description><![CDATA[Sometimes code completion for Netbeans can be corrupted and will not work anymore for a certain project. This can be fixed if you clear the Netbeans cache. Close Netbeans. Remove the cache folder: rm -rf "/home/YOURNAME/.netbeans/var/cache" Start Netbeans 7 and everything should be working fine again!]]></description>
			<content:encoded><![CDATA[<p>Sometimes code completion for Netbeans can be corrupted and will not work anymore for a certain project. This can be fixed if you clear the Netbeans cache.</p>
<p>Close Netbeans. Remove the cache folder:</p>
<pre>
rm -rf "/home/YOURNAME/.netbeans/var/cache"
</pre>
<p>Start Netbeans 7 and everything should be working fine again!</p>
]]></content:encoded>
			<wfw:commentRss>http://pietervogelaar.nl/ubuntu-11-04-netbeans-7-clear-cache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 11.10 &#8211; Add Netbeans to Unity launcher</title>
		<link>http://pietervogelaar.nl/ubuntu-11-10-add-netbeans-to-unity-launcher/</link>
		<comments>http://pietervogelaar.nl/ubuntu-11-10-add-netbeans-to-unity-launcher/#comments</comments>
		<pubDate>Sat, 05 Nov 2011 10:43:50 +0000</pubDate>
		<dc:creator>Pieter Vogelaar</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[netbeans unity launcher]]></category>
		<category><![CDATA[ubuntu 11.10]]></category>

		<guid isPermaLink="false">http://pietervogelaar.nl/?p=232</guid>
		<description><![CDATA[To add Netbeans to the Unity launcher in Ubuntu 11.10 is unfortunately not as easy as executing the application and click &#8220;Stick in launcher&#8221;. Problems: - If you click on the icon again, it will try to start a new instance of Netbeans. Netbeans will see that it&#8217;s already opened, so it will not start [...]]]></description>
			<content:encoded><![CDATA[<p>To add Netbeans to the Unity launcher in Ubuntu 11.10 is unfortunately not as easy as executing the application and click &#8220;Stick in launcher&#8221;.</p>
<p>Problems:<br />
- If you click on the icon again, it will try to start a new instance of Netbeans. Netbeans will see that it&#8217;s already opened, so it will not start another instance, but this way it&#8217;s still dirty and slow.<br />
- Unity will forget the link on reboot, so the icon disappears.</p>
<p>To solve these problems, download <a href="http://plugins.netbeans.org/plugin/40321/unity-launcher" title="Netbeans Unity Launcher" target="_blank">http://plugins.netbeans.org/plugin/40321/unity-launcher</a> first.</p>
<p>Open Netbeans and go to Tools -> Plugins -> Downloads -> Add plugin. Select the downloaded Unity launcher plugin there and install it. Close Netbeans after installation.</p>
<p>As of Netbeans 7.1 the file described below is automatically created with also the correct permissions. For older versions than Netbeans 7.1 you&#8217;ll must proceed with the steps below. </p>
<p>Open a terminal and execute the following:</p>
<pre>
nano /home/YOURNAME/.local/share/applications/netbeans.desktop
</pre>
<p>And add the following with some minor changes of your own:</p>
<pre>
[Desktop Entry]
Name=Netbeans
Comment=Netbeans IDE
Exec=/home/YOURNAME/netbeans-7.0/bin/netbeans
Icon=/home/YOURNAME/netbeans-7.0/nb/netbeans.png
Terminal=false
Type=Application
StartupNotify=true
StartupWMClass=netbeans
</pre>
<p>Give your user execution rights:</p>
<pre>
chmod u+x /home/YOURNAME/.local/share/applications/netbeans.desktop
</pre>
<p>Now reboot your system and everything should work correctly!</p>
]]></content:encoded>
			<wfw:commentRss>http://pietervogelaar.nl/ubuntu-11-10-add-netbeans-to-unity-launcher/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ubuntu 11.10 &#8211; Install downloaded deb file with dependencies</title>
		<link>http://pietervogelaar.nl/ubuntu-11-10-install-downloaded-deb-file-with-dependencies/</link>
		<comments>http://pietervogelaar.nl/ubuntu-11-10-install-downloaded-deb-file-with-dependencies/#comments</comments>
		<pubDate>Sat, 05 Nov 2011 10:31:20 +0000</pubDate>
		<dc:creator>Pieter Vogelaar</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[deb]]></category>
		<category><![CDATA[dependencies]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[package]]></category>

		<guid isPermaLink="false">http://pietervogelaar.nl/?p=230</guid>
		<description><![CDATA[First of all, let me say it&#8217;s always best to install with the Ubuntu software centre or Synaptic (still my personal favourite). But if the package is only available for download on a certain website, for example MySQL Workbench, you must download the deb file (debian package) and install it by yourself. Open a terminal [...]]]></description>
			<content:encoded><![CDATA[<p>First of all, let me say it&#8217;s always best to install with the Ubuntu software centre or Synaptic (still my personal favourite). But if the package is only available for download on a certain website, for example MySQL Workbench, you must download the deb file (debian package) and install it by yourself. Open a terminal and execute:</p>
<pre>
sudo dpkg -i downloaded_package.deb
</pre>
<p>You will probably get errors about missing packages (dependencies) now. Execute:</p>
<pre>
sudo apt-get -f install
</pre>
<p>You&#8217;re done! The debian package is now successfully installed with all its dependencies!</p>
]]></content:encoded>
			<wfw:commentRss>http://pietervogelaar.nl/ubuntu-11-10-install-downloaded-deb-file-with-dependencies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disable jqGrid data load on initialization</title>
		<link>http://pietervogelaar.nl/disable-jqgrid-data-load-on-initialization/</link>
		<comments>http://pietervogelaar.nl/disable-jqgrid-data-load-on-initialization/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 10:11:35 +0000</pubDate>
		<dc:creator>Pieter Vogelaar</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[data load init]]></category>
		<category><![CDATA[jqGrid]]></category>

		<guid isPermaLink="false">http://pietervogelaar.nl/?p=222</guid>
		<description><![CDATA[I have a jqGrid in a tab that is initalized on page load, but at that time the tab is not visible yet. Because the tab is not visible, the grid JSON data should not be loaded right after grid initialization. It&#8217;s not very intuitive to get this done, but it&#8217;s quite easy to do! [...]]]></description>
			<content:encoded><![CDATA[<p>I have a jqGrid in a tab that is initalized on page load, but at that time the tab is not visible yet. Because the tab is not visible, the grid JSON data should not be loaded right after grid initialization. It&#8217;s not very intuitive to get this done, but it&#8217;s quite easy to do!</p>
<p>Set the grid attribute:</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">datatype<span style="color: #339933;">:</span> local</div></div>
<p>If the tab is clicked the following code must be executed to load the Grid data:</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#my-jqgrid-ID'</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; .<span style="color: #660066;">jqGrid</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'setGridParam'</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span> <span style="color: #3366CC;">'datatype'</span> <span style="color: #339933;">:</span> <span style="color: #3366CC;">'json'</span> <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; .<span style="color: #660066;">trigger</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'reloadGrid'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://pietervogelaar.nl/disable-jqgrid-data-load-on-initialization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

