<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>German Rumm's blog</title>
	
	<link>http://nevermore.pri.ee</link>
	<description>programming web</description>
	<lastBuildDate>Tue, 29 Jun 2010 09:00:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/nev3rm0re" /><feedburner:info uri="nev3rm0re" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by/2.0/</creativeCommons:license><image><link>http://creativecommons.org/licenses/by/2.0/</link><url>http://creativecommons.org/images/public/somerights20.gif</url><title>Some Rights Reserved</title></image><feedburner:emailServiceId>nev3rm0re</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Doctrine migrations</title>
		<link>http://feedproxy.google.com/~r/nev3rm0re/~3/gdQMMlI_5lI/</link>
		<comments>http://nevermore.pri.ee/doctrine-migrations/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 08:58:32 +0000</pubDate>
		<dc:creator>German Rumm</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[doctrine]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://nevermore.pri.ee/doctrine-migrations/</guid>
		<description><![CDATA[Finally learned how to use Doctrine migrations.

You have development and staging servers. Your development server moved forward &#8211; you did some database changes, removed some fields, added some indexes. Now it&#8217;s tricky to update staging server without rebuilding the db (and losing all the data).

Sure, you can alter database by hand, but if you made [...]]]></description>
			<content:encoded><![CDATA[<p>Finally learned how to use Doctrine migrations.</p>

<p>You have development and staging servers. Your development server moved forward &#8211; you did some database changes, removed some fields, added some indexes. Now it&#8217;s tricky to update staging server without rebuilding the db (and losing all the data).</p>

<p>Sure, you can alter database by hand, but if you made a lot of changes, that would be a long and error-prone process.</p>

<p>That&#8217;s when you are supposed to use migrations.</p>

<p>There was only one problem &#8211; I didn&#8217;t know how to use them correctly. Now I figured it out.</p>

<ol>
<li>Get a &#8220;staging&#8221; server model files (checkout or copy)</li>
<li>Put <strong>new</strong> schema.yml into config/doctrine directory replacing old one.</li>
<li>and run</li>
</ol>


<div class="wp_syntax"><div class="code"><pre class="bash">./symfony doctrine:generate-migrations-<span style="color: #c20cb9; font-weight: bold;">diff</span></pre></div></div>


<p>Symfony will now generate a migration file that brings your database up to date.</p>

<p>Now, when you deploy your changes just run</p>


<div class="wp_syntax"><div class="code"><pre class="bash">./symfony doctrine:migrate</pre></div></div>


<p>Now I just have to remember doing generate-migrations-diff before every doctrine:build &#8211;all, so I will have all the necessary files before uploading.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/nev3rm0re?a=gdQMMlI_5lI:fGMDBHBkk1U:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/nev3rm0re?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://nevermore.pri.ee/doctrine-migrations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://nevermore.pri.ee/doctrine-migrations/</feedburner:origLink></item>
		<item>
		<title>Installed ZenCoding plugin</title>
		<link>http://feedproxy.google.com/~r/nev3rm0re/~3/OVz1XR9w6UY/</link>
		<comments>http://nevermore.pri.ee/installed-zencoding-plugin/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 09:56:06 +0000</pubDate>
		<dc:creator>German Rumm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nevermore.pri.ee/?p=209</guid>
		<description><![CDATA[Installed ZenCoding plugins for Eclipse and GEdit yesterday.

ZenCoding is an editor plugin that helps speed up HTML creation. In short, you type something like

div#page>div.logo+ul#navigation>li*5>a

press &#8220;Expand Abbreviation&#8221; shortcut and get this


  &#60;div id=&#34;page&#34;&#62;
        &#60;div class=&#34;logo&#34;&#62;&#60;/div&#62;
        &#60;ul id=&#34;navigation&#34;&#62;
     [...]]]></description>
			<content:encoded><![CDATA[<p>Installed <a href="http://code.google.com/p/zen-coding/" onclick="pageTracker._trackPageview('/outgoing/code.google.com/p/zen-coding/?referer=');">ZenCoding plugins</a> for Eclipse and GEdit yesterday.</p>

<p>ZenCoding is an editor plugin that helps speed up HTML creation. In short, you type something like</p>

<p>div#page>div.logo+ul#navigation>li*5>a</p>

<p>press &#8220;Expand Abbreviation&#8221; shortcut and get this</p>


<div class="wp_syntax"><div class="code"><pre>  &lt;div id=&quot;page&quot;&gt;
        &lt;div class=&quot;logo&quot;&gt;&lt;/div&gt;
        &lt;ul id=&quot;navigation&quot;&gt;
                &lt;li&gt;&lt;a href=&quot;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href=&quot;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href=&quot;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href=&quot;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href=&quot;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
  &lt;/div&gt;</pre></div></div>


<p>Thanks to different filters it can generate HAML</p>


<div class="wp_syntax"><div class="code"><pre>#page
	.logo
	%ul#navigation
		%li%a{:href =&gt; &quot;&quot;}
		%li%a{:href =&gt; &quot;&quot;}
		%li%a{:href =&gt; &quot;&quot;}
		%li%a{:href =&gt; &quot;&quot;}
		%li%a{:href =&gt; &quot;&quot;}</pre></div></div>


<p>or html with comments:</p>


<div class="wp_syntax"><div class="code"><pre>  &lt;!-- #page --&gt;
&lt;div id=&quot;page&quot;&gt;
	&lt;!-- .logo --&gt;
	&lt;div class=&quot;logo&quot;&gt;&lt;/div&gt;
	&lt;!-- /.logo --&gt;
	&lt;!-- #navigation --&gt;
	&lt;ul id=&quot;navigation&quot;&gt;
		&lt;li&gt;&lt;a href=&quot;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
	&lt;!-- /#navigation --&gt;
&lt;/div&gt;
&lt;!-- /#page --&gt;</pre></div></div>


<p>Still didn&#8217;t figure out how to expand to CSS in Eclipse. Not that important for me, since I don&#8217;t usually do it.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/nev3rm0re?a=OVz1XR9w6UY:68jX2OjYpOA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/nev3rm0re?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://nevermore.pri.ee/installed-zencoding-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://nevermore.pri.ee/installed-zencoding-plugin/</feedburner:origLink></item>
		<item>
		<title>PHP Snippet: how to auto-crop image for thumbnail using imagemagick.</title>
		<link>http://feedproxy.google.com/~r/nev3rm0re/~3/RlhV-fRDczw/</link>
		<comments>http://nevermore.pri.ee/php-snippet-how-to-auto-crop-image-for-thumbnail-using-imagemagick/#comments</comments>
		<pubDate>Sun, 16 May 2010 09:12:43 +0000</pubDate>
		<dc:creator>German Rumm</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[snippet]]></category>

		<guid isPermaLink="false">http://nevermore.pri.ee/?p=205</guid>
		<description><![CDATA[Had a need to create thumbnails of specified size for a site, but source images were of different dimensions.

Usually I use some kind of framework/plugin function for that, but this project is pure PHP, so I had to come up with a function. I did this several times already and I don&#8217;t like writing the [...]]]></description>
			<content:encoded><![CDATA[<p>Had a need to create thumbnails of specified size for a site, but source images were of different dimensions.</p>

<p>Usually I use some kind of framework/plugin function for that, but this project is pure PHP, so I had to come up with a function. I did this several times already and I don&#8217;t like writing the same function over and over again. So, here&#8217;s the snippet which I can look up later. Maybe someone else will also find it useful:</p>


<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #666666; font-style: italic;">/**
 * $image_path string Path to an image file.
 * $size string Thumbnail dimensions in &lt;width&gt;x&lt;height&gt; format
 * 
 * @returns string Path to created thumbnail
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> thumbnail<span style="color: #009900;">&#40;</span><span style="color: #000088;">$image_path</span>, <span style="color: #000088;">$size</span> = <span style="color: #0000ff;">'200x150'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #990000;">list</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$width</span>, <span style="color: #000088;">$height</span><span style="color: #009900;">&#41;</span> = <span style="color: #990000;">getimagesize</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$image_path</span><span style="color: #009900;">&#41;</span>;
  <span style="color: #000088;">$image_aspect</span> = <span style="color: #000088;">$width</span> / <span style="color: #000088;">$height</span>;
&nbsp;
  <span style="color: #990000;">list</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$thumb_width</span>, <span style="color: #000088;">$thumb_height</span><span style="color: #009900;">&#41;</span> = <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'x'</span>, <span style="color: #000088;">$size</span><span style="color: #009900;">&#41;</span>;
  <span style="color: #000088;">$thumb_aspect</span> = <span style="color: #000088;">$thumb_width</span> / <span style="color: #000088;">$thumb_height</span>;
&nbsp;
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$image_aspect</span> &gt; <span style="color: #000088;">$thumb_aspect</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$crop_height</span> = <span style="color: #000088;">$height</span>;
    <span style="color: #000088;">$crop_width</span> = <span style="color: #990000;">round</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$crop_height</span> * <span style="color: #000088;">$thumb_aspect</span><span style="color: #009900;">&#41;</span>;
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$crop_width</span> = <span style="color: #000088;">$width</span>;
    <span style="color: #000088;">$crop_height</span> = <span style="color: #990000;">round</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$crop_width</span> / <span style="color: #000088;">$thumb_aspect</span><span style="color: #009900;">&#41;</span>;
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000088;">$crop_x_offset</span> = <span style="color: #990000;">round</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$width</span> - <span style="color: #000088;">$crop_width</span><span style="color: #009900;">&#41;</span> / <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span>;
  <span style="color: #000088;">$crop_y_offset</span> = <span style="color: #990000;">round</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$height</span> - <span style="color: #000088;">$crop_height</span><span style="color: #009900;">&#41;</span> / <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span>;
&nbsp;
  <span style="color: #666666; font-style: italic;">// crop parameter</span>
  <span style="color: #000088;">$crop_size</span> = <span style="color: #000088;">$crop_width</span>.<span style="color: #0000ff;">'x'</span>.<span style="color: #000088;">$crop_height</span>.<span style="color: #0000ff;">'+'</span>.<span style="color: #000088;">$crop_x_offset</span>.<span style="color: #0000ff;">'+'</span>.<span style="color: #000088;">$crop_y_offset</span>;
&nbsp;
  <span style="color: #666666; font-style: italic;">// thumbnail is created next to original image with th- prefix.</span>
  <span style="color: #000088;">$thumb</span> = <span style="color: #990000;">dirname</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$image_path</span><span style="color: #009900;">&#41;</span>.<span style="color: #0000ff;">'/th-'</span>.<span style="color: #990000;">basename</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$image</span><span style="color: #009900;">&#41;</span>;
  <span style="color: #990000;">exec</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'convert '</span>. <span style="color: #990000;">escapeshellarg</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$path</span><span style="color: #009900;">&#41;</span>.<span style="color: #0000ff;">' -crop '</span> . <span style="color: #000088;">$crop_size</span> .<span style="color: #0000ff;">' -thumbnail '</span>.<span style="color: #000088;">$size</span>.<span style="color: #0000ff;">' '</span>. <span style="color: #990000;">escapeshellarg</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$thumb</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>;
&nbsp;
  <span style="color: #b1b100;">return</span> <span style="color: #000088;">$thumb</span>;
<span style="color: #009900;">&#125;</span></pre></div></div>

<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/nev3rm0re?a=RlhV-fRDczw:9o5F0R2brLc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/nev3rm0re?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://nevermore.pri.ee/php-snippet-how-to-auto-crop-image-for-thumbnail-using-imagemagick/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://nevermore.pri.ee/php-snippet-how-to-auto-crop-image-for-thumbnail-using-imagemagick/</feedburner:origLink></item>
		<item>
		<title>Proxy Auto Config and VirtualDocumentRoot</title>
		<link>http://feedproxy.google.com/~r/nev3rm0re/~3/JKmB_S5Xu6c/</link>
		<comments>http://nevermore.pri.ee/proxy-auto-config-and-virtualdocumentroot/#comments</comments>
		<pubDate>Sun, 16 May 2010 09:00:50 +0000</pubDate>
		<dc:creator>German Rumm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nevermore.pri.ee/?p=180</guid>
		<description><![CDATA[Was looking for a way to automate setting up a new project on my dev machine.

Setting up a new project usually goes like this:


Create a folder for a project
Create new virtualhost config in /etc/apache2/sites-available (I usually copy and edit template I have)
a2ensite
/etc/init.d/apache reload
Edit /etc/hosts &#8211; add another &#8220;127.0.0.1 project-name&#8221; line
Create DB table and user using [...]]]></description>
			<content:encoded><![CDATA[<p>Was looking for a way to automate setting up a new project on my dev machine.</p>

<p>Setting up a new project usually goes like this:</p>

<ol>
<li>Create a folder for a project</li>
<li>Create new virtualhost config in /etc/apache2/sites-available (I usually copy and edit template I have)</li>
<li>a2ensite</li>
<li>/etc/init.d/apache reload</li>
<li>Edit /etc/hosts &#8211; add another &#8220;127.0.0.1 project-name&#8221; line</li>
<li>Create DB table and user using phpMyAdmin</li>
</ol>

<p>Those steps are always the same, and I knew that there suppose to be an easier way. I decided to look it up and stumbled on <a href="http://cmorrell.com/web-development/automatic-virtual-hosts-w-proxy-auto-config-768" onclick="pageTracker._trackPageview('/outgoing/cmorrell.com/web-development/automatic-virtual-hosts-w-proxy-auto-config-768?referer=');">Chris Morrell&#8217;s &#8220;Automatic Virtual Hosts w/ Proxy Auto-Config&#8221; post</a>. Not only he provides exampe on how to use VirtualDocumentRoot directive, he also explains how to avoid editing hosts file by using .pac file.</p>

<p>So, in short: update your apache config</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code"><pre class="apache">&lt;VirtualHost *:<span style="color: #ff0000;">80</span>&gt;
    <span style="color: #00007f;">ServerAdmin</span> webmaster@localhost
    <span style="color: #00007f;">VirtualDocumentRoot</span> <span style="color: #7f007f;">&quot;/path/to/vhosts/%1/public&quot;</span>
    <span style="color: #00007f;">ServerName</span> subdomains.localhost
    <span style="color: #00007f;">ServerAlias</span> *.localhost
    <span style="color: #00007f;">LogFormat</span> <span style="color: #7f007f;">&quot;%V %h %l %u %t <span style="color: #000099; font-weight: bold;">\&quot;</span>%r<span style="color: #000099; font-weight: bold;">\&quot;</span> %s %b&quot;</span> vcommon
    <span style="color: #00007f;">ErrorLog</span> <span style="color: #7f007f;">&quot;logs/vhosts-error_log&quot;</span>
    <span style="color: #00007f;">CustomLog</span> <span style="color: #7f007f;">&quot;logs/vhosts-access_log&quot;</span> vcommon
&lt;/VirtualHost&gt;
&lt;Directory <span style="color: #7f007f;">&quot;/path/to/vhosts/*/public&quot;</span>&gt;
    <span style="color: #00007f;">Options</span> <span style="color: #0000ff;">Indexes</span> <span style="color: #0000ff;">FollowSymLinks</span>
    <span style="color: #00007f;">AllowOverride</span> <span style="color: #00007f;">All</span>
    <span style="color: #00007f;">Order</span> <span style="color: #00007f;">allow</span>,<span style="color: #00007f;">deny</span>
    <span style="color: #00007f;">Allow</span> <span style="color: #00007f;">from</span> <span style="color: #00007f;">all</span>
&lt;/Directory&gt;</pre></td></tr></table></div>


<p>create a .pac file:</p>


<div class="wp_syntax"><div class="code"><pre class="javascript"><span style="color: #003366; font-weight: bold;">function</span> FindProxyForURL<span style="color: #009900;">&#40;</span>url, host<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>dnsDomainIs<span style="color: #009900;">&#40;</span>host, <span style="color: #3366CC;">&quot;.localhost&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #3366CC;">&quot;PROXY localhost&quot;</span>;
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #3366CC;">&quot;DIRECT&quot;</span>;
<span style="color: #009900;">&#125;</span></pre></div></div>


<p>and make your browser use it.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/nev3rm0re?a=JKmB_S5Xu6c:nludUWRbAUQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/nev3rm0re?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://nevermore.pri.ee/proxy-auto-config-and-virtualdocumentroot/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://nevermore.pri.ee/proxy-auto-config-and-virtualdocumentroot/</feedburner:origLink></item>
		<item>
		<title>Windows, Linux and RAM</title>
		<link>http://feedproxy.google.com/~r/nev3rm0re/~3/axBJvbysuVw/</link>
		<comments>http://nevermore.pri.ee/windows-linux-and-ram/#comments</comments>
		<pubDate>Sun, 25 Apr 2010 18:58:46 +0000</pubDate>
		<dc:creator>German Rumm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[memtest86+]]></category>
		<category><![CDATA[ram]]></category>
		<category><![CDATA[troubleshooting windows]]></category>

		<guid isPermaLink="false">http://nevermore.pri.ee/?p=177</guid>
		<description><![CDATA[Couple of weeks ago I installed Windows Vista. Usually I prefer XP, but I had Vista DVD and a license, and I wanted DirectX 11. After all, I was installing Vista solely for Call of Duty: Modern Warfare 2.

Almost immediately after installation I started experiencing a lot of problems: computer was rebooting by itself, everytime [...]]]></description>
			<content:encoded><![CDATA[<p>Couple of weeks ago I installed Windows Vista. Usually I prefer XP, but I had Vista DVD and a license, and I wanted DirectX 11. After all, I was installing Vista solely for Call of Duty: Modern Warfare 2.</p>

<p>Almost immediately after installation I started experiencing a lot of problems: computer was rebooting by itself, everytime proudly informing me that it had &#8220;recovered from serious error&#8221;, MW2 kept crashing and behaving strangely. I heard that Vista was bad, but that was too much.</p>

<p>About the same time I upgraded to Zend Studio 7. Zend Studio is great, it comes bundled with Mylyn, which I instantly loved. But I enjoyed it only for limited time, because Zend was dying on me constantly. After using Mylyn, reopening all the closed editors was frustrating. I tried everything to fix it: I dug deep into Zend Studio and Eclipse forums, I was disabling one plugin after another, I created several separate workspaces, reinstalled Zend Studio several times into different locations, upgraded JRE and switch to alternative JRE packages. Nothing helped. I decided to return back to Zend Studio 6.</p>

<p>But Zend 6 also kept crashing on me and I was extemely annoyed by all of it. I considered doing clean install of Ubuntu and was creating a list of stuff I need to backup before wiping out harddrive.</p>

<p>But then something happened. I needed to debug some javascript in IE6, so I decided to install XP to my Virtualbox (IETester is just not the same). Installation gave me BSOD with BAD_MEMORY_MANAGEMENT or something. I googled it up, and turned out that you will get this error message when there&#8217;s a problem with your RAM. I checked it with Windows Memory Diagnostic and indeed, there were several problems with my memory. Then I ran memtest86+ that comes with Ubuntu, and found out that my RAM is bad, bad, bad.</p>

<p>We contacted our hardware guy, he brough two new sticks of RAM, I run memtest86+ on them &#8211; they were fine. I rebooted into Ubuntu and voila &#8211; my problems were gone. Zend worked all day without a single fail, Firefox didn&#8217;t die on me, even Vista and MW2 ran without a single error.</p>

<p>Now I am enjoying my computer again, enjoying Zend Studio with Mylyn (upgraded to TaskTop), and enjoying Vista w/ MW2.</p>

<p>So, my word of advice: if you experience sudden BSODs on Windows, or random crashes of programs on Linux (Linux itself never crashed, BTW) &#8211; <strong>check your memory first</strong> and do it using memtest86+. It finds errors even when Windows Memory Diagnostics says &#8220;everything is ok&#8221;.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/nev3rm0re?a=axBJvbysuVw:nf0dmppQ9y0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/nev3rm0re?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://nevermore.pri.ee/windows-linux-and-ram/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://nevermore.pri.ee/windows-linux-and-ram/</feedburner:origLink></item>
		<item>
		<title>Week review</title>
		<link>http://feedproxy.google.com/~r/nev3rm0re/~3/tH7NCdZOrBE/</link>
		<comments>http://nevermore.pri.ee/week-review/#comments</comments>
		<pubDate>Sun, 25 Apr 2010 18:25:39 +0000</pubDate>
		<dc:creator>German Rumm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nevermore.pri.ee/?p=175</guid>
		<description><![CDATA[Last week was not that productive for me. Spent a lot of time debugging javascript for IE6, while fighting computer problems. But still managed to learn some valuable things:


Found out that most Windows problems are actually RAM problems
How to create custom validators using jQuery.validate()
That IE6 doesn&#8217;t like &#8220;wrong&#8221; javascript
How to setup Proxy Auto Config and [...]]]></description>
			<content:encoded><![CDATA[<p>Last week was not that productive for me. Spent a lot of time debugging javascript for IE6, while fighting computer problems. But still managed to learn some valuable things:</p>

<ol>
<li><a href="http://nevermore.pri.ee/windows-linux-and-ram/">Found out that most Windows problems are actually RAM problems</a></li>
<li>How to create custom validators using jQuery.validate()</li>
<li>That IE6 doesn&#8217;t like &#8220;wrong&#8221; javascript</li>
<li><a href="http://nevermore.pri.ee/proxy-auto-config-and-virtualdocumentroot/">How to setup Proxy Auto Config and save couple of minutes when creating new project.</a></li>
</ol>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/nev3rm0re?a=tH7NCdZOrBE:zdtBPmDOXsI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/nev3rm0re?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://nevermore.pri.ee/week-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://nevermore.pri.ee/week-review/</feedburner:origLink></item>
		<item>
		<title>How to add empty directory to Git repo</title>
		<link>http://feedproxy.google.com/~r/nev3rm0re/~3/oMklJClTcHk/</link>
		<comments>http://nevermore.pri.ee/how-to-add-empty-directory-to-git-repo/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 09:29:41 +0000</pubDate>
		<dc:creator>German Rumm</dc:creator>
				<category><![CDATA[work]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://nevermore.pri.ee/?p=162</guid>
		<description><![CDATA[I keep all my Symfony projects in a Git repositories. Makes my life a lot easier &#8211; I can upload only changed files on update, which makes updating faster and more reliable.

But, apart from the code files logs and cache files are always changing, and I don&#8217;t really need and want to keep them in [...]]]></description>
			<content:encoded><![CDATA[<p>I keep all my Symfony projects in a Git repositories. Makes my life a lot easier &#8211; I can upload only changed files on update, which makes updating faster and more reliable.</p>

<p>But, apart from the code files logs and cache files are always changing, and I don&#8217;t really need and want to keep them in repo. I used .gitignore to filter out log and cache directories, but everytime I &#8220;checkout&#8221; repo I need to create them by hand. What I needed is to &#8220;git add&#8221; directories but ignore directory contents.</p>

<p>The problem is that if you ignore directory contents, directory appears empty to Git, and Git ignores empty directories automatically, so</p>


<div class="wp_syntax"><div class="code"><pre class="bash">cache/*</pre></div></div>


<p>prevents me from adding cache directory at all.</p>

<p>Finally I found a solution to my problem in the Git Cheat Sheet at GitHub. http://github.com/guides/git-cheat-sheet</p>

<p>First, in root .gitignore file you ignore all the directories as usual, and add an exception for the .gitignore file</p>


<div class="wp_syntax"><div class="code"><pre class="bash">log/*
cache/*
!.gitignore</pre></div></div>


<p>And then just add empty .gitignore files into log/ and cache/ firectories.</p>


<div class="wp_syntax"><div class="code"><pre class="bash">$ <span style="color: #c20cb9; font-weight: bold;">touch</span> log/.gitignore cache/.gitignore</pre></div></div>


<p>Now, when you do git add, only .gitignore files will be added for those directories, and all other files will be ignored.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/nev3rm0re?a=oMklJClTcHk:eQz5xA9CLrY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/nev3rm0re?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://nevermore.pri.ee/how-to-add-empty-directory-to-git-repo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://nevermore.pri.ee/how-to-add-empty-directory-to-git-repo/</feedburner:origLink></item>
		<item>
		<title>How to clean up your Linux directories.</title>
		<link>http://feedproxy.google.com/~r/nev3rm0re/~3/3ilx2gfFn0w/</link>
		<comments>http://nevermore.pri.ee/how-to-clean-up-your-linux-directories/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 13:39:04 +0000</pubDate>
		<dc:creator>German Rumm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://nevermore.pri.ee/how-to-clean-up-your-linux-directories/</guid>
		<description><![CDATA[I need to clean up my working folders way too frequently. 
Got tired of googling required commands every time and decided to post them for everyone to see.

So, here goes.

Delete all files matching a pattern in a directory


$ find . -name &#34;*.tmp&#34; -print &#124; xargs rm


Remove empty directories


$ cleanlinks


Both commands work on my Ubuntu 8.04 [...]]]></description>
			<content:encoded><![CDATA[<p>I need to clean up my working folders way too frequently. 
Got tired of googling required commands every time and decided to post them for everyone to see.</p>

<p>So, here goes.</p>

<p><strong>Delete all files matching a pattern in a directory</strong></p>


<div class="wp_syntax"><div class="code"><pre class="bash">$ <span style="color: #c20cb9; font-weight: bold;">find</span> . <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;*.tmp&quot;</span> <span style="color: #660033;">-print</span> | <span style="color: #c20cb9; font-weight: bold;">xargs</span> <span style="color: #c20cb9; font-weight: bold;">rm</span></pre></div></div>


<p><strong>Remove empty directories</strong></p>


<div class="wp_syntax"><div class="code"><pre class="bash">$ cleanlinks</pre></div></div>


<p>Both commands work on my Ubuntu 8.04 with no apt-getting required.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/nev3rm0re?a=3ilx2gfFn0w:Epd0V-RwOus:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/nev3rm0re?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://nevermore.pri.ee/how-to-clean-up-your-linux-directories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://nevermore.pri.ee/how-to-clean-up-your-linux-directories/</feedburner:origLink></item>
		<item>
		<title>Adobe Flex</title>
		<link>http://feedproxy.google.com/~r/nev3rm0re/~3/0xIk4xYsmIY/</link>
		<comments>http://nevermore.pri.ee/adobe-flex/#comments</comments>
		<pubDate>Mon, 04 May 2009 08:23:54 +0000</pubDate>
		<dc:creator>German Rumm</dc:creator>
				<category><![CDATA[flash]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[learning]]></category>

		<guid isPermaLink="false">http://nevermore.pri.ee/?p=139</guid>
		<description><![CDATA[Started to learn Adobe Flex. Enjoying it very much.

Installed Adobe Flex Builder Linux Alpha on top of Eclipse 3.4 &#8211; mxml editor doesn&#8217;t work. Gives me &#8220;Could not open the editor: Assertion failed&#8221; error.

It seems that current version of Flex Builder Linux requires Eclipse 3.3 (which is available for download here)

Downloading Eclipse 3.3 right now, [...]]]></description>
			<content:encoded><![CDATA[<p>Started to learn Adobe Flex. Enjoying it very much.</p>

<p>Installed <a href="http://labs.adobe.com/downloads/flexbuilder_linux.html" onclick="pageTracker._trackPageview('/outgoing/labs.adobe.com/downloads/flexbuilder_linux.html?referer=');">Adobe Flex Builder Linux Alpha</a> on top of Eclipse 3.4 &#8211; mxml editor doesn&#8217;t work. Gives me &#8220;<em>Could not open the editor: Assertion failed</em>&#8221; error.</p>

<p>It seems that current version of Flex Builder Linux <strong>requires Eclipse 3.3</strong> (which is available for download <a href="http://archive.eclipse.org/eclipse/downloads/drops/R-3.3.2-200802211800/index.php" onclick="pageTracker._trackPageview('/outgoing/archive.eclipse.org/eclipse/downloads/drops/R-3.3.2-200802211800/index.php?referer=');">here</a>)</p>

<p>Downloading Eclipse 3.3 right now, hope everything will work.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/nev3rm0re?a=0xIk4xYsmIY:6tceGe1nkIk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/nev3rm0re?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://nevermore.pri.ee/adobe-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://nevermore.pri.ee/adobe-flex/</feedburner:origLink></item>
		<item>
		<title>Speed up symfony’s apps</title>
		<link>http://feedproxy.google.com/~r/nev3rm0re/~3/hSmFor2SO6A/</link>
		<comments>http://nevermore.pri.ee/speed-up-symfonys-apps/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 08:56:24 +0000</pubDate>
		<dc:creator>German Rumm</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://nevermore.pri.ee/?p=129</guid>
		<description><![CDATA[Kris Wallsmith submitted a patch to symfony, that supposed to increase the speed of your apps, especially if you are using cache.

Currently it&#8217;s only available from SVN (or as a patch)

Hope Fabian will release 1.2.6 soon, my server&#8217;s admin doesn&#8217;t like to install unstable libs.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.symfony-project.org/blog/2009/04/02/your-apps-are-faster" onclick="pageTracker._trackPageview('/outgoing/www.symfony-project.org/blog/2009/04/02/your-apps-are-faster?referer=');">Kris Wallsmith submitted a patch to symfony</a>, that supposed to increase the speed of your apps, especially if you are using cache.</p>

<p>Currently it&#8217;s only available from SVN (or as a <a href="http://trac.symfony-project.org/changeset/16905/branches/1.2" onclick="pageTracker._trackPageview('/outgoing/trac.symfony-project.org/changeset/16905/branches/1.2?referer=');">patch</a>)</p>

<p>Hope Fabian will release 1.2.6 soon, my server&#8217;s admin doesn&#8217;t like to install unstable libs.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/nev3rm0re?a=hSmFor2SO6A:9lkrf0OefAs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/nev3rm0re?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://nevermore.pri.ee/speed-up-symfonys-apps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://nevermore.pri.ee/speed-up-symfonys-apps/</feedburner:origLink></item>
	</channel>
</rss>
