<?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>pk stuff</title>
	<atom:link href="http://blog.krnjevic.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.krnjevic.com</link>
	<description>I&#039;ll be right there ...</description>
	<lastBuildDate>Thu, 17 Jan 2013 06:02:35 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Raspberry Pi &amp; Cubieboard Benchmarks</title>
		<link>http://blog.krnjevic.com/?p=405</link>
		<comments>http://blog.krnjevic.com/?p=405#comments</comments>
		<pubDate>Thu, 17 Jan 2013 06:01:18 +0000</pubDate>
		<dc:creator>peterk</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[cubieboard]]></category>
		<category><![CDATA[pi]]></category>
		<category><![CDATA[raspberry]]></category>
		<category><![CDATA[raspbian]]></category>

		<guid isPermaLink="false">http://blog.krnjevic.com/?p=405</guid>
		<description><![CDATA[O/S Test Raspberry Pi Cubieboard android (busybox to nvram) 4.8 M/B/s berryboot (raspbian squashfs) 4G(c4) 200M 16 +/- .5MB/s 7.8 +/- .1 MB/s 1G 11 +/- .5MB/s 8.3 +/- 1 MB/s 200M to SATA HD 63 +/- 2MB/s 1G to SATA HDD 45 +/- 2MB/s 13,727 files (/usr) from SD -> HDD (ext4) 9.2 sec [...]]]></description>
				<content:encoded><![CDATA[<table>
<thead></thead>
<tr></tr>
<tr></tr>
<tr>
<td>
<h5>O/S</h5>
</td>
<td>
<h5>Test</h5>
</td>
<td>
<h5>Raspberry Pi</h5>
</td>
<td>
<h5>Cubieboard</h5>
</td>
</tr>
<tr>
<td>
<h6>android (busybox to nvram)</h6>
</td>
<td></td>
<td></td>
<td>4.8 M/B/s</td>
</tr>
<tr>
<td>
<h6>berryboot (raspbian squashfs) 4G(c4)</h6>
</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>200M</td>
<td>16 +/- .5MB/s</td>
<td>7.8 +/- .1 MB/s</td>
</tr>
<tr>
<td></td>
<td>1G</td>
<td>11 +/- .5MB/s</td>
<td>8.3 +/- 1 MB/s</td>
</tr>
<tr>
<td></td>
<td>200M to SATA HD</td>
<td></td>
<td>63 +/- 2MB/s</td>
</tr>
<tr>
<td></td>
<td>1G to SATA HDD</td>
<td></td>
<td>45 +/- 2MB/s</td>
</tr>
<tr>
<td></td>
<td>13,727 files (/usr) from SD -> HDD (ext4)</td>
<td></td>
<td>9.2 sec</td>
</tr>
<tr>
<td></td>
<td>13,727 files (/usr) from HDD -> SD</td>
<td></td>
<td>38 sec</td>
</tr>
<tr>
<td>
<h6>debian (drazbian) 16G(c10)</h6>
</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>200M</td>
<td>22 +/- 2 MB/s</td>
<td></td>
</tr>
<tr>
<td></td>
<td>1G</td>
<td>7.6 +/- .5 MB/s</td>
<td></td>
</tr>
<tfoot>
        Simple write test: dd bs=1M count=1000 if=/dev/zero of=test<br />
        Ignore first run results<br />
        Copy of 13,000+ files: cp -a /var/* &#8230;<br />
    </tfoot>
</table>
]]></content:encoded>
			<wfw:commentRss>http://blog.krnjevic.com/?feed=rss2&#038;p=405</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make squashfs Disk Image</title>
		<link>http://blog.krnjevic.com/?p=400</link>
		<comments>http://blog.krnjevic.com/?p=400#comments</comments>
		<pubDate>Thu, 17 Jan 2013 05:07:31 +0000</pubDate>
		<dc:creator>peterk</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[berryboot]]></category>
		<category><![CDATA[cubie]]></category>
		<category><![CDATA[cubieboard]]></category>
		<category><![CDATA[embedded]]></category>
		<category><![CDATA[pi]]></category>
		<category><![CDATA[raspberry]]></category>
		<category><![CDATA[raspbian]]></category>
		<category><![CDATA[SD]]></category>
		<category><![CDATA[squashfs]]></category>

		<guid isPermaLink="false">http://blog.krnjevic.com/?p=400</guid>
		<description><![CDATA[Raspberry Pi (and Cubieboard) SD disk images typically have two (or three) partitions: the first is Fat32 (50-100MB) and includes the boot files, while the second (&#62;1GB) contains the main Linux image. With compression, the combined image can be reduced from several GB (of mostly empty space) to a couple hundred MB. With a regular [...]]]></description>
				<content:encoded><![CDATA[<p>Raspberry Pi (and Cubieboard) SD disk images typically have two (or three) partitions: the first is Fat32 (50-100MB) and includes the boot files, while the second (&gt;1GB) contains the main Linux image. With compression, the combined image can be reduced from several GB (of mostly empty space) to a couple hundred MB.</p>
<p>With a regular Linux desktop computer that has <b>kpartx</b> and <b>mksquashfs</b> installed, you can convert the second partition to SquashFS like this:</p>
<blockquote><p>$ sudo kpartx -av image_you_want_to_convert.img<br />
add map loop0p1 (252:5): 0 117187 linear /dev/loop0 1<br />
add map loop0p2 (252:6): 0 3493888 linear /dev/loop0 118784<br />
$ sudo mount /dev/mapper/loop0p2 /mnt<br />
$ sudo mksquashfs /mnt converted_image.img -comp lzo -e lib/modules<br />
$ sudo umount /mnt<br />
$ sudo kpartx -d image_you_want_to_convert.img</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.krnjevic.com/?feed=rss2&#038;p=400</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dd with gzip</title>
		<link>http://blog.krnjevic.com/?p=397</link>
		<comments>http://blog.krnjevic.com/?p=397#comments</comments>
		<pubDate>Thu, 17 Jan 2013 04:58:39 +0000</pubDate>
		<dc:creator>peterk</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[compress]]></category>
		<category><![CDATA[dd]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[img]]></category>
		<category><![CDATA[restore]]></category>

		<guid isPermaLink="false">http://blog.krnjevic.com/?p=397</guid>
		<description><![CDATA[You can save a lot of space by compressing dd image files. These examples use gzip but many other compression apps will work just as well. backup with dd and gzip dd if=/dev/wd0a &#124; gzip -9 &#62; /mnt/backup.gz restore backup gunzip /mnt/backup.gz &#8211; &#124; dd of=/dev/wd0a]]></description>
				<content:encoded><![CDATA[<p>You can save a lot of space by compressing dd image files.<br />
These examples use gzip but many other compression apps will work just as well.</p>
<h4>backup with dd and gzip</h4>
<blockquote><p>dd if=/dev/wd0a | gzip -9 &gt; /mnt/backup.gz</p></blockquote>
<h4>restore backup</h4>
<blockquote><p>gunzip /mnt/backup.gz &#8211; | dd of=/dev/wd0a</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.krnjevic.com/?feed=rss2&#038;p=397</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XCode and Older iOS Devices</title>
		<link>http://blog.krnjevic.com/?p=394</link>
		<comments>http://blog.krnjevic.com/?p=394#comments</comments>
		<pubDate>Thu, 17 Jan 2013 04:50:51 +0000</pubDate>
		<dc:creator>peterk</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[arm6]]></category>
		<category><![CDATA[arm7]]></category>
		<category><![CDATA[device]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[old]]></category>
		<category><![CDATA[older]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://blog.krnjevic.com/?p=394</guid>
		<description><![CDATA[With a bit of hacking, it&#8217;s possible to target older iOS devices than those normally supported by the latest SDK: http://stackoverflow.com/questions/7760946/is-it-possible-to-target-older-ios-versions-when-using-xcode-4-2-and-ios-5-sdk]]></description>
				<content:encoded><![CDATA[<p>With a bit of hacking, it&#8217;s possible to target older iOS devices than those normally supported by the latest SDK:</p>
<p><a href="http://stackoverflow.com/questions/7760946/is-it-possible-to-target-older-ios-versions-when-using-xcode-4-2-and-ios-5-sdk">http://stackoverflow.com/questions/7760946/is-it-possible-to-target-older-ios-versions-when-using-xcode-4-2-and-ios-5-sdk</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.krnjevic.com/?feed=rss2&#038;p=394</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SourceTree from Command Line</title>
		<link>http://blog.krnjevic.com/?p=391</link>
		<comments>http://blog.krnjevic.com/?p=391#comments</comments>
		<pubDate>Thu, 17 Jan 2013 04:44:56 +0000</pubDate>
		<dc:creator>peterk</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[sourcetree]]></category>
		<category><![CDATA[tree]]></category>

		<guid isPermaLink="false">http://blog.krnjevic.com/?p=391</guid>
		<description><![CDATA[Download SourceTree command line tools from: https://downloads.sourcetreeapp.com/SourceTreeAppStoreCmdLineToolInstaller.pkg To open repo in current folder: stree .]]></description>
				<content:encoded><![CDATA[<p>Download SourceTree command line tools from:</p>
<p><a href="https://downloads.sourcetreeapp.com/SourceTreeAppStoreCmdLineToolInstaller.pkg">https://downloads.sourcetreeapp.com/SourceTreeAppStoreCmdLineToolInstaller.pkg</a></p>
<p>To open repo in current folder:</p>
<blockquote><p>stree .</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.krnjevic.com/?feed=rss2&#038;p=391</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Github Fork</title>
		<link>http://blog.krnjevic.com/?p=388</link>
		<comments>http://blog.krnjevic.com/?p=388#comments</comments>
		<pubDate>Thu, 17 Jan 2013 04:42:31 +0000</pubDate>
		<dc:creator>peterk</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[cvs]]></category>
		<category><![CDATA[fork]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[vcs]]></category>

		<guid isPermaLink="false">http://blog.krnjevic.com/?p=388</guid>
		<description><![CDATA[https://help.github.com/articles/fork-a-repo Configure remotes To keep track of the original repo, you need to add another remote named upstream: cd Spoon-Knife git remote add upstream https://github.com/octocat/Spoon-Knife.git # Assigns the original repo to a remote called &#8220;upstream&#8221; Pull in upstream changes If the original repo you forked your project from gets updated, you can add those updates to [...]]]></description>
				<content:encoded><![CDATA[<p><a href="https://help.github.com/articles/fork-a-repo">https://help.github.com/articles/fork-a-repo</a></p>
<h4>Configure remotes</h4>
<p>To keep track of the original repo, you need to add another remote named upstream:</p>
<blockquote><p>cd Spoon-Knife<br />
git remote add upstream https://github.com/octocat/Spoon-Knife.git # Assigns the original repo to a remote called &#8220;upstream&#8221;</p></blockquote>
<h4>Pull in upstream changes</h4>
<p>If the original repo you forked your project from gets updated, you can add those updates to your fork by running the following code:</p>
<blockquote><p>git fetch upstream                     # Fetches any new changes from the original repo<br />
git merge upstream/master    # Merges any changes fetched into your working files</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.krnjevic.com/?feed=rss2&#038;p=388</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>git Submodule</title>
		<link>http://blog.krnjevic.com/?p=384</link>
		<comments>http://blog.krnjevic.com/?p=384#comments</comments>
		<pubDate>Thu, 17 Jan 2013 04:36:43 +0000</pubDate>
		<dc:creator>peterk</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[submodule]]></category>

		<guid isPermaLink="false">http://blog.krnjevic.com/?p=384</guid>
		<description><![CDATA[replace submodule repo You should just be able to edit the .gitmodules file to update the URL and then run git submodule sync to reflect that change to the superproject and your working copy. recursive submodule init and update git submodule update &#8211;init &#8211;recursive update only git submodule update &#8211;recursive recursive add submodule git submodule [...]]]></description>
				<content:encoded><![CDATA[<h4>replace submodule repo</h4>
<p>You should just be able to edit the .gitmodules file to update the URL and then run git submodule sync to reflect that change to the superproject and your working copy.</p>
<h4>recursive submodule init and update</h4>
<blockquote><p>git submodule update &#8211;init &#8211;recursive</p></blockquote>
<h4>update only</h4>
<blockquote><p>git submodule update &#8211;recursive</p></blockquote>
<h4>recursive add submodule</h4>
<blockquote><p>git submodule add foo<br />
git submodule update &#8211;init &#8211;recursive</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.krnjevic.com/?feed=rss2&#038;p=384</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mysterious MiniDLNA Ports</title>
		<link>http://blog.krnjevic.com/?p=382</link>
		<comments>http://blog.krnjevic.com/?p=382#comments</comments>
		<pubDate>Thu, 17 Jan 2013 04:29:36 +0000</pubDate>
		<dc:creator>peterk</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[dlna]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[minidlna]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://blog.krnjevic.com/?p=382</guid>
		<description><![CDATA[MiniDLNA &#8211; Ports ssdp (1900/udp) and trivnet1 (8200/tcp) are proper of this service. The other port (37167/udp) varies in every execution.]]></description>
				<content:encoded><![CDATA[<p>MiniDLNA &#8211; Ports ssdp (1900/udp) and trivnet1 (8200/tcp) are proper of this service.<br />
The other port (37167/udp) varies in every execution.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.krnjevic.com/?feed=rss2&#038;p=382</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>/private/var/vm Disk Usage on OS X</title>
		<link>http://blog.krnjevic.com/?p=378</link>
		<comments>http://blog.krnjevic.com/?p=378#comments</comments>
		<pubDate>Thu, 17 Jan 2013 04:27:41 +0000</pubDate>
		<dc:creator>peterk</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[cleanup]]></category>
		<category><![CDATA[disk]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[vm]]></category>

		<guid isPermaLink="false">http://blog.krnjevic.com/?p=378</guid>
		<description><![CDATA[It seems this is filled with multiple (roughly) 1GB swap files, allocated as required. Problem is they don&#8217;t go away (until reboot?). One article suggested this: sudo dynamic_pager -L 1073741824 Seemed to work: before running vm used 8GB, afterwards 4GB]]></description>
				<content:encoded><![CDATA[<p>It seems this is filled with multiple (roughly) 1GB swap files, allocated as required.<br />
Problem is they don&#8217;t go away (until reboot?).<br />
One article suggested this:</p>
<blockquote><p>sudo dynamic_pager -L 1073741824</p></blockquote>
<p>Seemed to work: before running vm used 8GB, afterwards 4GB</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.krnjevic.com/?feed=rss2&#038;p=378</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nginx with PHP on CentOS 6</title>
		<link>http://blog.krnjevic.com/?p=365</link>
		<comments>http://blog.krnjevic.com/?p=365#comments</comments>
		<pubDate>Thu, 17 Jan 2013 04:23:45 +0000</pubDate>
		<dc:creator>peterk</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.krnjevic.com/?p=365</guid>
		<description><![CDATA[from Black-Pixel.net: If you haven’t already done it, you have to set up the EPEL repository. For 32bit: rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm For 64bit: rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm Next install Nginx and spawn-fcgi, I assume you have already installed PHP and all the modules you need. yum install nginx spawn-fcgi Now it’s time for the spawn-fcgi configuration. [...]]]></description>
				<content:encoded><![CDATA[<p>from <a href="http://black-pixel.net/nginx-with-php-on-centos-6.html" title="Black-Pixel.net" target="_blank">Black-Pixel.net</a>:</p>
<p>If you haven’t already done it, you have to set up the EPEL repository.</p>
<p>For 32bit:</p>
<blockquote><p>rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm</p></blockquote>
<p>For 64bit:</p>
<blockquote><p>rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm</p></blockquote>
<p>Next install Nginx and spawn-fcgi, I assume you have already installed PHP and all the modules you need.</p>
<blockquote><p>yum install nginx spawn-fcgi</p></blockquote>
<p>Now it’s time for the spawn-fcgi configuration. The config should be at /etc/sysconfig/spawn-fcgi.</p>
<blockquote><p>vim /etc/sysconfig/spawn-fcgi</p></blockquote>
<blockquote><p># You must set some working options before the &#8220;spawn-fcgi&#8221; service will work.<br />
# If SOCKET points to a file, then this file is cleaned up by the init script.<br />
#<br />
# See spawn-fcgi(1) for all possible options.<br />
#<br />
# Example :<br />
#SOCKET=/var/run/php-fcgi.sock<br />
OPTIONS=&#8221;-a 127.0.0.1 -p 9000 -u nginx -g nginx -C 32 -F 1 -P /var/run/spawn-fcgi.pid &#8212; /usr/bin/php-cgi&#8221;</p></blockquote>
<p>It’s very important that you remember the port, you’ll have to set the same in the nginx configuration. You should also use the same username and group as nginx.<br />
To play it safe, make sure the following line is not commented in the file /etc/init.d/spawn-fcgi:</p>
<blockquote><p>config=&#8221;/etc/sysconfig/spawn-fcgi&#8221;</p></blockquote>
<p>Now let’s make sure that spawn-fcgi and nginx automatically start after a reboot.</p>
<blockquote><p>chkconfig &#8211;level 2345 nginx on<br />
chkconfig &#8211;level 2345 spawn-fcgi on</p></blockquote>
<p>For more information about chkconfig check this site:<a href="http://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-services-chkconfig.html">http://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-services-chkconfig.html</a></p>
<p>Next up we have to fix a folder permission. The group of the session cookies folder, the address can be found in the php.ini (session.save_path = “/var/lib/php/session”). The folder group has to be changed from apache to whatever you use, e. g. nginx. You should check this after every php update.</p>
<p>As a last step, just add the following line to the /etc/nginx.conf and/or your custom domain configuration in /etc/nginx/conf.d/yourdomain.conf.</p>
<blockquote><p>location ~ \.php$ {<br />
include        fastcgi_params;<br />
fastcgi_pass   localhost:9000;<br />
fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;<br />
}</p></blockquote>
<p>You should also make some additional changes in your configuration.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.krnjevic.com/?feed=rss2&#038;p=365</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
