<?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>DevReview.net</title>
	<atom:link href="http://devreview.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://devreview.net</link>
	<description>More development notices ...</description>
	<lastBuildDate>Sat, 10 Sep 2011 15:21:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>FreeBSD / OpenBSD: PF Firewall Filter Large Number Of Subnets and IP Address</title>
		<link>http://devreview.net/0901/freebsd-openbsd-pf-firewall-filter-large-number-of-subnets-and-ip-address/</link>
		<comments>http://devreview.net/0901/freebsd-openbsd-pf-firewall-filter-large-number-of-subnets-and-ip-address/#comments</comments>
		<pubDate>Thu, 01 Sep 2011 12:09:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=290</guid>
		<description><![CDATA[Q. How do I filter larger  number of subnets and IPs using OpenBSD&#8217;s pf firewall under FreeBSD 7.x  server? How do I log all dropped packets from such ips? How do I block  upto 10000 IPs or subnet without any performance penalty?
A. You can easily filter  large number of IPs or [...]]]></description>
			<content:encoded><![CDATA[<p>Q. How do I filter larger  number of subnets and IPs using OpenBSD&#8217;s pf firewall under FreeBSD 7.x  server? How do I log all dropped packets from such ips? How do I block  upto 10000 IPs or subnet without any performance penalty?</p>
<p>A. You can easily filter  large number of IPs or subnets using pf firewall. PF provides tables to  hold large number of IPv4 and IPv6 address. Lookups against a table are  very fast and consume less memory and processor time. Tables are created  in pf.conf file. Tables can also be populated from text files  containing a list of IP addresses and networks.</p>
<h2>How do I configure tables to drop large number of IPs?</h2>
<p>Open pf.conf file, enter:<br />
<code># vi /etc/pf.conf</code><br />
Add following code:<br />
<code>table &lt;blockedips&gt; persist file "/etc/pf.blocked.ip.conf"<br />
ext_if="em1" # interface connected to internet</code><br />
Add following code to drop and log all ips / subnet listed in /etc/pf.blocked.ip.conf, file<br />
<code>block drop in log (all)  quick on $ext_if from &lt;blockedips&gt; to any</code><br />
Save and close the file. Now create file /etc/pf.blocked.ip.conf file using vi text editor, enter:<br />
<code>vi /etc/pf.blocked.ip.conf</code><br />
Sample output:</p>
<pre>192.168.1.0/24
202.54.1.5
# 202.54.4.5</pre>
<p>The file /etc/pf.blocked.ip.conf should contain a list of IP  addresses and/or CIDR network blocks, one per line. Any line beginning  with # is treated as a comment and ignored by pf. To load new rules,  simply type:<br />
<code># pfctl -nf /etc/pf.conf<br />
# pfctl -f /etc/pf.conf</code></p>
<h2>How do I view all IP address listed in tables?</h2>
<p>Type the following command<br />
<code># pfctl -t blockedips -T show</code><br />
Sample output:</p>
<pre>   58.65.232.0/21
   58.83.12.0/22
   64.28.176.0/20
   64.255.128.0/19
   66.231.64.0/20
   67.213.128.0/20
   69.8.176.0/20</pre>
<h2>How do I add subnet called 91.196.232.0/22 on the fly?</h2>
<p>Use pfctl command itself, to add CIDR or IP on fly, enter:<br />
<code># pfctl -t blockedips -T add 202.54.11.11<br />
# pfctl -t blockedips -T add 91.196.232.0/22</code></p>
<h2>How do I delete subnet called 91.196.232.0/22 on the fly?</h2>
<p>Type the command as follows:<br />
<code># pfctl -t blockedips -T delete 91.196.232.0/22</code><br />
Please note that all changes made using pfct are dynamic. You need to update your file on disk to save the changes.</p>
<h2>How do I see statistics for each IP / CIDR?</h2>
<p>The -v option can display statistics for each table entry (IP/CIDR), enter:<br />
<code># pfctl -t blockedips -T show -v</code><br />
Sample output:</p>
<pre>   216.243.240.0/20
        Cleared:     Thu Jul 10 03:01:01 2008
        In/Block:    [ Packets: 0                  Bytes: 0                  ]
        In/Pass:     [ Packets: 0                  Bytes: 0                  ]
        Out/Block:   [ Packets: 0                  Bytes: 0                  ]
        Out/Pass:    [ Packets: 0                  Bytes: 0                  ]
   216.255.176.0/20
        Cleared:     Thu Jul 10 03:01:01 2008
        In/Block:    [ Packets: 0                  Bytes: 0                  ]
        In/Pass:     [ Packets: 0                  Bytes: 0                  ]
        Out/Block:   [ Packets: 0                  Bytes: 0                  ]
        Out/Pass:    [ Packets: 0                  Bytes: 0                  ]
</pre>
<h2>How do I view log of dropped IP from default /var/log/pflog file?</h2>
<p>Use tcpdump command to read a log file:<br />
<code># tcpdump -n -e -ttt -r /var/log/pflog<br />
# tcpdump -n -e -ttt -r /var/log/pflog port 80<br />
# tcpdump -n -e -ttt -r /var/log/pflog and host 202.33.1.2</code><br />
You can also view log in real time, enter:<br />
<code># tcpdump -n -e -ttt -i pflog0<br />
# tcpdump -n -e -ttt -i pflog0 port 80<br />
# tcpdump -n -e -ttt -i pflog0 host 202.33.1.2</code></p>
<p>Article copy pasted from here: http://www.cyberciti.biz/faq/opebsd-pf-firewall-block-subnets-ip-address/</p>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/0901/freebsd-openbsd-pf-firewall-filter-large-number-of-subnets-and-ip-address/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Config apache mod_wsgi for python web applications</title>
		<link>http://devreview.net/0529/apache-python-mod-wsgi-web/</link>
		<comments>http://devreview.net/0529/apache-python-mod-wsgi-web/#comments</comments>
		<pubDate>Sun, 29 May 2011 13:29:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[Hello World]]></category>
		<category><![CDATA[mod_wsgi]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=288</guid>
		<description><![CDATA[Installing mod_wsgi
Example of http.conf:
LoadModule wsgi_module        libexec/apache22/mod_wsgi.so
Example


    ServerName python.dev
    ServerAdmin webmaster@python.dev
    DocumentRoot "/usr/local/www/apache22/data/sites/python.dev"
    
       Order allow,deny
       Allow from all
    
    WSGIScriptAlias / /usr/local/www/apache22/data/sites/python.dev/index.py
    [...]]]></description>
			<content:encoded><![CDATA[<p>Installing mod_wsgi<br />
Example of http.conf:<br />
<code>LoadModule wsgi_module        libexec/apache22/mod_wsgi.so</code></p>
<p>Example<br />
<code><br />
<VirtualHost *:80><br />
    ServerName python.dev<br />
    ServerAdmin webmaster@python.dev<br />
    DocumentRoot "/usr/local/www/apache22/data/sites/python.dev"</p>
<p>    <Directory /usr/local/www/apache22/data/sites><br />
       Order allow,deny<br />
       Allow from all<br />
    </Directory></p>
<p>    WSGIScriptAlias / /usr/local/www/apache22/data/sites/python.dev/index.py</p>
<p>    ErrorLog "/var/log/python.dev-error_log"<br />
    CustomLog "/var/log/python.dev-access_log" common<br />
</VirtualHost></p>
<p></code> </p>
<p>Example of index.py<br />
<code><br />
def application(environ, start_response):<br />
    status = '200 OK'<br />
    output = 'Hee ello 34 World!'</p>
<p>    response_headers = [('Content-type', 'text/plain'),<br />
                        ('Content-Length', str(len(output)))]<br />
    start_response(status, response_headers)</p>
<p>    return [output]<br />
</code></p>
<p>restart apache &#038; check http://python.dev</p>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/0529/apache-python-mod-wsgi-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install samba on freebsd</title>
		<link>http://devreview.net/0416/install-samba-on-freebsd/</link>
		<comments>http://devreview.net/0416/install-samba-on-freebsd/#comments</comments>
		<pubDate>Sat, 16 Apr 2011 16:24:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[samba freebsd]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=286</guid>
		<description><![CDATA[How to install samba on freebsd if its intsalled on vmware from host machine where installed windows
1. Install samba via ports, make install clean
Lets assume that username is &#8220;hockey&#8221;
2. put in rc.conf
nmbd_enable="YES"
smbd_enable="YES"

3. edit smb.conf
mcedit /usr/local/etc/smb.conf
with
[global]
 workgroup = samba
 server string = SambaServer
 security = user
 hosts allow = 192.168. 192.168.2. 127.
[hockey]
 comment = hockey stuff
 [...]]]></description>
			<content:encoded><![CDATA[<p>How to install samba on freebsd if its intsalled on vmware from host machine where installed windows</p>
<p>1. Install samba via ports, make install clean<br />
Lets assume that username is &#8220;hockey&#8221;</p>
<p>2. put in rc.conf</p>
<pre>nmbd_enable="YES"</pre>
<pre>smbd_enable="YES"</pre>
<p><span id="more-286"></span><br />
3. edit smb.conf</p>
<pre>mcedit /usr/local/etc/smb.conf</pre>
<p>with</p>
<p>[global]</p>
<pre> workgroup = samba</pre>
<pre> server string = SambaServer</pre>
<pre> security = user</pre>
<pre> hosts allow = 192.168. 192.168.2. 127.</pre>
<p>[hockey]</p>
<pre> comment = hockey stuff</pre>
<pre> path = /home/hockey</pre>
<pre> valid users = hockey</pre>
<pre> public = no</pre>
<pre> writable = yes</pre>
<pre> printable = no</pre>
<pre> create mask = 0644</pre>
<p>4.</p>
<pre>hockey# smbpasswd -a hockey</pre>
<pre>New SMB password:</pre>
<pre>Retype new SMB password:</pre>
<pre>Added user hockey.</pre>
<p>5. start samba daemon</p>
<pre>/usr/local/etc/rc.d/samba start</pre>
<p>7. check ifconfig ip address</p>
<p>open from windows</p>
<pre>\\192.168.81.130\hockey\share</pre>
<pre>username: hockey (without: HOCKEY/)</pre>
<pre>pass:[password]</pre>
<p>done</p>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/0416/install-samba-on-freebsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to svn:ignore for directory or file</title>
		<link>http://devreview.net/1216/how-to-svnignore-for-directory-or-file/</link>
		<comments>http://devreview.net/1216/how-to-svnignore-for-directory-or-file/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 00:57:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=284</guid>
		<description><![CDATA[First of all remove old not needed resources from svn and local copy.
On top level use command:

here is directory structure  sample:
\application
    \files
    \tmp

&#62; svn st
M  files
?  tmp

set the ignore property for tmp
&#62; svn propedit svn:ignore ./

In opened vi editor add newlines what should be ignored, in mine [...]]]></description>
			<content:encoded><![CDATA[<p>First of all remove old not needed resources from svn and local copy.</p>
<p>On top level use command:</p>
<div>
<p>here is directory structure  sample:</p>
<pre><code>\application
    \files
    \tmp</code>
</pre>
<pre><code>&gt; svn st
M  files
?  tmp
</code></pre>
<p>set the ignore property for tmp</p>
<pre><code>&gt; svn propedit svn:ignore ./
</code></pre>
<div>In opened vi editor add newlines what should be ignored, in mine example its just &#8220;tmp&#8221;.</div>
<div>Dont forget commit changed ./ dir.</div>
<div></div>
<div>how to check what props are set? :</div>
<pre><code>&gt; svn proplist
Properties on '.':
  svn:ignore
</code></pre>
<p>to see the value of <code>svn:ignore</code></p>
<pre><code>&gt; svn propget svn:ignore
tmp

how to delete svn:ignore?
1. just use "svn propedit" again and remove what should be removed
or totally remove properties from dir:
2. svn propdel svn:ignore ./ 

end.
</code></pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/1216/how-to-svnignore-for-directory-or-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up SSH public/private keys</title>
		<link>http://devreview.net/1113/setting-up-ssh-publicprivate-keys/</link>
		<comments>http://devreview.net/1113/setting-up-ssh-publicprivate-keys/#comments</comments>
		<pubDate>Sat, 13 Nov 2010 00:16:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[freebsd]]></category>
		<category><![CDATA[private key]]></category>
		<category><![CDATA[pub/private keys]]></category>
		<category><![CDATA[public key]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ssh keys]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=270</guid>
		<description><![CDATA[
SSH (Secure Shell) can be set up with public/private key pairs so that you don&#8217;t have to type the password each time. Because SSH is the transport for other services such as SCP (secure copy), SFTP (secure file transfer), and other services (CVS, etc), this can be very convenient and save you a lot of [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-271" href="http://devreview.net/1113/setting-up-ssh-publicprivate-keys/ssh_rsa/"><img class="alignnone size-full wp-image-271" title="ssh_rsa" src="http://devreview.net/content/2010/11/ssh_rsa.png" alt="" width="150" height="150" /></a></p>
<p>SSH (Secure Shell) can be set up with public/private key pairs so that you don&#8217;t have to type the password each time. Because SSH is the transport for other services such as SCP (secure copy), SFTP (secure file transfer), and other services (CVS, etc), this can be very convenient and save you a lot of typing.</p>
<h3>SSH Version 2</h3>
<p>On the local machine, type the BOLD part.  The non-bold part is what you might see as output or prompt.</p>
<ul>
<li>Step 1:<br />
<tt>% <strong>ssh-keygen -t dsa</strong><br />
</tt><tt>Generating public/private dsa key pair.<br />
Enter file in which to save the key (~/.ssh/id_dsa): </tt><span style="color: #ff3300;">(just type return)</span><tt><br />
Enter passphrase (empty for no passphrase): </tt><span style="color: #ff3300;">(just type return)</span><tt><br />
Enter same passphrase again: </tt><span style="color: #ff3300;">(just type return)</span><tt><br />
Your identification has been saved in ~/.ssh/id_dsa<br />
Your public key has been saved in ~/.ssh/id_dsa.pub<br />
The key fingerprint is:<br />
Some really long string<br />
% </tt></li>
<li>Step 2:<br />
Then, paste the content of the local <tt>~/.ssh/id_dsa.pub</tt> file into the file <tt>~/.ssh/authorized_keys</tt> on the remote host.</li>
</ul>
<p><span id="more-270"></span></p>
<ul>
<li>RSA instead of DSA
<ul>
<li>If you want something strong, you could try<br />
<tt>% <strong>ssh-keygen</strong> -t <span style="color: #3300ff;">rsa</span> -b 4096</tt></li>
<li>Instead of the names <tt>id_dsa</tt> and <tt>id_dsa.pub</tt>, it will be <tt>id_<span style="color: #3300ff;">rsa</span></tt> and <tt>id_<span style="color: #0033ff;">rsa</span>.pub</tt>, etc.</li>
<li>The rest of the steps are identical.</li>
</ul>
</li>
</ul>
<p>That&#8217;s it!</p>
<p>FAQ:</p>
<ul>
<li>Q: I follow the exact steps, but ssh still ask me for my password!</li>
<li>A: Check your remote .ssh directory. It should have only your own read/write/access permission (octal 700)<br />
<tt>% <strong>chmod</strong> 700 ~/.ssh</tt></li>
</ul>
<h3>SSH Version 1</h3>
<ul>
<li>Step 1:<br />
<tt>% <strong>cd ~/.ssh</strong><br />
% <strong>ssh-keygen -t rsa1</strong><br />
Generating public/private rsa1 key pair.<br />
Enter file in which to save the key (~/.ssh/identity): </tt><span style="color: #ff3300;">(just type return)</span><tt><br />
Enter passphrase (empty for no passphrase): </tt><span style="color: #ff3300;">(just type return)</span><tt><br />
Enter same passphrase again: </tt><span style="color: #ff3300;">(just type return)</span><tt><br />
Your identification has been saved in ~/.ssh/identity<br />
Your public key has been saved in ~/.ssh/identity.pub<br />
The key fingerprint is:<br />
Some really long string<br />
% </tt></li>
<li>Step 2:<br />
Then, paste content of the local <tt>~/.ssh/identity.pub</tt> file into the file <tt>~/.ssh/authorized_keys</tt> on the remote host.</li>
</ul>
<p>Found here: http://www.ece.uci.edu/~chou/ssh-key.html</p>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/1113/setting-up-ssh-publicprivate-keys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install maven on freebsd</title>
		<link>http://devreview.net/1111/install-maven-on-freebsd/</link>
		<comments>http://devreview.net/1111/install-maven-on-freebsd/#comments</comments>
		<pubDate>Thu, 11 Nov 2010 03:21:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[apache maven]]></category>
		<category><![CDATA[build project]]></category>
		<category><![CDATA[build tool]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=261</guid>
		<description><![CDATA[
Maven&#8217;s Objectives
Maven&#8217;s primary goal is to allow a developer to comprehend the complete state of a development effort in the shortest period of time. In order to attain this goal there are several areas of concern that Maven attempts to deal with:

Making the build process easy
Providing a uniform build system
Providing quality project information
Providing guidelines for [...]]]></description>
			<content:encoded><![CDATA[<h2><a rel="attachment wp-att-265" href="http://devreview.net/1111/install-maven-on-freebsd/apache-maven-project-2-png/"><img class="alignnone size-full wp-image-265" title="apache-maven-project-2.png" src="http://devreview.net/content/2010/11/apache-maven-project-2.png.jpg" alt="" width="437" height="93" /></a></h2>
<h2>Maven&#8217;s Objectives<a name="Mavens_Objectives"></a></h2>
<p>Maven&#8217;s primary goal is to allow a developer to comprehend the complete state of a development effort in the shortest period of time. In order to attain this goal there are several areas of concern that Maven attempts to deal with:</p>
<ul>
<li>Making the build process easy</li>
<li>Providing a uniform build system</li>
<li>Providing quality project information</li>
<li>Providing guidelines for best practices development</li>
<li>Allowing transparent migration to new features</li>
</ul>
<h2><span id="more-261"></span></p>
<p>Feature Summary<a name="Feature_Summary"></a></h2>
<p>The following are the key features of Maven in a nutshell:</p>
<ul>
<li>Simple project setup that follows best practices &#8211; get a new project or module started in seconds</li>
<li>Consistent usage across all projects means no ramp up time for new developers coming onto a project</li>
<li>Superior dependency management including automatic updating, dependency closures (also known as transitive dependencies)</li>
<li>Able to easily work with multiple projects at the same time</li>
<li>A large and growing repository of libraries and metadata to use out of the box, and arrangements in place with the largest Open Source projects for real-time availability of their latest releases</li>
<li>Extensible, with the ability to easily write plugins in Java or scripting languages</li>
<li>Instant access to new features with little or no extra configuration</li>
<li>Ant tasks for dependency management and deployment outside of Maven</li>
<li>Model based builds: Maven is able to build any number of projects into predefined output types such as a JAR, WAR, or distribution based on metadata about the project, without the need to do any scripting in most cases.</li>
<li>Coherent site of project information: Using the same metadata as for the build process, Maven is able to generate a web site or PDF including any documentation you care to add, and adds to that standard reports about the state of development of the project. Examples of this information can be seen at the bottom of the left-hand navigation of this site under the &#8220;Project Information&#8221; and &#8220;Project Reports&#8221; submenus.</li>
<li>Release management and distribution publication: Without much additional configuration, Maven will integrate with your source control system such as CVS and manage the release of a project based on a certain tag. It can also publish this to a distribution location for use by other projects. Maven is able to publish individual outputs such as a JAR, an archive including other dependencies and documentation, or as a source distribution.</li>
<li>Dependency management: Maven encourages the use of a central repository of JARs and other dependencies. Maven comes with a mechanism that your project&#8217;s clients can use to download any JARs required for building your project from a central JAR repository much like Perl&#8217;s CPAN. This allows users of Maven to reuse JARs across projects and encourages communication between projects to ensure that backward compatibility issues are dealt with. We are collaborating with the folks at <a href="http://www.ibiblio.org/">Ibiblio</a> who have graciously allowed the central repository to live on their servers.</li>
</ul>
<p>root@hockey(~)# whereis maven<br />
maven: /usr/ports/devel/maven</p>
<p>root@hockey(~)# cd /usr/ports/devel/maven<br />
root@hockey(/usr/ports/devel/maven)# make install clean</p>
<p>&#8230;&#8230;</p>
<p>You may initialize your repository with:<br />
/usr/local/share/java/maven/bin/install_repo.sh ~/.maven/repository</p>
<p>If you are behind a proxy, create a ~/.mavenrc file with something like:<br />
MAVEN_OPTS=&#8221;$MAVEN_OPTS -Dmaven.proxy.host=YOUR_PROXY_HOSTNAME<br />
-Dmaven.proxy.port=YOUR_PROXY_PORT&#8221;<br />
===&gt;   Registering installation for maven-1.0.2_2<br />
===&gt;  Cleaning for maven-1.0.2_2</p>
<p>done</p>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/1111/install-maven-on-freebsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook statistics</title>
		<link>http://devreview.net/1031/facebook-statistics/</link>
		<comments>http://devreview.net/1031/facebook-statistics/#comments</comments>
		<pubDate>Sun, 31 Oct 2010 20:24:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[facebook statistics]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=258</guid>
		<description><![CDATA[Statistics
People on Facebook
* More than 500 million active users
* 50% of our active users log on to Facebook in any given day
* Average user has 130 friends
* People spend over 700 billion minutes per month on Facebook
Activity on Facebook
* There are over 900 million objects that people interact with (pages, groups, events and community pages)
* [...]]]></description>
			<content:encoded><![CDATA[<p>Statistics<br />
People on Facebook</p>
<p>* More than 500 million active users<br />
* 50% of our active users log on to Facebook in any given day<br />
* Average user has 130 friends<br />
* People spend over 700 billion minutes per month on Facebook</p>
<p>Activity on Facebook</p>
<p>* There are over 900 million objects that people interact with (pages, groups, events and community pages)<br />
* Average user is connected to 80 community pages, groups and events<br />
* Average user creates 90 pieces of content each month<br />
* More than 30 billion pieces of content (web links, news stories, blog posts, notes, photo albums, etc.) shared each month.</p>
<p><span id="more-258"></span><br />
Global Reach</p>
<p>* More than 70 translations available on the site<br />
* About 70% of Facebook users are outside the United States<br />
* Over 300,000 users helped translate the site through the translations application</p>
<p>Platform</p>
<p>* More than one million developers and entrepreneurs from more than 180 countries<br />
* Every month, more than 70% of Facebook users engage with Platform applications<br />
* More than 550,000 active applications currently on Facebook Platform<br />
* More than one million websites have integrated with Facebook Platform<br />
* More than 150 million people engage with Facebook on external websites every month<br />
* Two-thirds of comScore’s U.S. Top 100 websites and half of comScore’s Global Top 100 websites have integrated with Facebook</p>
<p>Mobile</p>
<p>* There are more than 150 million active users currently accessing Facebook through their mobile devices.<br />
* People that use Facebook on their mobile devices are twice as active on Facebook than non-mobile users.<br />
* There are more than 200 mobile operators in 60 countries working to deploy and promote Facebook mobile products</p>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/1031/facebook-statistics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE7 getElementById bug</title>
		<link>http://devreview.net/1029/ie7-getelementbyid-bug/</link>
		<comments>http://devreview.net/1029/ie7-getelementbyid-bug/#comments</comments>
		<pubDate>Fri, 29 Oct 2010 01:33:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[getElementById]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[IE7]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=256</guid>
		<description><![CDATA[&#60;html&#62;
&#60;body&#62;
&#60;input type=&#8221;text&#8221; name=&#8221;q&#8221; id=&#8221;qTop&#8221;  value=&#8221;2&#8243; &#62;
&#60;input type=&#8221;text&#8221; name=&#8221;q&#8221; id=&#8221;q&#8221;     value=&#8221;3&#8243; &#62;
&#60;script&#62;
var el = document.getElementById(&#8216;q&#8217;);
alert(el.value);
alert(el.id);
&#60;/script&#62;
&#60;/body&#62;
&#60;/html&#62;
So, guess what?
Exactly, this one will output: 2, qTop instead of 3,q
Known Microsoft issue aroung getElementById fixed in IE8.
]]></description>
			<content:encoded><![CDATA[<p>&lt;html&gt;<br />
&lt;body&gt;<br />
&lt;input type=&#8221;text&#8221; name=&#8221;q&#8221; id=&#8221;qTop&#8221;  value=&#8221;2&#8243; &gt;<br />
&lt;input type=&#8221;text&#8221; name=&#8221;q&#8221; id=&#8221;q&#8221;     value=&#8221;3&#8243; &gt;<br />
&lt;script&gt;<br />
var el = document.getElementById(&#8216;q&#8217;);<br />
alert(el.value);<br />
alert(el.id);<br />
&lt;/script&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p>
<p>So, guess what?<br />
Exactly, this one will output: 2, qTop instead of 3,q</p>
<p>Known Microsoft issue aroung getElementById fixed in IE8.</p>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/1029/ie7-getelementbyid-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Confluence on FreeBSD</title>
		<link>http://devreview.net/1017/install-confluence-on-freebsd/</link>
		<comments>http://devreview.net/1017/install-confluence-on-freebsd/#comments</comments>
		<pubDate>Sun, 17 Oct 2010 08:45:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[atlassian]]></category>
		<category><![CDATA[confluence]]></category>
		<category><![CDATA[install freebsd confluence]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=245</guid>
		<description><![CDATA[
1. download tar.gz from atlassian site
2. create new user for ex.: &#8220;wiki&#8221; (better with .cshrc)
3. add &#8220;setenv JAVA_HOME /usr/local/jdk1.6.0&#8243; to .cshrc
4. check with echo $JAVA_HOME
5. create new dir in /home/wiki/confluence-data
6. set home directory for confluence
confluence.home = /home/wiki/confluence-data
in [common]/confluence/WEB-INF/classes/confluence-init.properties
7. change port for server (usually 8080 is busy)
&#60;Connector className=&#8221;org.apache.coyote.tomcat4.CoyoteConnector&#8221; port=&#8221;8090&#8243; minProcessors=&#8221;5&#8243; &#8230;
6. start bin/.startup.sh
7. check sockstat -4
8. [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-249" href="http://devreview.net/1017/install-confluence-on-freebsd/rtemagicc_confluence_logo_04-png/"><img class="alignnone size-full wp-image-249" title="RTEmagicC_confluence_logo_04.png" src="http://devreview.net/content/2010/10/RTEmagicC_confluence_logo_04.png.png" alt="" width="262" height="106" /></a></p>
<p>1. download tar.gz from atlassian site<br />
2. create new user for ex.: &#8220;wiki&#8221; (better with .cshrc)<br />
3. add &#8220;setenv JAVA_HOME /usr/local/jdk1.6.0&#8243; to .cshrc<br />
4. check with echo $JAVA_HOME<br />
5. create new dir in /home/wiki/confluence-data</p>
<p>6. set home directory for confluence<br />
confluence.home = /home/wiki/confluence-data<br />
in [common]/confluence/WEB-INF/classes/confluence-init.properties</p>
<p>7. change port for server (usually 8080 is busy)<br />
&lt;Connector className=&#8221;org.apache.coyote.tomcat4.CoyoteConnector&#8221; port=&#8221;8090&#8243; minProcessors=&#8221;5&#8243; &#8230;</p>
<p>6. start bin/.startup.sh<br />
7. check sockstat -4<br />
8. open http://192.168.81.128:8090<br />
9. config other option via jira via web interface<br />
[10. choose embedded storage for testing purposes]</p>
<p>done</p>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/1017/install-confluence-on-freebsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setup InnoDB default MySQL engine</title>
		<link>http://devreview.net/1017/setup-innodb-default-mysql-engine/</link>
		<comments>http://devreview.net/1017/setup-innodb-default-mysql-engine/#comments</comments>
		<pubDate>Sun, 17 Oct 2010 08:12:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[innodb]]></category>
		<category><![CDATA[mysql innodb]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=242</guid>
		<description><![CDATA[1. stop mysql-server if running
/usr/local/etc/rc.d/mysql-server stop
2. update /etc/my.cfg with adding new config
default-storage_engine = InnoDB
and uncomment next lines
# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /var/db/mysql/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /var/db/mysql/
# You can set .._buffer_pool_size up to 50 &#8211; 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = [...]]]></description>
			<content:encoded><![CDATA[<p>1. stop mysql-server if running</p>
<p>/usr/local/etc/rc.d/mysql-server stop</p>
<p>2. update /etc/my.cfg with adding new config</p>
<p>default-storage_engine = InnoDB</p>
<p>and uncomment next lines</p>
<p># Uncomment the following if you are using InnoDB tables<br />
#innodb_data_home_dir = /var/db/mysql/<br />
#innodb_data_file_path = ibdata1:10M:autoextend<br />
#innodb_log_group_home_dir = /var/db/mysql/<br />
# You can set .._buffer_pool_size up to 50 &#8211; 80 %<br />
# of RAM but beware of setting memory usage too high<br />
#innodb_buffer_pool_size = 16M<br />
#innodb_additional_mem_pool_size = 2M<br />
# Set .._log_file_size to 25 % of buffer pool size<br />
#innodb_log_file_size = 5M<br />
#innodb_log_buffer_size = 8M<br />
#innodb_flush_log_at_trx_commit = 1<br />
#innodb_lock_wait_timeout = 50</p>
<p>3. start mysql-server again</p>
<p>/usr/local/etc/rc.d/mysql-server start</p>
<p>4. check engine property, after logged into mysql&gt;</p>
<p>show variables like &#8220;%engine%&#8221;;</p>
<p>done</p>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/1017/setup-innodb-default-mysql-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install JIRA on FreeBSD</title>
		<link>http://devreview.net/1017/install-jira-on-freebsd/</link>
		<comments>http://devreview.net/1017/install-jira-on-freebsd/#comments</comments>
		<pubDate>Sun, 17 Oct 2010 04:54:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[atlassian]]></category>
		<category><![CDATA[how to install jira]]></category>
		<category><![CDATA[intall jira on freebsd]]></category>
		<category><![CDATA[jira]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=240</guid>
		<description><![CDATA[
How to install jira on freebsd manual
1.  First of all you should register on atlassian.com site, select needed version, find url for download. Also this registration needed for obtaining jira license (doesn&#8217;t matter if its for evaluation or for parmanent use). In this article I have downloaded Jira 4.2
2. Create separate new user from root [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-252" href="http://devreview.net/1017/install-jira-on-freebsd/logo_jira/"><img class="alignnone size-full wp-image-252" title="LOGO_JIRA" src="http://devreview.net/content/2010/10/LOGO_JIRA.png" alt="" width="292" height="134" /></a></p>
<h2>How to install jira on freebsd manual</h2>
<p>1.  First of all you should register on atlassian.com site, select needed version, find url for download. Also this registration needed for obtaining jira license (doesn&#8217;t matter if its for evaluation or for parmanent use). In this article I have downloaded Jira 4.2</p>
<p>2. Create separate new user from root on your machine with command:</p>
<pre>#adduser</pre>
<p>(for example: jira, with shell for example: csh)</p>
<p>login under jira user</p>
<pre>su - jira
</pre>
<p><span id="more-240"></span><br />
3. Set patch to JAVA_HOME into .cshrc file, its reqired for installation. (By the way installation java also described on blog, use search if you dont have installed java yet)</p>
<pre>setenv JAVA_HOME /usr/local/jdk1.6.0</pre>
<p>&#8230; and check if everything ok and freebsd knows where file is with command:</p>
<pre>echo $JAVA_HOME</pre>
<p>(dont forget re-login into new user session to see applied changes to .cshrc file)</p>
<p>4.  Download package and untar it:</p>
<pre>wget http://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-enterprise-4.2-standalone.tar.gz</pre>
<pre>tar -zxvf atlassian-jira-enterprise-4.2-standalone.tar.gz</pre>
<p>(so you have it unarchived in directory: /home/jira/atlassian-jira-enterprise-4.2-standalone now)</p>
<p>5. Create new jira-home dir (this dir needed for all content &amp; technical data which jira stores for internal and external needs: search indeces, user attachments), for exampe here:</p>
<pre>mkdir /home/jira/jira-data</pre>
<p>6. Before jira startup you should specify where jira.home dir is in file:</p>
<pre>/home/jira/atlassian-jira-enterprise-4.2-standalone/WEB-INF/atlassian-jira/classes/jira-attlassian.properties</pre>
<p>change:</p>
<pre>jira.home = /home/jira/jira-data</pre>
<p>7. Also before startup check if jira default port 8080 is not used yet by some other listener, for example apache or nginx. If so, you can change it in file:</p>
<pre>/home/jira/atlassian-jira-enterprise-4.2-standalone/conf/server.xml

Change lines:
</pre>
<pre>&lt;Server port="8005" shutdown="SHUTDOWN"&gt;
......
&lt;Service name="Catalina"&gt;
    &lt;Connector port="8090"
......
</pre>
<p>7. Now start JIRA via running shell script:</p>
<pre>./home/jira/atlassian-jira-enterprise-4.2-standalone/bin/startup.sh</pre>
<p>If no errors and everything done well &#8211; you&#8217;ll see next message and directory /home/jira/jira-data will be prefilled by some techical data/files structure.</p>
<pre>JIRA Standalone Edition
Detecting JVM PermGen support...
PermGen switch is supported. Setting to 256m
If you encounter issues starting or stopping JIRA Standalone Edition, please see                                          the Troubleshooting guide at http://confluence.atlassian.com/display/JIRA/Insta                                         llation+Troubleshooting+Guide
Using CATALINA_BASE:   /usr/home/jira/atlassian-jira-enterprise-4.1.2-standalone
Using CATALINA_HOME:   /usr/home/jira/atlassian-jira-enterprise-4.1.2-standalone
Using CATALINA_TMPDIR: /usr/home/jira/atlassian-jira-enterprise-4.1.2-standalone</pre>
<p>8. Check if jira installed well and service really started with command:</p>
<pre>sockstat -4</pre>
<p>you should see this:</p>
<pre>jira     java       1283  50 tcp4   *:8090                *:*
jira     java       1283  51 tcp4   127.0.0.1:60196       127.0.0.1:54255</pre>
<p>9. Now open it in you browser: http://192.168.81.128:8090, and you will see some last configs which needs to be made before finalization installation process: license, mailing option, etc.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/1017/install-jira-on-freebsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD useful commands</title>
		<link>http://devreview.net/1017/freebsd-useful-commands/</link>
		<comments>http://devreview.net/1017/freebsd-useful-commands/#comments</comments>
		<pubDate>Sun, 17 Oct 2010 00:46:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[freebsd]]></category>
		<category><![CDATA[ln]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=233</guid>
		<description><![CDATA[One huge mess
Add user
#adduser
Delete user:
#pw user del myname
Untar tar.gz file:
tar -zxvf file.tar.gz
Put java_home dir manually for user: 
add line into shell config:
for ex.: mcedit .cshrc
setenv JAVA_HOME /usr/local/jdk1.6.0
Chown recursively owner for whole directory, example:
chown -R jira:jira atlassian-jira-enterprise-4.1.2-standalone
All list of installed packages with versions

pkg_info
(or find some particular...)
pkg_info &#124; grep mysql
Create symlink
(always mixup source and target meanings for [...]]]></description>
			<content:encoded><![CDATA[<p>One huge mess</p>
<p><strong>Add user</strong></p>
<p>#adduser</p>
<p><strong>Delete user:</strong></p>
<p>#pw user del myname</p>
<p><strong>Untar tar.gz file:</strong></p>
<p>tar -zxvf file.tar.gz</p>
<p><strong>Put java_home dir manually for user: </strong><br />
add line into shell config:<br />
for ex.: mcedit .cshrc</p>
<p>setenv JAVA_HOME /usr/local/jdk1.6.0</p>
<p><strong>Chown recursively owner for whole directory, example:</strong></p>
<p>chown -R jira:jira atlassian-jira-enterprise-4.1.2-standalone</p>
<p><strong>All list of installed packages with versions<br />
</strong></p>
<p><code><em>pkg_info</em></code></p>
<p><code><em>(or find some particular...)<br />
pkg_info | grep mysql</em></code><br />
<strong>Create symlink</strong></p>
<p>(always mixup source and target meanings for this command &#8230;)<strong><br />
</strong></p>
<p>ln -s /home/username/dev dev</p>
<p><strong>Turn on slow log queries for mysql</strong></p>
<p>SET GLOBAL log_slow_queries = &#8216;ON&#8217;;<br />
SET GLOBAL long_query_time = 1;</p>
<p><em><br />
</em></p>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/1017/freebsd-useful-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mediator design pattern</title>
		<link>http://devreview.net/0816/mediator-design-pattern/</link>
		<comments>http://devreview.net/0816/mediator-design-pattern/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 01:01:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=218</guid>
		<description><![CDATA[The Mediator defines an object that controls how a set of objects interact.  Loose coupling between colleague objects is achieved by having colleagues communicate with the Mediator, rather than with each other.  The control tower at a controlled airport demonstrates this pattern very well.  The pilots of the planes approaching or departing [...]]]></description>
			<content:encoded><![CDATA[<p>The Mediator defines an object that controls how a set of objects interact.  Loose coupling between colleague objects is achieved by having colleagues communicate with the Mediator, rather than with each other.  The control tower at a controlled airport demonstrates this pattern very well.  The pilots of the planes approaching or departing the terminal area communicate with the tower rather than explicitly communicating with one another.  The constraints on who can take off or land are enforced by the tower.  It is important to note that the tower does not control the whole flight.  It exists only to enforce constraints in the terminal area.</p>
<p><a rel="attachment wp-att-219" href="http://devreview.net/0816/mediator-design-pattern/mediator_example/"><img class="alignnone size-full wp-image-219" title="Mediator_example" src="http://devreview.net/content/2010/08/Mediator_example.gif" alt="" width="429" height="244" /></a></p>
<p><span id="more-218"></span></p>
<p>Usually a program is made up of a (sometimes large) number of classes. So the logic and computation is distributed among these classes. However, as more classes are developed in a program, especially during maintenance and/or refactoring, the problem of communication between these classes may become more complex. This makes the program harder to read and maintain. Furthermore, it can become difficult to change the program, since any change may affect code in several other classes.</p>
<p>With the <strong>mediator pattern</strong> communication between objects is encapsulated with a <strong>mediator</strong> object. Objects no longer communicate directly with each other, but instead communicate through the mediator. This reduces the dependencies between communicating objects, thereby lowering the <a title="Coupling (computer science)" href="http://en.wikipedia.org/wiki/Coupling_%28computer_science%29">coupling</a>.</p>
<p>Checklist</p>
<ol>
<li>Identify a collection of interacting objects that would benefit from mutual decoupling.</li>
<li>Encapsulate those interactions in the abstraction of a new class.</li>
<li>Create an instance of that new class and rework all “peer” objects to interact with the Mediator only.</li>
<li>Balance the principle of decoupling with the principle of distributing responsibility evenly.</li>
<li>Be careful not to create a “controller” or “god” object.</li>
</ol>
<p>Mediator vs Facade</p>
<p>Mediator is similar to Facade in that it abstracts functionality of existing classes. Mediator abstracts/centralizes arbitrary communication between colleague objects, it routinely “adds value”, and it is known/referenced by the colleague objects (i.e. it defines a multidirectional protocol).  In contrast, Facade defines a simpler interface to a subsystem, it doesn’t add new functionality, and it is not known by the subsystem classes (i.e. it defines a unidirectional protocol where it makes requests of the subsystem classes but not vice versa).</p>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/0816/mediator-design-pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Command design pattern</title>
		<link>http://devreview.net/0815/command-design-pattern/</link>
		<comments>http://devreview.net/0815/command-design-pattern/#comments</comments>
		<pubDate>Sun, 15 Aug 2010 23:56:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[command pattern]]></category>
		<category><![CDATA[design patterns]]></category>
		<category><![CDATA[GoF]]></category>
		<category><![CDATA[pattern]]></category>
		<category><![CDATA[Patterns]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=214</guid>
		<description><![CDATA[In object-oriented programming, the command pattern is a design pattern in which an object is used to represent and encapsulate all the information needed to call a method at a later time. This information includes the method name, the object that owns the method and values for the method parameters.
Three terms always associated with the [...]]]></description>
			<content:encoded><![CDATA[<p>In object-oriented programming, the <strong>command pattern</strong> is a design pattern in which an object is used to represent and encapsulate all the information needed to call a method at a later time. This information includes the method name, the object that owns the method and values for the method parameters.</p>
<p>Three terms always associated with the command pattern are <em>client</em>, <em>invoker</em> and <em>receiver</em>. The <em>client</em> instantiates the command object and provides the information required to call the method at a later time. The <em>invoker</em> decides when the method should be called. The <em>receiver</em> is an instance of the class that contains the method&#8217;s code.</p>
<p><a rel="attachment wp-att-215" href="http://devreview.net/0815/command-design-pattern/command_design_pattern_class_diagram/"><img class="alignnone size-full wp-image-215" title="Command_Design_Pattern_Class_Diagram" src="http://devreview.net/content/2010/08/Command_Design_Pattern_Class_Diagram.png" alt="" width="557" height="353" /></a></p>
<p><span id="more-214"></span></p>
<p>Notice: On the diagram described above should  be &#8220;The explanation for the Receiver block  &#8211; &#8220;The actual work to be done by the command (action)&#8221;</p>
<p>Using command objects makes it easier to construct general components that need to delegate, sequence or execute method calls at a time of their choosing without the need to know the owner of the method or the method parameters.</p>
<p><a href="http://en.wikipedia.org/wiki/Command_pattern">http://en.wikipedia.org/wiki/Command_pattern</a></p>
<p>Also, there is nice example with &#8220;switch light on/off&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/0815/command-design-pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chain of responsibility design pattern</title>
		<link>http://devreview.net/0815/chain-of-responsibility-design-pattern/</link>
		<comments>http://devreview.net/0815/chain-of-responsibility-design-pattern/#comments</comments>
		<pubDate>Sun, 15 Aug 2010 22:56:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[chain of responsibility]]></category>
		<category><![CDATA[chain of responsibility pattern]]></category>
		<category><![CDATA[design patterns]]></category>
		<category><![CDATA[GoF]]></category>
		<category><![CDATA[pattern]]></category>
		<category><![CDATA[php patterns]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=205</guid>
		<description><![CDATA[Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request.  Chain the receiving objects and pass the request along the chain until an object handles it.


This is behavorial patterns.
Like an example, with Chain of responsibility pattern could be processed Request in web application. [...]]]></description>
			<content:encoded><![CDATA[<p>Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request.  Chain the receiving objects and pass the request along the chain until an object handles it.</p>
<p><a rel="attachment wp-att-206" href="http://devreview.net/0815/chain-of-responsibility-design-pattern/chain_of_responsibility_example/"><img class="alignnone size-full wp-image-206" title="Chain_of_responsibility_example" src="http://devreview.net/content/2010/08/Chain_of_responsibility_example.png" alt="" width="303" height="277" /></a></p>
<p><span id="more-205"></span></p>
<p>This is behavorial patterns.</p>
<p>Like an example, with Chain of responsibility pattern could be processed Request in web application. In FrontendRouter  you are passing request through chain of ActionHandlers and if Action is found by some Handler &#8211; it could be executed.</p>
<p>Very nice description is located here: http://sourcemaking.com/design_patterns/chain_of_responsibility</p>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/0815/chain-of-responsibility-design-pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adapter pattern</title>
		<link>http://devreview.net/0815/adapter-pattern/</link>
		<comments>http://devreview.net/0815/adapter-pattern/#comments</comments>
		<pubDate>Sun, 15 Aug 2010 22:22:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Patterns]]></category>
		<category><![CDATA[adaptee]]></category>
		<category><![CDATA[adaptor]]></category>
		<category><![CDATA[adaptor pattern]]></category>
		<category><![CDATA[GoF]]></category>
		<category><![CDATA[pattern]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=201</guid>
		<description><![CDATA[This pattern become helpful when you need to convert interface of one class (which can not be changed) to the interface expected by client.


Very clear explanation of this pattern is here: http://www.fluffycat.com/PHP-Design-Patterns/Adapter/
]]></description>
			<content:encoded><![CDATA[<p>This pattern become helpful when you need to convert interface of one class (which can not be changed) to the interface expected by client.</p>
<p><a rel="attachment wp-att-202" href="http://devreview.net/0815/adapter-pattern/adapter/"><img class="alignnone size-full wp-image-202" title="Adapter" src="http://devreview.net/content/2010/08/Adapter.png" alt="" width="300" height="215" /></a></p>
<p><span id="more-201"></span></p>
<p>Very clear explanation of this pattern is here: http://www.fluffycat.com/PHP-Design-Patterns/Adapter/</p>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/0815/adapter-pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UML sequence diagram online service</title>
		<link>http://devreview.net/0809/uml-sequence-diagram-online-service/</link>
		<comments>http://devreview.net/0809/uml-sequence-diagram-online-service/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 19:30:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[UML]]></category>
		<category><![CDATA[sequence diagram]]></category>
		<category><![CDATA[uml diagram]]></category>
		<category><![CDATA[uml service]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=190</guid>
		<description><![CDATA[
Found one nice service for quick drawing sequence diagram.
Very easy to describe main goal of your UML diagram and share with colleagues

participant FrontendController
participant SearchAppLogic
participant SphinxSearch
participant SphinxIndex
FrontendController-&#62;SearchAppLogic: search(searchRequestDTO)
SearchAppLogic-&#62;SphinxSearch: search(searchRequestDTO)
SphinxSearch-&#62;SphinxIndex: search(searchRequestDTO)
SphinxIndex-&#62;SphinxSearch: searchResponseDTO
SphinxSearch-&#62;SearchAppLogic: searchResponseDTO
SearchAppLogic-&#62;FrontendController: searchResponseDTO
Check this out:
Sample on websequencediagrams.com
]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-192" href="http://devreview.net/0809/uml-sequence-diagram-online-service/sphinx-search-sequence-diagram-2/"><img class="alignnone size-full wp-image-192" title="sphinx-search-sequence-diagram" src="http://devreview.net/content/2010/08/sphinx-search-sequence-diagram1.png" alt="" width="530" height="198" /></a></p>
<p>Found one nice service for quick drawing sequence diagram.</p>
<p>Very easy to describe main goal of your UML diagram and share with colleagues</p>
<p><span id="more-190"></span><br />
<code>participant FrontendController<br />
participant SearchAppLogic<br />
participant SphinxSearch<br />
participant SphinxIndex<br />
FrontendController-&gt;SearchAppLogic: search(searchRequestDTO)<br />
SearchAppLogic-&gt;SphinxSearch: search(searchRequestDTO)<br />
SphinxSearch-&gt;SphinxIndex: search(searchRequestDTO)<br />
SphinxIndex-&gt;SphinxSearch: searchResponseDTO<br />
SphinxSearch-&gt;SearchAppLogic: searchResponseDTO<br />
SearchAppLogic-&gt;FrontendController: searchResponseDTO</code></p>
<p>Check this out:</p>
<p><a href="http://www.websequencediagrams.com/?lz=cGFydGljaXBhbnQgRnJvbnRlbmRDb250cm9sbGVyCgATDFNlYXJjaEFwcExvZ2ljAA0OcGhpbngAGwYABhNJbmRleAoKAE4SLT4ARw46IHMAYAUoAAEGUmVxdWVzdERUTykKAHAOLT4AZwwAGxwAgQ8LAC0IAIEKBQATIQCBMAUAUhZSZXNwb25zZURUTwBREACBOhUAIw0AgTkPAIJjEgBSFA&amp;s=default">Sample on websequencediagrams.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/0809/uml-sequence-diagram-online-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving from Prototype to jQuery</title>
		<link>http://devreview.net/0809/moving-from-prototype-to-jquery/</link>
		<comments>http://devreview.net/0809/moving-from-prototype-to-jquery/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 18:52:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[javascript libraries]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[js libs]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[prototypejs]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=183</guid>
		<description><![CDATA[
Recently, I found a lot of really useful frontend products (ready components: here -&#62; sohtanaka.com :) ) built with jQuery, so I decided to switch from PrototypeJS to jQuery. Since my applications don&#8217;t use to much javascripts, just maybe for ajax needs I have no need to load both libraries anymore.
On my opinion both libraries [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-184" href="http://devreview.net/0809/moving-from-prototype-to-jquery/prototype-jquery/"><img class="alignnone size-full wp-image-184" title="prototype-jquery" src="http://devreview.net/content/2010/08/prototype-jquery.png" alt="" width="362" height="266" /></a></p>
<p>Recently, I found a lot of really useful frontend products (ready components: here -&gt; sohtanaka.com :) ) built with jQuery, so I decided to switch from PrototypeJS to jQuery. Since my applications don&#8217;t use to much javascripts, just maybe for ajax needs I have no need to load both libraries anymore.</p>
<p>On my opinion both libraries have different goals. On this moment prototypejs is more like base library which extends base js functionality, and jQuery is more usefull as practical framework with a lot of opensource and ready for use components. Also, with this switch I hope to receive more experience of usage both libraries because that will give me possibility to compare them and analyze results.<span id="more-183"></span><br />
During moving I&#8217;ve struggled with next issues:</p>
<p>1. First of all, as lazy server-side developer ;P , I&#8217;ve tried to support both libraries on page at the same time of course:</p>
<p>Ploblem with $(element) method, reserved for document.getElementById()in prototype can be solved with:</p>
<p><code>jQuery.noConflict()</code></p>
<p>2. Analog for document.getElementById(&#8216;element&#8217;)<br />
$(&#8216;#bar&#8217;)[0]; // equivalent to document.getElementById(&#8216;bar&#8217;);</p>
<p>[<em>to be continue ..., in this post I'll write some small differences which stopped me during switching from prototype to jquery</em>]</p>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/0809/moving-from-prototype-to-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Problem IP 127.255.255.255 in statistics</title>
		<link>http://devreview.net/0807/problem-ip-127-255-255-255-in-statistics/</link>
		<comments>http://devreview.net/0807/problem-ip-127-255-255-255-in-statistics/#comments</comments>
		<pubDate>Sat, 07 Aug 2010 19:45:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[127.255.255.255]]></category>
		<category><![CDATA[int bigint]]></category>
		<category><![CDATA[ip]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=179</guid>
		<description><![CDATA[It could happen with some php-mysql scripts if you moved from 32-bit platform to 64-bit.
Quick fix for that &#8211; replace int(11) on bigint(20) in mysql tables.
]]></description>
			<content:encoded><![CDATA[<p>It could happen with some php-mysql scripts if you moved from 32-bit platform to 64-bit.</p>
<p>Quick fix for that &#8211; replace int(11) on bigint(20) in mysql tables.</p>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/0807/problem-ip-127-255-255-255-in-statistics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sphinx 1.10-beta on FreeBSD 8.0 with real time indexing</title>
		<link>http://devreview.net/0807/sphinx-1-10-beta-on-freebsd-8-0-with-real-time-indexing/</link>
		<comments>http://devreview.net/0807/sphinx-1-10-beta-on-freebsd-8-0-with-real-time-indexing/#comments</comments>
		<pubDate>Sat, 07 Aug 2010 19:25:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Search engines]]></category>
		<category><![CDATA[indexer]]></category>
		<category><![CDATA[install sphinx]]></category>
		<category><![CDATA[real time index]]></category>
		<category><![CDATA[rt indexes]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[searchd]]></category>
		<category><![CDATA[sphinx]]></category>
		<category><![CDATA[sphinx freebsd]]></category>
		<category><![CDATA[sphinx search]]></category>
		<category><![CDATA[sphinxsearch]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=168</guid>
		<description><![CDATA[
Real time indexes and other already known benefits of sphinx search engine means &#8211; it will be loved by many developers and will be used in many projects from now on for sure. RT indexes feature is critical update, which was expected by many professionals who choose SOLR (lucene) instead of sphinx before.
Lets try to [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-83" href="http://devreview.net/0305/installation-sphinx-search-engine-on-freebsd-7-2/sphinx/"><img class="alignnone size-full wp-image-83" title="sphinx" src="http://devreview.net/content/2010/03/sphinx.jpg" alt="" width="200" height="51" /></a></p>
<p>Real time indexes and other already known benefits of sphinx search engine means &#8211; it will be loved by many developers and will be used in many projects from now on for sure. RT indexes feature is critical update, which was expected by many professionals who choose SOLR (lucene) instead of sphinx before.</p>
<p>Lets try to install it and use: (on this moment its beta, so I&#8217;m doing installation manually)</p>
<p>1. Download<br />
downloading <em>sphinx-1.10-beta.tar.gz</em> and putting it to /usr/ports/distfiles<br />
<span id="more-168"></span><br />
2. Cleanup (optional)<br />
If you had previously installed version v.0.9.8, please remove indexes from<br />
<em><strong>/var/data/sphinx</strong></em><br />
also old configs from<br />
<em><strong>/etc/sphinx.conf</strong></em><br />
also disable sphinxsearch in<br />
<em><strong>/etc/rc.conf</strong></em></p>
<p>3. Install</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># cd /usr/ports/distfiles</span>
<span style="color: #666666; font-style: italic;"># tar xzvf sphinx-1.10-beta.tar.gz</span>
<span style="color: #666666; font-style: italic;"># cd sphinx-1.10-beta</span>
<span style="color: #666666; font-style: italic;"># ./configure</span>
<span style="color: #666666; font-style: italic;"># make</span>
<span style="color: #666666; font-style: italic;"># make install</span></pre></div></div>

<p>4. Test sphinx<br />
- There are test db with two tables in example.sql (in dir sphinx-1.10-beta). So, please run it manually.<br />
- Change /usr/local/etc/sphinx.conf with appropriate mysql configs.<br />
- run sphinx indexer</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">hockey<span style="color: #666666; font-style: italic;"># /usr/local/bin/indexer --all</span></pre></div></div>

<p><span style="color: #999999;">Sphinx 1.10-beta (r2420)<br />
Copyright (c) 2001-2010, Andrew Aksyonoff<br />
Copyright (c) 2008-2010, Sphinx Technologies Inc (http://sphinxsearch.com)</span></p>
<p>using config file &#8216;/usr/local/etc/sphinx.conf&#8217;&#8230;<br />
indexing index &#8216;test1&#8242;&#8230;<br />
collected 4 docs, 0.0 MB<br />
sorted 0.0 Mhits, 100.0% done<br />
total 4 docs, 193 bytes<br />
total 0.041 sec, 4667 bytes/sec, 96.73 docs/sec<br />
indexing index &#8216;test1stemmed&#8217;&#8230;<br />
collected 4 docs, 0.0 MB<br />
sorted 0.0 Mhits, 100.0% done<br />
total 4 docs, 193 bytes<br />
total 0.011 sec, 17371 bytes/sec, 360.03 docs/sec<br />
skipping non-plain index &#8216;dist1&#8242;&#8230;<br />
skipping non-plain index &#8216;rt&#8217;&#8230;<br />
total 6 reads, 0.000 sec, 0.1 kb/call avg, 0.0 msec/call avg<br />
total 18 writes, 0.000 sec, 0.1 kb/call avg, 0.0 msec/call avg</p>
<p>- try to search:<br />
To query the index from command line, use search utility:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># /usr/local/bin/search test</span></pre></div></div>

<p>- run daemon for possibility to use it from other application:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># /usr/local/bin/searchd</span></pre></div></div>

<p>- for stopping use</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># /usr/local/bin/searchd --stop</span></pre></div></div>

<p>- add it to /etc/rc.conf<br />
searchd_enable=&#8221;YES&#8221;</p>
<p>So, sphinx searhc installed, indexer tested, search tested, search daemon started and stopped.</p>
<p>Done, enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/0807/sphinx-1-10-beta-on-freebsd-8-0-with-real-time-indexing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading FreeBSD ports &amp; src with cvsup</title>
		<link>http://devreview.net/0530/upgrading-freebsd-ports-src-with-cvsup/</link>
		<comments>http://devreview.net/0530/upgrading-freebsd-ports-src-with-cvsup/#comments</comments>
		<pubDate>Sun, 30 May 2010 09:03:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[freebsd]]></category>
		<category><![CDATA[cvsup]]></category>
		<category><![CDATA[cvsup-without-gui]]></category>
		<category><![CDATA[freebsd ports]]></category>
		<category><![CDATA[freebsd update]]></category>
		<category><![CDATA[posts collection]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=160</guid>
		<description><![CDATA[cvsup &#8211; tool for updating FreeBSD source files, ports, docs, etc.
Base page from handbook: http://www.freebsd.org/doc/en/books/handbook/cvsup.html

hockey# cd /usr/ports/net/cvsup-without-gui/
hockey# make install clean



cd /usr/share/examples/cvsup/

Here you can see examples of config for csvup. Here you should create own file.

vi my-ports-supfile


*default host=cvsup.FreeBSD.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=.
*default delete use-rel-suffix
*default compress
ports-all

I didnt update src for my FreeBSD because, with last sources my [...]]]></description>
			<content:encoded><![CDATA[<p>cvsup &#8211; tool for updating FreeBSD source files, ports, docs, etc.</p>
<p>Base page from handbook: <a href="http://www.freebsd.org/doc/en/books/handbook/cvsup.html">http://www.freebsd.org/doc/en/books/handbook/cvsup.html</a></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">hockey<span style="color: #666666; font-style: italic;"># cd /usr/ports/net/cvsup-without-gui/</span>
hockey<span style="color: #666666; font-style: italic;"># make install clean</span></pre></div></div>

<p><span id="more-160"></span></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>examples<span style="color: #000000; font-weight: bold;">/</span>cvsup<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>Here you can see examples of config for csvup. Here you should create own file.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> my-ports-supfile</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">*</span>default <span style="color: #007800;">host</span>=cvsup.FreeBSD.org
<span style="color: #000000; font-weight: bold;">*</span>default <span style="color: #007800;">base</span>=<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>db
<span style="color: #000000; font-weight: bold;">*</span>default <span style="color: #007800;">prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr
<span style="color: #000000; font-weight: bold;">*</span>default <span style="color: #007800;">release</span>=<span style="color: #c20cb9; font-weight: bold;">cvs</span> <span style="color: #007800;">tag</span>=.
<span style="color: #000000; font-weight: bold;">*</span>default delete use-rel-suffix
<span style="color: #000000; font-weight: bold;">*</span>default compress
ports-all</pre></div></div>

<p><span style="color: #999999;"><em>I didnt update src for my FreeBSD because, with last sources my kernel didn&#8217;t want to install correctly. But it should be something like this:</em></span></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">*</span>default <span style="color: #007800;">host</span>=cvsup.FreeBSD.org
<span style="color: #000000; font-weight: bold;">*</span>default <span style="color: #007800;">base</span>=<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>db
<span style="color: #000000; font-weight: bold;">*</span>default <span style="color: #007800;">prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr
<span style="color: #000000; font-weight: bold;">*</span>default <span style="color: #007800;">release</span>=<span style="color: #c20cb9; font-weight: bold;">cvs</span> <span style="color: #007800;">tag</span>=RELENG_8_0
<span style="color: #000000; font-weight: bold;">*</span>default delete use-rel-suffix
<span style="color: #000000; font-weight: bold;">*</span>default compress
src-all</pre></div></div>

<p><span style="color: #999999;"><em>Tag RELENG_8_0 &#8211; means it is last stable release plus only critical fixes.</em></span></p>
<p>Now, lets update, process will take some time (up to 1 hour):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">hockey<span style="color: #666666; font-style: italic;"># /usr/local/bin/cvsup my-ports-supfile</span></pre></div></div>

<p>If everything done well, you have fresh and up to date all ports collection. Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/0530/upgrading-freebsd-ports-src-with-cvsup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing and using PF (packet filter) firewall for FreeBSD 8.0</title>
		<link>http://devreview.net/0530/installing-and-using-pf-packet-filter-firewall-for-freebsd-8-0/</link>
		<comments>http://devreview.net/0530/installing-and-using-pf-packet-filter-firewall-for-freebsd-8-0/#comments</comments>
		<pubDate>Sun, 30 May 2010 00:15:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[build kernel]]></category>
		<category><![CDATA[config pf]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[install kernel]]></category>
		<category><![CDATA[pf]]></category>
		<category><![CDATA[pf firewall]]></category>
		<category><![CDATA[pfctl]]></category>
		<category><![CDATA[rebuild kernel]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=158</guid>
		<description><![CDATA[First of all pf should be included into kernel. So, you should rebuild kernel for using pf and rebuild it.
(For rebuilding kernel check if you have installed full collection of src from sysinstall)
Build and install FreeBSD kernel 

hockey# cd /usr/src/sys/amd64/conf
hockey# mkdir /root/kernels
hockey# cp GENERIC /root/kernels/MYKERNEL
hockey# ln -s /root/kernels/MYKERNEL
hockey# vi /root/kernels/MYKERNEL



device pf
device pflog
device pfsync
&#160;
options   [...]]]></description>
			<content:encoded><![CDATA[<p>First of all pf should be included into kernel. So, you should rebuild kernel for using pf and rebuild it.<br />
(For rebuilding kernel check if you have installed full collection of src from sysinstall)</p>
<h2>Build and install FreeBSD kernel </h2>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">hockey<span style="color: #666666; font-style: italic;"># cd /usr/src/sys/amd64/conf</span>
hockey<span style="color: #666666; font-style: italic;"># mkdir /root/kernels</span>
hockey<span style="color: #666666; font-style: italic;"># cp GENERIC /root/kernels/MYKERNEL</span>
hockey<span style="color: #666666; font-style: italic;"># ln -s /root/kernels/MYKERNEL</span>
hockey<span style="color: #666666; font-style: italic;"># vi /root/kernels/MYKERNEL</span></pre></div></div>

<p><span id="more-158"></span></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">device pf
device pflog
device pfsync
&nbsp;
options         ALTQ
options         ALTQ_CBQ        <span style="color: #666666; font-style: italic;"># Class Bases Queuing (CBQ)</span>
options         ALTQ_RED        <span style="color: #666666; font-style: italic;"># Random Early Detection (RED)</span>
options         ALTQ_RIO        <span style="color: #666666; font-style: italic;"># RED In/Out</span>
options         ALTQ_HFSC       <span style="color: #666666; font-style: italic;"># Hierarchical Packet Scheduler (HFSC)</span>
options         ALTQ_PRIQ       <span style="color: #666666; font-style: italic;"># Priority Queuing (PRIQ)</span>
options         ALTQ_NOPCC      <span style="color: #666666; font-style: italic;"># Required for SMP build</span></pre></div></div>

<p>(additionally youcan read about it here &#8211; <a href="http://www.freebsd.org/doc/en/books/handbook/kernelconfig-building.html" target="_blank">http://www.freebsd.org/doc/en/books/handbook/kernelconfig-building.html</a>)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src
<span style="color: #c20cb9; font-weight: bold;">make</span> buildkernel <span style="color: #007800;">KERNCONF</span>=MYKERNEL
<span style="color: #c20cb9; font-weight: bold;">make</span> installkernel <span style="color: #007800;">KERNCONF</span>=MYKERNEL</pre></div></div>

<p><em>I dont know why (maybe I&#8217;m paranoid little bit), but after rebuilding kernel sometimes I cannot login with root password anymore, when I&#8217;m sure, I definately should. So, I&#8217;m changing root password here, and creating new user by using:</em></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">passwd</span>
adduser</pre></div></div>

<p><em>&#8230; so, this is just notice for myself :) , you should not follow it. Also, check if there is &#8220;UseDNS No&#8221; and &#8220;PermitRootLogin yes&#8221; in &#8220;/etc/ssh/sshd_config&#8221;<br />
</em></p>
<h2>Configuring PF firewall (packet filter) FreeBSD</h2>
<p>First of all, the experience tells me that there are a lot of &#8220;not good people&#8221; on the web who is always want to grab some info, spam some forms, ddos your site, etc. So, usually I&#8217;m managing own list of blocked IP addresses of some bots, ddos botnets, etc. Packet Filter firewall couldn&#8217;t protect you from serious DDOS attack, when your site going down, because botnet just simply filling up network with huge amount of fake requests. But, firewall could very effectively protect you from 98% of cases (some stupid attacks with 10K-100K infected pc in botnet). Actually, that is completely different subject for discussion &#8220;how&#8221;, so lets just create file with blocked IP addresses and include appropriate rules into PF config for supporting this list.<br />
Btw, pf could add/remove blocked IP in runtime (on flight) without rebooting it.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">hockey<span style="color: #666666; font-style: italic;"># vi /etc/pf.blocked.ip.conf</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">4.131.43.125
8.15.172.172
8.19.105.50</pre></div></div>

<p>Check your ipadress and configure pf.conf example:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">hockey<span style="color: #666666; font-style: italic;"># ifconfig</span>
hockey<span style="color: #666666; font-style: italic;"># vi /etc/pf.conf</span>
&nbsp;
udp_services = <span style="color: #ff0000;">&quot;{ ntp }&quot;</span>
tcp_services = <span style="color: #ff0000;">&quot;{ smtp, ssh, http }&quot;</span>
<span style="color: #007800;">local_host</span>=<span style="color: #ff0000;">&quot;XXX.XXX.XXX.XXX&quot;</span>
&nbsp;
table <span style="color: #000000; font-weight: bold;">&lt;</span>blockedips<span style="color: #000000; font-weight: bold;">&gt;</span> persist <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #ff0000;">&quot;/etc/pf.blocked.ip.conf&quot;</span>
&nbsp;
<span style="color: #007800;">interface</span>=<span style="color: #ff0000;">&quot;re0&quot;</span>
<span style="color: #000000; font-weight: bold;">set</span> block-policy <span style="color: #7a0874; font-weight: bold;">return</span>
<span style="color: #000000; font-weight: bold;">set</span> skip on lo0
scrub <span style="color: #000000; font-weight: bold;">in</span> all
&nbsp;
block all
block drop <span style="color: #000000; font-weight: bold;">in</span> log quick on <span style="color: #007800;">$interface</span> from <span style="color: #000000; font-weight: bold;">&lt;</span>blockedips<span style="color: #000000; font-weight: bold;">&gt;</span> to any
pass out on <span style="color: #007800;">$interface</span> inet from <span style="color: #007800;">$local_host</span> to any
pass <span style="color: #000000; font-weight: bold;">in</span> on <span style="color: #007800;">$interface</span> inet proto tcp from any to <span style="color: #007800;">$local_host</span> port <span style="color: #007800;">$tcp_services</span>
pass <span style="color: #000000; font-weight: bold;">in</span> on <span style="color: #007800;">$interface</span> inet proto udp from any to <span style="color: #007800;">$local_host</span> port <span style="color: #007800;">$udp_services</span>
pass <span style="color: #000000; font-weight: bold;">in</span> on <span style="color: #007800;">$interface</span> inet proto icmp from any to <span style="color: #007800;">$local_host</span> icmp-type echoreq</pre></div></div>

<p>Including PF into rc.conf, so you can enable or disable PF anytime, plus it will start when FreeBSD starts.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.conf
&nbsp;
<span style="color: #007800;">pf_enable</span>=<span style="color: #ff0000;">&quot;YES&quot;</span>
<span style="color: #007800;">pf_rules</span>=<span style="color: #ff0000;">&quot;/etc/pf.conf&quot;</span>
<span style="color: #007800;">pf_flags</span>=<span style="color: #ff0000;">&quot;&quot;</span>
<span style="color: #007800;">pflog_enable</span>=<span style="color: #ff0000;">&quot;YES&quot;</span>
<span style="color: #007800;">pflog_logfile</span>=<span style="color: #ff0000;">&quot;/var/log/pflog&quot;</span>
<span style="color: #007800;">pflog_flags</span>=<span style="color: #ff0000;">&quot;&quot;</span></pre></div></div>

<p>More info on this you can find of course in FreeBSD handbook: <a href="http://www.freebsd.org/doc/en/books/handbook/firewalls-pf.html">http://www.freebsd.org/doc/en/books/handbook/firewalls-pf.html</a></p>
<p>Now, lets try to enable it. Beware, if you did something wrong, for example included own IP into blacklisted IP addresses or mixed up with other configs &#8211; PF could block your access to server, and usually this automatically means &#8211; long discussions with hoster support or even reinstalling OS.</p>
<p>So, cross fingers, close eyes and &#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">pfctl <span style="color: #660033;">-e</span></pre></div></div>

<p>For disabling PF use</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">pfctl <span style="color: #660033;">-d</span></pre></div></div>

<p>Now reboot, and check if everything is ok:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">reboot</pre></div></div>

<p>Done, enjoy. </p>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/0530/installing-and-using-pf-packet-filter-firewall-for-freebsd-8-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install FreeBSD 8.0 on hetzner.de</title>
		<link>http://devreview.net/0529/install-freebsd-8-0-on-hetzner-de/</link>
		<comments>http://devreview.net/0529/install-freebsd-8-0-on-hetzner-de/#comments</comments>
		<pubDate>Sat, 29 May 2010 13:43:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[freebsd]]></category>
		<category><![CDATA[hetzner]]></category>
		<category><![CDATA[install freebsd]]></category>
		<category><![CDATA[mfsBSD]]></category>
		<category><![CDATA[sysinstall]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=141</guid>
		<description><![CDATA[
Installation FreeBSD 8.0 amd64 from rescue system for Hetzner EQ6 server, which has on board:
Intel® Core™ i7-920 Quadcore, incl. Hyper-Threading Technology,
* RAM 12 GB DDR3 RAM
* Hard discs 2 x 1500 GB SATA-II HDD (Software-RAID 1)
* NIC 1 GBit OnBoard connected at 100 MBit
* Backup Space 100 GB
Thats my details grabbed from preinstalled by default [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-151" href="http://devreview.net/0529/install-freebsd-8-0-on-hetzner-de/logo-2/"><img class="alignnone size-full wp-image-151" title="logo" src="http://devreview.net/content/2010/05/logo.gif" alt="" width="220" height="47" /></a></p>
<p>Installation FreeBSD 8.0 amd64 from rescue system for Hetzner EQ6 server, which has on board:</p>
<blockquote><p>Intel® Core™ i7-920 Quadcore, incl. Hyper-Threading Technology,<br />
* RAM 12 GB DDR3 RAM<br />
* Hard discs 2 x 1500 GB SATA-II HDD (Software-RAID 1)<br />
* NIC 1 GBit OnBoard connected at 100 MBit<br />
* Backup Space 100 GB</p></blockquote>
<p>Thats my details grabbed from preinstalled by default Debian-50-lenny-64-minimal:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Debian-<span style="color: #000000;">50</span>-lenny-<span style="color: #000000;">64</span>-minimal:~<span style="color: #666666; font-style: italic;"># lshw -short</span>
H<span style="color: #000000; font-weight: bold;">/</span>W path         Device     Class      Description
==================================================
<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span>                          bus        MSI X58 Pro-E <span style="color: #7a0874; font-weight: bold;">&#40;</span>MS-<span style="color: #000000;">7522</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span>                        memory     64KiB BIOS
<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">4</span>                        processor  Intel<span style="color: #7a0874; font-weight: bold;">&#40;</span>R<span style="color: #7a0874; font-weight: bold;">&#41;</span> Core<span style="color: #7a0874; font-weight: bold;">&#40;</span>TM<span style="color: #7a0874; font-weight: bold;">&#41;</span> i7 CPU         <span style="color: #000000;">920</span>  <span style="color: #000000; font-weight: bold;">@</span> 2.67GHz
<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">4</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">5</span>                      memory     256KiB L1 cache
<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">4</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">6</span>                      memory     1MiB L2 cache
<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">4</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">7</span>                      memory     8MiB L3 cache
<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">23</span>                       memory     System Memory
<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">23</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span>                     memory     2GiB DIMM <span style="color: #000000;">1333</span> MHz <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0.8</span> ns<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">23</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1</span>                     memory     2GiB DIMM <span style="color: #000000;">1333</span> MHz <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0.8</span> ns<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">23</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2</span>                     memory     2GiB DIMM <span style="color: #000000;">1333</span> MHz <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0.8</span> ns<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">23</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">3</span>                     memory     2GiB DIMM <span style="color: #000000;">1333</span> MHz <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0.8</span> ns<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">23</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">4</span>                     memory     2GiB DIMM <span style="color: #000000;">1333</span> MHz <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0.8</span> ns<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">23</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">5</span>                     memory     2GiB DIMM <span style="color: #000000;">1333</span> MHz <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0.8</span> ns<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>During reading this article I have used next links:</p>
<p>http://habrahabr.ru/blogs/hosting/91429/ (as base, but didn&#8217;t worked for me), or mirror found here:</p>
<p>http://pcvector.ru/t1091/</p>
<p>http://wiki.hetzner.de/index.php/FreeBSD_installieren</p>
<h2>Preparation</h2>
<p>Visit https://robot.your-server.de/server &#8211; Main function (servers) &#8211; choose server &#8211; Rescue &#8211; Choose FreeBSD 64bit &#8211; Submit &#8211; Remember given password</p>
<p><span id="more-141"></span></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">The rescue system has been activated successfully.
After the next reboot your server will boot from the rescue system.
Then you can access your server, using the user name <span style="color: #ff0000;">&quot;root&quot;</span> and the following password: NXlib7R7</pre></div></div>

<p>For booting for mfsBSD choose tab &#8220;Reset&#8221; &#8211; &#8220;Execute a automatic hardware-reset&#8221; &#8211; Send<br />
mfsBSD is minimal OS running in memory. Wait for 5 minutes before server reboots.</p>
<h2>Installing FreeBSD</h2>
<p>Check disks first:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>rescue ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># ls /dev/ad*</span>
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ad4        <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ad4s1b     <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ad4s1f     <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ad6s2
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ad4s1      <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ad4s1d     <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ad6        <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ad6s3
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ad4s1a     <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ad4s1e     <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ad6s1</pre></div></div>

<p>Remove null sector and tell that FreeBSD will fill whole disk</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>rescue ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># fdisk -BI /dev/ad4</span>
<span style="color: #000000; font-weight: bold;">*******</span> Working on device <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ad4 <span style="color: #000000; font-weight: bold;">*******</span>
fdisk: Class not found</pre></div></div>

<p>Installing loader and creating label for slice:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>rescue ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># bsdlabel -wB /dev/ad4s1</span></pre></div></div>

<p>Editing hdd slices:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>rescue ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># bsdlabel -e /dev/ad4s1</span></pre></div></div>

<p>For mine tasks I splited it on next slices:</p>
<blockquote><p>/ &#8211; 10Gb<br />
swap &#8211; 12Gb (like memory size)<br />
/tmp &#8211; 10Gb<br />
/var &#8211; 100Gb<br />
/usr &#8211; (rest)
</p></blockquote>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># /dev/ad4s1:</span>
<span style="color: #000000;">8</span> partitions:
<span style="color: #666666; font-style: italic;">#        size   offset    fstype   [fsize bsize bps/cpg]</span>
a: 10G <span style="color: #000000;">16</span> 4.2BSD <span style="color: #000000;">0</span> <span style="color: #000000;">0</span>
b: 12G <span style="color: #000000; font-weight: bold;">*</span> swap <span style="color: #000000;">0</span> <span style="color: #000000;">0</span>
d: 10G <span style="color: #000000; font-weight: bold;">*</span> 4.2BSD <span style="color: #000000;">0</span> <span style="color: #000000;">0</span>
e: 100G <span style="color: #000000; font-weight: bold;">*</span> 4.2BSD <span style="color: #000000;">0</span> <span style="color: #000000;">0</span>
f: <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> 4.2BSD <span style="color: #000000;">0</span> <span style="color: #000000;">0</span></pre></div></div>

<p>Creation file system on disk:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">newfs <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ad4s1a
newfs <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ad4s1b
newfs <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ad4s1d
newfs <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ad4s1e
newfs <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ad4s1f</pre></div></div>

<p>Since &#8220;/&#8221; belongs to mfsBSD, lets setup our FreeBSD into direcotry &#8220;/mnt&#8221;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ad4s1a <span style="color: #000000; font-weight: bold;">/</span>mnt
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>var
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>usr
<span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ad4s1d <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp
<span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ad4s1e <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>var
<span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ad4s1f <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>usr</pre></div></div>

<p>And only now we can run sysinstall</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>rescue ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># sysinstall</span></pre></div></div>

<p>Custom-<br />
<strong>Options</strong>-Intall root change on &#8220;/mnt&#8221; + Package temp change on &#8220;/mnt/var/tmp&#8221; + Check if Relese Name is set to &#8220;8.0-STABLE&#8221;-Quit<br />
<strong>Partition</strong> &#8211; done already before<br />
<strong>Label</strong> &#8211; done already before<br />
<strong>Media</strong> &#8211; NFS &#8211; &#8220;213.133.99.100:/nfs/freebsd/8.0_64&#8243; &#8211; &#8220;Running multi-user, assume that the network is already configured?&#8221;-Yes<br />
<strong>Commit</strong></p>
<p>Other images located here:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000;">7.2</span>-RELEASE — <span style="color: #000000;">32</span>-bit — 213.133.99.100:<span style="color: #000000; font-weight: bold;">/</span>nfs<span style="color: #000000; font-weight: bold;">/</span>freebsd<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">7.2</span>_32
<span style="color: #000000;">7.2</span>-RELEASE — <span style="color: #000000;">64</span>-bit — 213.133.99.100:<span style="color: #000000; font-weight: bold;">/</span>nfs<span style="color: #000000; font-weight: bold;">/</span>freebsd<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">7.2</span>_64
<span style="color: #000000;">7.3</span>-RELEASE — <span style="color: #000000;">32</span>-bit — 213.133.99.100:<span style="color: #000000; font-weight: bold;">/</span>nfs<span style="color: #000000; font-weight: bold;">/</span>freebsd<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">7.3</span>_32
<span style="color: #000000;">7.3</span>-RELEASE — <span style="color: #000000;">64</span>-bit — 213.133.99.100:<span style="color: #000000; font-weight: bold;">/</span>nfs<span style="color: #000000; font-weight: bold;">/</span>freebsd<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">7.3</span>_64
<span style="color: #000000;">8.0</span>-RELEASE — <span style="color: #000000;">32</span>-bit — 213.133.99.100:<span style="color: #000000; font-weight: bold;">/</span>nfs<span style="color: #000000; font-weight: bold;">/</span>freebsd<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">8.0</span>_32
<span style="color: #000000;">8.0</span>-RELEASE — <span style="color: #000000;">64</span>-bit — 213.133.99.100:<span style="color: #000000; font-weight: bold;">/</span>nfs<span style="color: #000000; font-weight: bold;">/</span>freebsd<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">8.0</span>_64</pre></div></div>

<p>Then sysinstall will ask what exactly you want to install. Hetzner recommends to install FreeBSD &#8220;minimal&#8221;. But, since, I want to rebuild kernel with pf support (packet filter &#8211; firewall) and I also want to have all ports collection on board &#8211; I&#8217;ve choosen &#8220;Custom&#8221; installation and have selected next options:<br />
- base<br />
- kernels<br />
- src<br />
- ports<br />
Press &#8220;Ok&#8221;, installation process started-15 minutes-Done-&#8221;Exit install&#8221;</p>
<p>Lets copy kernel in right place, otherwise after reboot system will not find it</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>rescue ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cp -Rp /mnt/boot/GENERIC/* /mnt/boot/kernel/</span></pre></div></div>

<p>Also lets run &#8220;bsdconfig&#8221; for configuring network and mounting disks on start.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>rescue ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># bsdconfig</span>
Welcome to the Hetzner configuration tool <span style="color: #000000; font-weight: bold;">for</span> FreeBSD.</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Hostname: myservername
&nbsp;
Changing <span style="color: #7a0874; font-weight: bold;">local</span> password <span style="color: #000000; font-weight: bold;">for</span> root
New Password:
Retype New Password:
&nbsp;
Configuring rc.conf... DONE
Configuring loader.conf... DONE
DONE
Enabling SSH <span style="color: #c20cb9; font-weight: bold;">login</span> <span style="color: #000000; font-weight: bold;">for</span> root... DONE
Configuring resolv.conf... DONE
Press ENTER to configure your <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>fstab using <span style="color: #c20cb9; font-weight: bold;">vi</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ad4s1a <span style="color: #000000; font-weight: bold;">/</span> ufs rw <span style="color: #000000;">1</span> <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ad4s1b none swap sw <span style="color: #000000;">0</span> <span style="color: #000000;">0</span>
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ad4s1d <span style="color: #000000; font-weight: bold;">/</span>tmp ufs rw <span style="color: #000000;">1</span> <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ad4s1e <span style="color: #000000; font-weight: bold;">/</span>var ufs rw <span style="color: #000000;">1</span> <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ad4s1f <span style="color: #000000; font-weight: bold;">/</span>usr ufs rw <span style="color: #000000;">1</span> <span style="color: #000000;">1</span></pre></div></div>

<p>You can check that &#8220;bsdconfig&#8221; already configured network with using DHCP in /etc/rc.conf and have prefilled nameservers as well in /etc/resolv.conf</p>
<p>On this moment bsdconfig sets using DHCP in /etc/rc.conf, so it could be changed on real data</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># ifconfig_re0=&quot;DHCP&quot;</span>
<span style="color: #007800;">ifconfig_re0</span>=<span style="color: #ff0000;">&quot;inet XXX.XXX.XXX.XXX netmask XXX.XXX.XXX.XXX&quot;</span>
<span style="color: #007800;">defaultrouter</span>=<span style="color: #ff0000;">&quot;XXX.XXX.XXX.XXX&quot;</span></pre></div></div>

<p>Now, lets un-mount disks:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">umount</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp
<span style="color: #c20cb9; font-weight: bold;">umount</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>var
<span style="color: #c20cb9; font-weight: bold;">umount</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>usr
<span style="color: #c20cb9; font-weight: bold;">umount</span> <span style="color: #000000; font-weight: bold;">/</span>mnt</pre></div></div>

<p>and reboot &#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>rescue ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># reboot</span></pre></div></div>

<p>After reboot you can login with root and password which you have provided during &#8220;bsdconfig&#8221;-uring.</p>
<p>Done, enjoy!</p>
<p>p.s. On 29 May 2010 when I tried to update &#8220;src&#8221; to FREEBSD_8_0 (with cvsup) and tried to rebuild kernel &#8211; my system did not startup. So, I back to rebuilding kernel with &#8220;src&#8221; from Hetzner NFS image and it worked fine.</p>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/0529/install-freebsd-8-0-on-hetzner-de/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to send mail or file from console</title>
		<link>http://devreview.net/0320/how-to-send-mail-or-file-from-console/</link>
		<comments>http://devreview.net/0320/how-to-send-mail-or-file-from-console/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 19:34:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[freebsd]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[mail from console]]></category>
		<category><![CDATA[mail from shell]]></category>
		<category><![CDATA[postfix]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=138</guid>
		<description><![CDATA[For FreeBSD, with pre-installed postfix
mail -s "test1" test@test.com &#60; /usr/home/username/test-email.txt
]]></description>
			<content:encoded><![CDATA[<p>For FreeBSD, with pre-installed postfix</p>
<p><code>mail -s "test1" test@test.com &lt; /usr/home/username/test-email.txt</code></p>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/0320/how-to-send-mail-or-file-from-console/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Incremental indexing with sphinx</title>
		<link>http://devreview.net/0320/incremental-indexing-with-sphinx/</link>
		<comments>http://devreview.net/0320/incremental-indexing-with-sphinx/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 19:14:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Search engines]]></category>
		<category><![CDATA[full-text search engine]]></category>
		<category><![CDATA[indexing]]></category>
		<category><![CDATA[SOLR]]></category>
		<category><![CDATA[sphinx]]></category>
		<category><![CDATA[sphinxsearch]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=128</guid>
		<description><![CDATA[Recently, I&#8217;ve read a lot of documents where people are trying to compare SOLR with Sphinx search engine.
And main problem with sphinx is &#8211; it cannot just made partial update on documents during indexing (or understand during search where fresh is).
For example if somebody updates some old record &#8211; you can create delta index, but [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I&#8217;ve read a lot of documents where people are trying to <a href="http://beerpla.net/2009/09/03/comparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-fight/" target="_blank">compare SOLR with Sphinx search engine</a>.<br />
And main problem with sphinx is &#8211; it cannot just made partial update on documents during indexing (or understand during search where fresh is).</p>
<p>For example if somebody updates some old record &#8211; you can create delta index, but select from `main` index and `delta` will return you two records, instead of one (plus normal count of search results).</p>
<p><span id="more-128"></span>p.s. Sometimes, I have feeling that sphinx developers just this did that ugly `non-functionality` deliberately! (Theoretically, why it should be so hard? &#8211; just have to hardcode into functionality one special case &#8211; &#8220;if there are two indexes and same document_id presents in both &#8211; please return only fresh one! grouping costs a lot, but if use it carefully and see on bright side &#8211; how many business value it could bring, why not? wtf?&#8221;)</p>
<p>So, I found one nice idea, how to decrease little bit load on server with incremental indexing, which is used on craigslist.</p>
<p><a rel="attachment wp-att-131" href="http://devreview.net/0320/incremental-indexing-with-sphinx/incremental-indexing-sphinx/"><img class="alignnone size-full wp-image-131" title="incremental-indexing-sphinx" src="http://devreview.net/content/2010/03/incremental-indexing-sphinx.jpg" alt="" width="500" height="315" /></a></p>
<p>BTW. One more nice presentation how it works inside high-loaded projects.<br />
Meet craigslist: perl+mysql+sphinx+(tons of workarounds :) )</p>
<p>Going, to try implement incremental indexing and show some results later &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/0320/incremental-indexing-with-sphinx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rounded corners CSS</title>
		<link>http://devreview.net/0320/rounded-corners-css/</link>
		<comments>http://devreview.net/0320/rounded-corners-css/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 12:33:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[corners]]></category>
		<category><![CDATA[corners css3]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[ie 9]]></category>
		<category><![CDATA[ie9]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[rounded corners]]></category>
		<category><![CDATA[safari]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=120</guid>
		<description><![CDATA[
On the web you can find a lot of examples how this trick could be workarounded, but I prefer to use browser built-in feature . Rounded corners functionality &#8211; is something whats expected very long time ago from browser&#8217;s vendors by frontend developers.
Sooner or later this damn IE 9 will go live and this feature [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-121" href="http://devreview.net/0320/rounded-corners-css/web-browsers/"><img class="alignnone size-thumbnail wp-image-121" title="web-browsers" src="http://devreview.net/content/2010/03/web-browsers-200x150.jpg" alt="" width="200" height="150" /></a><a rel="attachment wp-att-122" href="http://devreview.net/0320/rounded-corners-css/dean_pdc_4/"><img class="alignnone size-thumbnail wp-image-122" title="Dean_PDC_4" src="http://devreview.net/content/2010/03/Dean_PDC_4-200x150.png" alt="" width="200" height="150" /></a></p>
<p>On the web you can find a lot of examples how this trick could be workarounded, but I prefer to use browser built-in feature . Rounded corners functionality &#8211; is something whats expected very long time ago from browser&#8217;s vendors by frontend developers.</p>
<p><span id="more-120"></span>Sooner or later this damn IE 9 will go live and this feature promised to be  included as well. On moment of this post it already works in next browsers: Opera &gt; 10.5, Firefox &gt; 1.5, Safari &amp; Chrome as well. I&#8217;ve tested it. And doesn&#8217;t work in any IE &lt;= 8.0.</p>
<p><code>// Opera, Internet explorer 9 (actually in future should work everywhere)<br />
border-radius:5px;</code></p>
<p>// Mozilla Firefox<br />
-moz-border-radius:5px;</p>
<p>// Safari &amp; Chrome<br />
-webkit-border-radius:5px;</p>
<p>By the way there is more rich possibilities than `round all corners` with some radius. You can provide any radius value to any corner independently.</p>
<ul>
<li><code>-moz-border-radius-topleft </code> / <code>-webkit-border-top-left-radius</code></li>
<li><code>-moz-border-radius-topright </code> / <code>-webkit-border-top-right-radius</code></li>
<li><code>-moz-border-radius-bottomleft </code> / <code>-webkit-border-bottom-left-radius</code></li>
<li><code>-moz-border-radius-bottomright </code> / <code>-webkit-border-bottom-right-radius</code></li>
</ul>
<p>Of course question for now is &#8211; what to do if on this moment those css3 features don&#8217;t work in 50% live browsers?<br />
In my opinion, answer is &#8211; do the same as other companies do &#8211; &#8217;start using it and just sit and wait for damn IE9&#8242; :)</p>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/0320/rounded-corners-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Apache Tomcat &amp; Hello World via Java Servlets and JSP</title>
		<link>http://devreview.net/0317/install-apache-tomcat-hello-world-via-java-servlets-and-jsp/</link>
		<comments>http://devreview.net/0317/install-apache-tomcat-hello-world-via-java-servlets-and-jsp/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 11:15:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[apache tomcat]]></category>
		<category><![CDATA[Hello World]]></category>
		<category><![CDATA[helloworld]]></category>
		<category><![CDATA[java tomcat]]></category>
		<category><![CDATA[jsp]]></category>
		<category><![CDATA[servlet]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=112</guid>
		<description><![CDATA[
First of all, you need java, how to install jdk on FreeBSD check here: How to install JAVA on FreeBSD
How to install Apache Tomcat on FreeBSD &#38; test how it works:
installation:
/usr/ports/www/tomcat6
make install clean
run webserver:
cd /usr/local/apache-tomcat6.0/bin
./startup.sh

now lets check it is started:
sockstat -4
you should see something like this:
root     java     [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-113" href="http://devreview.net/0317/install-apache-tomcat-hello-world-via-java-servlets-and-jsp/tomcat/"><img class="alignnone size-full wp-image-113" title="tomcat" src="http://devreview.net/content/2010/03/tomcat.gif" alt="" width="130" height="92" /></a></p>
<p>First of all, you need java, how to install jdk on FreeBSD check here: <a href="http://devreview.net/0306/how-to-install-java-on-freebsd/">How to install JAVA on FreeBSD</a><br />
How to install Apache Tomcat on FreeBSD &amp; test how it works:</p>
<p>installation:<br />
<code>/usr/ports/www/tomcat6<br />
make install clean</code></p>
<p>run webserver:<br />
<code>cd /usr/local/apache-tomcat6.0/bin<br />
./startup.sh</code></p>
<p><span id="more-112"></span></p>
<p>now lets check it is started:<br />
<code>sockstat -4</code><br />
you should see something like this:<br />
<code>root     java       71812 32 tcp4   *:8180                *:*<br />
root     java       71812 40 tcp4   *:8009                *:*<br />
root     java       71812 42 tcp4   127.0.0.1:8005        *:*<br />
</code></p>
<p>now lets try check from http side it it works:<br />
check your ipaddress<br />
<code>ifconfig</code><br />
and try to get this with browser:</p>
<p>http://192.168.147.131:8180/</p>
<p>You should see now default &#8220;Congratulations! Tomcat installed successfully&#8221; page<br />
There are two links on left sidebar menu: Status &amp; Tomcat Manager<br />
To have possibility reach those pages &#8211; change permissions into file<br />
/usr/local/apache-tomcat6.0/conf/tomcat-users.xml<br />
<code><br />
</code>&#8230; and dont forget restart tomcat with:<br />
<code>cd /usr/local/apache-tomcat6.0/bin<br />
./startup.sh<br />
./shutdown.sh<br />
</code></p>
<p>Now, you can check server status (&amp; Complete Server Status with all logs) &amp; check manager section.</p>
<p><strong>Done! </strong>(with server installation)</p>
<p>Lets now check some examples how it works inside on example of java servlets + tomcat (will not write now about JSP).<br />
So, actually there are a lot of examples on left sidebar menu as well, like HelloWorld sample, examples how to handle forms, play with cookies.</p>
<p>HelloWorld servlet example:</p>
<pre><span style="color: #0000ff;">import</span> java.io.*;
<span style="color: #0000ff;">import</span> javax.servlet.*;
<span style="color: #0000ff;">import</span> javax.servlet.http.*;

<span style="color: #0000ff;">public class</span> HelloWorld <span style="color: #0000ff;">extends</span> HttpServlet {

    <span style="color: #0000ff;">public void</span> doGet(HttpServletRequest request, HttpServletResponse response)
    <span style="color: #0000ff;">throws</span> IOException, ServletException
    {
        response.setContentType("<span style="color: #009900;">text/html</span>");
        PrintWriter out = response.getWriter();
        out.println("<span style="color: #009900;">&lt;html&gt;</span>");
        out.println("<span style="color: #009900;">&lt;head&gt;</span>");
        out.println("<span style="color: #009900;">&lt;title&gt;Hello World!&lt;/title&gt;</span>");
        out.println("<span style="color: #009900;">&lt;/head&gt;</span>");
        out.println("<span style="color: #009900;">&lt;body&gt;</span>");
        out.println("<span style="color: #009900;">&lt;h1&gt;Hello World!&lt;/h1&gt;</span>");
        out.println("<span style="color: #009900;">&lt;/body&gt;</span>");
        out.println("<span style="color: #009900;">&lt;/html&gt;</span>");
    }
}</pre>
<p>How to handle forms, example of simple form with two fields &#8211; FirstName, LastName and Submit button.</p>
<pre><span style="color: #0000ff;">import</span> java.io.*;
<span style="color: #0000ff;">import</span> java.util.*;
<span style="color: #0000ff;">import</span> javax.servlet.*;
<span style="color: #0000ff;">import</span> javax.servlet.http.*;

<span style="color: #0000ff;">public class</span> RequestParamExample <span style="color: #0000ff;">extends</span> HttpServlet {

    <span style="color: #0000ff;">public void</span> doGet(HttpServletRequest request, HttpServletResponse response)
    <span style="color: #0000ff;">throws</span> IOException, ServletException
    {
        response.setContentType("<span style="color: #009900;">text/html</span>");
        PrintWriter out = response.getWriter();
        out.println("<span style="color: #009900;">&lt;html&gt;</span>");
        out.println("<span style="color: #009900;">&lt;head&gt;</span>");
        out.println("<span style="color: #009900;">&lt;title&gt;Request Parameters Example&lt;/title&gt;</span>");
        out.println("<span style="color: #009900;">&lt;/head&gt;</span>");
        out.println("<span style="color: #009900;">&lt;body&gt;</span>");
        out.println("<span style="color: #009900;">&lt;h3&gt;Request Parameters Example&lt;/h3&gt;</span>");
        out.println("<span style="color: #009900;">Parameters in this request:&lt;br&gt;</span>");
        if (firstName != null || lastName != null) {
            out.println("<span style="color: #009900;">First Name:</span>");
            out.println("<span style="color: #009900;"> = </span>" + HTMLFilter.filter(firstName) + "<span style="color: #009900;">&lt;br&gt;</span>");
            out.println("<span style="color: #009900;">Last Name:</span>");
            out.println("<span style="color: #009900;"> = </span>" + HTMLFilter.filter(lastName));
        } else {
            out.println("<span style="color: #009900;">No Parameters, Please enter some</span>");
        }
        out.println("<span style="color: #009900;">&lt;P&gt;</span>");
        out.print("<span style="color: #009900;">&lt;form action=\"</span>");
        out.print("<span style="color: #009900;">RequestParamExample\" </span>");
        out.println("<span style="color: #009900;">method=POST&gt;</span>");
        out.println("<span style="color: #009900;">First Name:</span>");
        out.println("<span style="color: #009900;">&lt;input type=text size=20 name=firstname&gt;</span>");
        out.println("<span style="color: #009900;">&lt;br&gt;</span>");
        out.println("<span style="color: #009900;">Last Name:</span>");
        out.println("<span style="color: #009900;">&lt;input type=text size=20 name=lastname&gt;</span>");
        out.println("<span style="color: #009900;">&lt;br&gt;</span>");
        out.println("<span style="color: #009900;">&lt;input type=submit&gt;</span>");
        out.println("<span style="color: #009900;">&lt;/form&gt;</span>");
        out.println("<span style="color: #009900;">&lt;/body&gt;</span>");
        out.println("<span style="color: #009900;">&lt;/html&gt;</span>");
    }

    <span style="color: #0000ff;">public void</span> doPost(HttpServletRequest request, HttpServletResponse res)
    <span style="color: #0000ff;">throws</span> IOException, ServletException
    {
        doGet(request, response);
    }
}</pre>
<p>Everything looks clear and simple (specially if you have some knowledge for example in apache + php).</p>
<p>Thats it.</p>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/0317/install-apache-tomcat-hello-world-via-java-servlets-and-jsp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache SOLR search engine &#8211; simple to install &amp; try to use</title>
		<link>http://devreview.net/0314/apache-solr-search-engine-simple-to-install-try-to-use/</link>
		<comments>http://devreview.net/0314/apache-solr-search-engine-simple-to-install-try-to-use/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 23:11:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Search engines]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[apache solr]]></category>
		<category><![CDATA[full-text search engine]]></category>
		<category><![CDATA[search engine]]></category>
		<category><![CDATA[SOLR]]></category>
		<category><![CDATA[sphinx]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=105</guid>
		<description><![CDATA[
With this post I want to tell you that SOLR &#8211; is really easy to install and use, if you even dont have any knowledge in search engine principles, but always wanted to implement fulltext search for your web application.
Recently, I&#8217;m playing with sphinx search engine and trying to connect it to one project. Sphinx [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-106" href="http://devreview.net/0314/apache-solr-search-engine-simple-to-install-try-to-use/solr/"><img class="size-full wp-image-106 alignnone" title="solr" src="http://devreview.net/content/2010/03/solr.jpg" alt="" width="198" height="109" /></a></p>
<p>With this post I want to tell you that SOLR &#8211; is really easy to install and use, if you even dont have any knowledge in search engine principles, but always wanted to implement fulltext search for your web application.</p>
<p>Recently, I&#8217;m playing with <a href="http://devreview.net/0305/installation-sphinx-search-engine-on-freebsd-7-2/">sphinx search engine</a> and trying to connect it to one project. Sphinx is great simple SE, but it  has some limitations and stuff I dont like. So,  I think &#8211; it would be nice to have some alternative.</p>
<p>Honestly, saying I did not touch to much SOLR on this moment as well :) , but main public use cases are clear to me, checked, read,  and fear of using something java related from php disappeared. :)</p>
<p>Why SOLR is cool? and what do you need for start?<br />
<span id="more-105"></span>1. <a href="http://devreview.net/0306/how-to-install-java-on-freebsd/" target="_blank">Install JAVA</a> (2 hours)<br />
2. Read 1 page of <a href="http://lucene.apache.org/solr/tutorial.html">SOLR tutorial </a>and follow all instructions. (&#8230; simpler just couldn&#8217;t be :) ). (1 hour)<br />
Yes,  it needs just 1 hour to create some simple index, do some search query, update/delete items, check SOLR admin web interface and SOLR logs.</p>
<p>(to be continue &#8230; , i hope :) )</p>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/0314/apache-solr-search-engine-simple-to-install-try-to-use/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP exec() returns error 127</title>
		<link>http://devreview.net/0314/php-exec-returns-errors-12/</link>
		<comments>http://devreview.net/0314/php-exec-returns-errors-12/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 22:24:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[127]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[error 127]]></category>
		<category><![CDATA[exec]]></category>
		<category><![CDATA[identify]]></category>
		<category><![CDATA[imagemagick]]></category>
		<category><![CDATA[imagick]]></category>
		<category><![CDATA[shell_exec]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=102</guid>
		<description><![CDATA[Today I had one strange error between php and freeBSD, throught exec() function. Had to debug for 2 hours.
User passed correct. `whoiam` returned right data. Some other shell commands like `ls -al`, `pwd` worked well. With same user direct command to shell worked correct. 
but:
$command = "identify -format '%m' " . $src;
exec($command, $output, $result);
$result returned [...]]]></description>
			<content:encoded><![CDATA[<p>Today I had one strange error between php and freeBSD, throught exec() function. Had to debug for 2 hours.<br />
User passed correct. `whoiam` returned right data. Some other shell commands like `ls -al`, `pwd` worked well. With same user direct command to shell worked correct. </p>
<p>but:<br />
<code>$command = "identify -format '%m' " . $src;<br />
exec($command, $output, $result);</code></p>
<p>$result returned (int)127 error.<br />
$output &#8211; empty.</p>
<p>Btw, `identify` is part of installed imagemagick&#8217;s application.</p>
<p>The problem was &#8211; php can&#8217;t find application `identify`. Dunno why even till now. So, full path works OK.</p>
<p><code>$command = "/usr/local/bin/identify -format '%m' " . $src;<br />
exec($command, $output, $result);</code></p>
<p>cheers</p>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/0314/php-exec-returns-errors-12/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to shutdown FreeBSD</title>
		<link>http://devreview.net/0309/how-to-shutdown-freebsd/</link>
		<comments>http://devreview.net/0309/how-to-shutdown-freebsd/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 19:09:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[freebsd]]></category>
		<category><![CDATA[freebsd shutdown]]></category>
		<category><![CDATA[halt]]></category>
		<category><![CDATA[shutdown]]></category>

		<guid isPermaLink="false">http://devreview.net/?p=100</guid>
		<description><![CDATA[There are 2 commands for shutdowning OS:
shutdown -h now
or
halt
]]></description>
			<content:encoded><![CDATA[<p>There are 2 commands for shutdowning OS:</p>
<p><code>shutdown -h now</code></p>
<p>or</p>
<p><code>halt</code></p>
]]></content:encoded>
			<wfw:commentRss>http://devreview.net/0309/how-to-shutdown-freebsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

