<?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>Noop.lv. Живу я тут</title>
	<atom:link href="http://www.noop.lv/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.noop.lv</link>
	<description>Маленькая личная помойка</description>
	<lastBuildDate>Fri, 06 Jan 2012 09:15:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Google acc update</title>
		<link>http://www.noop.lv/2012/01/06/google-acc-update/</link>
		<comments>http://www.noop.lv/2012/01/06/google-acc-update/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 09:15:13 +0000</pubDate>
		<dc:creator>melnays</dc:creator>
				<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://www.noop.lv/?p=202</guid>
		<description><![CDATA[From now on, I'm slowly moving to a new google account, andrew.tchircoff@gmail.com. Please update accordingly if you give a damn )]]></description>
			<content:encoded><![CDATA[<p>From now on, I'm slowly moving to a new google account, andrew.tchircoff@gmail.com. Please update accordingly if you give a damn )</p>
]]></content:encoded>
			<wfw:commentRss>http://www.noop.lv/2012/01/06/google-acc-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>phpsh, or yet another php shell from facebook</title>
		<link>http://www.noop.lv/2011/12/20/phpsh-or-yet-another-php-shell-from-facebook/</link>
		<comments>http://www.noop.lv/2011/12/20/phpsh-or-yet-another-php-shell-from-facebook/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 14:49:08 +0000</pubDate>
		<dc:creator>melnays</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[interactive]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://www.noop.lv/?p=196</guid>
		<description><![CDATA[A better interactive php shell is made by facebook, to get it, just do: &#160; git clone git://github.com/facebook/phpsh.git cd phpsh python setup.py build sudo python setup.py install &#160; It's fast, cool and doesn't break when you misprint variable name of &#8230; <a href="http://www.noop.lv/2011/12/20/phpsh-or-yet-another-php-shell-from-facebook/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A better interactive php shell is made by facebook, to get it, just do:</p>
<pre class="bash">&nbsp;
git clone git://github.com/facebook/phpsh.git
<span style="color: #7a0874; font-weight: bold;">cd</span> phpsh
python setup.py build
<span style="color: #c20cb9; font-weight: bold;">sudo</span> python setup.py <span style="color: #c20cb9; font-weight: bold;">install</span>
&nbsp;</pre>
<p>It's fast, cool and doesn't break when you misprint variable name of function:</p>
<p><a href="http://www.noop.lv/wp-content/uploads/2011/12/phpsh.png"><img src="http://www.noop.lv/wp-content/uploads/2011/12/phpsh.png" alt="" title="phpsh" width="1222" height="420" class="alignnone size-full wp-image-198" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.noop.lv/2011/12/20/phpsh-or-yet-another-php-shell-from-facebook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FOSUserBundle &#8211; compatibility break</title>
		<link>http://www.noop.lv/2011/12/20/fosuserbundle-compatibility-break/</link>
		<comments>http://www.noop.lv/2011/12/20/fosuserbundle-compatibility-break/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 13:45:26 +0000</pubDate>
		<dc:creator>melnays</dc:creator>
				<category><![CDATA[symfony]]></category>
		<category><![CDATA[fos]]></category>
		<category><![CDATA[good news everyone]]></category>

		<guid isPermaLink="false">http://www.noop.lv/?p=191</guid>
		<description><![CDATA[Well, four days ago Stof authored a braking-change in FOSUserBundle; after updating vendors, you may encounter errors like "an encoder is not configured for Your\User\Entity" exception. This is basically because "algorithm" field from User entity was wiped out, and moved &#8230; <a href="http://www.noop.lv/2011/12/20/fosuserbundle-compatibility-break/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Well, four days ago Stof authored a braking-change in <a href="https://github.com/FriendsOfSymfony/FOSUserBundle/commit/7f00820488b0853ad3794f1c8735e40363daf899">FOSUserBundle</a>; after updating vendors, you may encounter errors like "an encoder is not configured for Your\User\Entity" exception. This is basically because "algorithm" field from User entity was wiped out, and moved to <a href="https://github.com/FriendsOfSymfony/FOSAdvancedEncoderBundle">FOSAdvancedEncoderBundle</a>.</p>
<p>If you've encountered this, you basically have two options:</p>
<p>1) stick to 1.1.0 branch of FOSUserBundle by modifying your deps:</p>
<pre>
[FOSUserBundle]
    git=git://github.com/FriendsOfSymfony/FOSUserBundle.git
    target=bundles/FOS/UserBundle
    version=1.1.0
</pre>
<p>of course, if you don't want to ever upgrade to symfony 2.1 )</p>
<p>2) upgrade to master FOSUserBundle:</p>
<p>do</p>
<pre>
bin/vendors update
</pre>
<p>update doctrine schema (this will delete "algorithm" column):</p>
<pre>
app/console doctrine:schema:update --force
</pre>
<p>modify "encoders" section in security.yml:</p>
<pre>&nbsp;
  encoders:
    FOS\UserBundle\Model\UserInterface:
      algorithm: sha512
      encode_as_base64: false
      iterations: 1
&nbsp;</pre>
<p>encode_as_base64: false and iterations: 1 will add compatibility with you current encoded passwords from 1.1.0 version of FOSUserBundle.</p>
<p>Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.noop.lv/2011/12/20/fosuserbundle-compatibility-break/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pst&#8230; Zsh now friends with symfony</title>
		<link>http://www.noop.lv/2011/12/20/pst-zsh-now-friends-with-symfony/</link>
		<comments>http://www.noop.lv/2011/12/20/pst-zsh-now-friends-with-symfony/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 11:55:37 +0000</pubDate>
		<dc:creator>melnays</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[symfony]]></category>
		<category><![CDATA[autocomplete]]></category>
		<category><![CDATA[completion]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[oh-my-zsh]]></category>
		<category><![CDATA[zsh]]></category>

		<guid isPermaLink="false">http://www.noop.lv/?p=187</guid>
		<description><![CDATA[Well, thanks to Robby Russel and a little bit of my shellscripting oh-my-zsh project now supports symfony2 completion. Just install oh-my-zsh, edit .zshrc and add symfony2 to plugins list: &#160; plugins=&#40;git github symfony2&#41; &#160; or update omz: &#160; cd ~/.oh-my-zsh &#8230; <a href="http://www.noop.lv/2011/12/20/pst-zsh-now-friends-with-symfony/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Well, thanks to <a href="https://github.com/robbyrussell">Robby Russel</a> and a little bit of my shellscripting <a href="https://github.com/robbyrussell/oh-my-zsh">oh-my-zsh</a> project now supports symfony2 completion. Just install oh-my-zsh, edit .zshrc and add symfony2 to plugins list:</p>
<pre class="bash">&nbsp;
<span style="color: #007800;">plugins=</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>git github symfony2<span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;</pre>
<p>or update omz:</p>
<pre class="bash">&nbsp;
<span style="color: #7a0874; font-weight: bold;">cd</span> ~/.oh-my-<span style="color: #c20cb9; font-weight: bold;">zsh</span>
git pull origin master
&nbsp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.noop.lv/2011/12/20/pst-zsh-now-friends-with-symfony/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ok, I&#8217;m an idiot</title>
		<link>http://www.noop.lv/2011/12/18/ok-im-an-idiot/</link>
		<comments>http://www.noop.lv/2011/12/18/ok-im-an-idiot/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 21:15:16 +0000</pubDate>
		<dc:creator>melnays</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[swap]]></category>
		<category><![CDATA[swapiness]]></category>

		<guid isPermaLink="false">http://www.noop.lv/?p=181</guid>
		<description><![CDATA[Swapiness 100 means 'swap as much as possible', sorry. Correct way to reduce swapping in Ubuntu is vm.swappiness=1 is /etc/sysctl.conf . After edit, do sudo sysctl -p or reboot. Now uptime 7 hours, no swap used. PS: Can't wait for &#8230; <a href="http://www.noop.lv/2011/12/18/ok-im-an-idiot/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Swapiness 100 means 'swap as much as possible', sorry. Correct way to reduce swapping in Ubuntu is </p>
<pre>
vm.swappiness=1
</pre>
<p>is /etc/sysctl.conf . After edit, do sudo sysctl -p or reboot. Now uptime 7 hours, no swap used.</p>
<p>PS: Can't wait for my ssd to arrive <img src='http://www.noop.lv/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.noop.lv/2011/12/18/ok-im-an-idiot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Memcachedb &amp; logs</title>
		<link>http://www.noop.lv/2011/11/26/memcachedb-logs/</link>
		<comments>http://www.noop.lv/2011/11/26/memcachedb-logs/#comments</comments>
		<pubDate>Sat, 26 Nov 2011 18:59:52 +0000</pubDate>
		<dc:creator>melnays</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[logs]]></category>
		<category><![CDATA[memcachedb]]></category>

		<guid isPermaLink="false">http://www.noop.lv/?p=175</guid>
		<description><![CDATA[Well, the memcachedb again ate whole sshd with infinite log.xxxxxxsomething files. After a lot of digging around, found this memcachedb-guide-1.0. It appeared that memcachedb has db_archive command to purge all un-needed logs! Just create a following file somewhere, e.g. /root/memcachedb_rotate_logs: &#8230; <a href="http://www.noop.lv/2011/11/26/memcachedb-logs/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Well, the memcachedb again ate whole sshd with infinite log.xxxxxxsomething files.</p>
<p>After a lot of digging around, found this <a href="http://www.noop.lv/wp-content/uploads/2011/11/memcachedb-guide-1.0.pdf">memcachedb-guide-1.0</a>. It appeared that memcachedb has db_archive command to purge all un-needed logs!</p>
<p>Just create a following file somewhere, e.g. /root/memcachedb_rotate_logs:</p>
<pre>
db_archive
quit
</pre>
<p>and add following to crontab to rotate memcachedb logs hourly:</p>
<pre>
0 * * * * /usr/bin/telnet localhost 21201 < /root/memcachedb_rotate_logs
</pre>
<p>(fix port number if needed).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.noop.lv/2011/11/26/memcachedb-logs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Redmine rack initscript</title>
		<link>http://www.noop.lv/2011/11/26/redmine-rack-initscript/</link>
		<comments>http://www.noop.lv/2011/11/26/redmine-rack-initscript/#comments</comments>
		<pubDate>Sat, 26 Nov 2011 17:55:09 +0000</pubDate>
		<dc:creator>melnays</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[initscipt]]></category>
		<category><![CDATA[redmine]]></category>

		<guid isPermaLink="false">http://www.noop.lv/?p=171</guid>
		<description><![CDATA[Seems like the only normal way to run redmine is with rack &#160; ruby script/server -e production &#160; and this simple initscript: &#160; #!/bin/bash ### BEGIN INIT INFO # Provides: redmine # Required-Start: $local_fs $all # Required-Stop: # Default-Start: 2 &#8230; <a href="http://www.noop.lv/2011/11/26/redmine-rack-initscript/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Seems like the only normal way to run redmine is with rack</p>
<pre>&nbsp;
ruby script/server -e production
&nbsp;</pre>
<p>and this simple initscript:</p>
<pre>&nbsp;
#!/bin/bash
### BEGIN INIT INFO
# Provides:          redmine
# Required-Start:    $local_fs $all
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Redmine issue tracker
### END INIT INFO
&nbsp;
case &quot;$1&quot; in
    start)
      cd /var/www/redmine/
      /usr/bin/ruby script/server -d -e production
    ;;
    stop)
      kill -9 `ps aux | grep &quot;ruby script/server&quot; | awk '{ print $2 }' | head -n 1`
    ;;
esac
&nbsp;</pre>
<p>mograil / passenger sucks beyond understanding</p>
]]></content:encoded>
			<wfw:commentRss>http://www.noop.lv/2011/11/26/redmine-rack-initscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Direct links to controller without global routing rules in sf2</title>
		<link>http://www.noop.lv/2011/11/23/direct-links-to-controller-without-global-routing-rules-in-sf2/</link>
		<comments>http://www.noop.lv/2011/11/23/direct-links-to-controller-without-global-routing-rules-in-sf2/#comments</comments>
		<pubDate>Wed, 23 Nov 2011 14:13:27 +0000</pubDate>
		<dc:creator>melnays</dc:creator>
				<category><![CDATA[symfony]]></category>
		<category><![CDATA[routing]]></category>

		<guid isPermaLink="false">http://www.noop.lv/?p=165</guid>
		<description><![CDATA[I suppose anyone is aware about path() twig function; it takes route name and returns URL. This is cool, but what if you use @Route annotation in Controller and need to link there without modifying routing.yml? Here some magic comes &#8230; <a href="http://www.noop.lv/2011/11/23/direct-links-to-controller-without-global-routing-rules-in-sf2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I suppose anyone is aware about <a href="http://symfony.com/doc/current/book/templating.html#linking-to-pages">path()</a> twig function; it takes route name and returns URL. This is cool, but what if you use @Route annotation in Controller and need to link there <em>without</em> modifying routing.yml?</p>
<p>Here some magic comes in place - symfony internally generates name for each route imported via @Route annotation; the route is constructed in the following way:</p>
<pre>
(bundle name, converted to underscore, without 'bundle' suffix)
+ '_' +
(controller name, without 'controller' suffix, lowercase)
+ '_' +
(full controller method name, lowercase)
</pre>
<p>for example, if you have an Company\Hrm\GuiBundle, and some SimpleAuthController with method authorizeAction, like this:</p>
<pre class="php">&nbsp;
/.../
<span style="color: #000000; font-weight: bold;">class</span> SimpleAuthController <span style="color: #000000; font-weight: bold;">extends</span> Controller
<span style="color: #66cc66;">&#123;</span>
  <span style="color: #808080; font-style: italic;">/**
  * @Route(&quot;/auth&quot;)
  */</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> authorizeAction<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
  <span style="color: #66cc66;">&#123;</span>
     /.../
  <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<p>then</p>
<pre>
{{ path('company_hrm_gui_simpleauth_authorizeaction') }}
</pre>
<p>will return "/auth" link.</p>
<p>PS: And please, use it only for development and testing, this is a hardcode <img src='http://www.noop.lv/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.noop.lv/2011/11/23/direct-links-to-controller-without-global-routing-rules-in-sf2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Setting PHPUnit for symfony projects on Ubuntu</title>
		<link>http://www.noop.lv/2011/11/19/setting-phpunit-for-symfony-projects-on-ubuntu/</link>
		<comments>http://www.noop.lv/2011/11/19/setting-phpunit-for-symfony-projects-on-ubuntu/#comments</comments>
		<pubDate>Sat, 19 Nov 2011 15:41:47 +0000</pubDate>
		<dc:creator>melnays</dc:creator>
				<category><![CDATA[symfony]]></category>
		<category><![CDATA[phpunit]]></category>

		<guid isPermaLink="false">http://www.noop.lv/?p=163</guid>
		<description><![CDATA[Just a copy&#038; paste guide: &#160; #install pear, phpunit sudo apt-get install php-pear phpunit &#160; #upgrade pear - this is necessary sudo pear upgrade PEAR &#160; #install phpunit sudo pear config-set auto_discover 1 sudo pear install pear.phpunit.de/PHPUnit &#160; All done! &#8230; <a href="http://www.noop.lv/2011/11/19/setting-phpunit-for-symfony-projects-on-ubuntu/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Just a copy& paste guide:</p>
<pre class="bash">&nbsp;
<span style="color: #808080; font-style: italic;">#install pear, phpunit</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> apt-get <span style="color: #c20cb9; font-weight: bold;">install</span> php-pear phpunit
&nbsp;
<span style="color: #808080; font-style: italic;">#upgrade pear - this is necessary</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> pear upgrade PEAR
&nbsp;
<span style="color: #808080; font-style: italic;">#install phpunit</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> pear config-<span style="color: #000000; font-weight: bold;">set</span> auto_discover <span style="color: #000000;">1</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> pear <span style="color: #c20cb9; font-weight: bold;">install</span> pear.phpunit.de/PHPUnit
&nbsp;</pre>
<p>All done! Now you can run symfony tests:</p>
<pre class="bash">&nbsp;
<span style="color: #7a0874; font-weight: bold;">cd</span> vendor/symfony
php vendors.php
phpunit -c phpunit.xml.dist tests/
&nbsp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.noop.lv/2011/11/19/setting-phpunit-for-symfony-projects-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP wildcard matching function</title>
		<link>http://www.noop.lv/2011/11/17/php-wildcard-matching-function/</link>
		<comments>http://www.noop.lv/2011/11/17/php-wildcard-matching-function/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 15:12:40 +0000</pubDate>
		<dc:creator>melnays</dc:creator>
				<category><![CDATA[opensource projects]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wildcard]]></category>

		<guid isPermaLink="false">http://www.noop.lv/?p=159</guid>
		<description><![CDATA[Just published my PHP wildcard matching function on github - https://github.com/andrewtch/phpwildcard. See doc there and use it like this: &#160; wildcard_match&#40;'foo.*', 'foo.xy'&#41;; //true wildcard_match&#40;'foo.?', 'foo'&#41;; //false &#160; array wildcard matching is supported too: &#160; wildcard_match&#40;'foo.*', array&#40;'boo.bar', 'foo.buz', 'buz.bar'&#41; // array('foo.buz') &#8230; <a href="http://www.noop.lv/2011/11/17/php-wildcard-matching-function/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Just published my PHP wildcard matching function on github - <a href="https://github.com/andrewtch/phpwildcard" title="phpwildcard">https://github.com/andrewtch/phpwildcard</a>.</p>
<p>See doc there and use it like this:</p>
<pre class="php">&nbsp;
wildcard_match<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'foo.*'</span>, <span style="color: #ff0000;">'foo.xy'</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//true</span>
wildcard_match<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'foo.?'</span>, <span style="color: #ff0000;">'foo'</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//false</span>
&nbsp;</pre>
<p>array wildcard matching is supported too:</p>
<pre class="php">&nbsp;
wildcard_match<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'foo.*'</span>, <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'boo.bar'</span>, <span style="color: #ff0000;">'foo.buz'</span>, <span style="color: #ff0000;">'buz.bar'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">// array('foo.buz')</span>
&nbsp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.noop.lv/2011/11/17/php-wildcard-matching-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

