<?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>My Science Is Better</title>
	<atom:link href="http://www.myscienceisbetter.info/feed" rel="self" type="application/rss+xml" />
	<link>http://www.myscienceisbetter.info</link>
	<description></description>
	<lastBuildDate>Wed, 18 Apr 2012 20:18:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Netbeans 7.1 integration in Unity</title>
		<link>http://www.myscienceisbetter.info/netbeans-7-1-integration-in-unity.html</link>
		<comments>http://www.myscienceisbetter.info/netbeans-7-1-integration-in-unity.html#comments</comments>
		<pubDate>Wed, 18 Apr 2012 20:18:20 +0000</pubDate>
		<dc:creator>Romeo Adrian Cioaba</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.myscienceisbetter.info/?p=308</guid>
		<description><![CDATA[Go to Tools -> Plugins -> Settings -> Add Name: Java Ayanata URL: http://java-swing-ayatana.googlecode.com/files/netbeans-catalog.xml then install the plugin more details: http://danjared.wordpress.com/netbeans/]]></description>
			<content:encoded><![CDATA[<p>Go to Tools -> Plugins -> Settings -> Add</p>
<p>Name: Java Ayanata<br />
URL: http://java-swing-ayatana.googlecode.com/files/netbeans-catalog.xml</p>
<p>then install the plugin</p>
<p>more details: http://danjared.wordpress.com/netbeans/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.myscienceisbetter.info/netbeans-7-1-integration-in-unity.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create PDF from multiple image files on Linux</title>
		<link>http://www.myscienceisbetter.info/create-pdf-from-multiple-image-files-on-linux.html</link>
		<comments>http://www.myscienceisbetter.info/create-pdf-from-multiple-image-files-on-linux.html#comments</comments>
		<pubDate>Tue, 20 Mar 2012 09:09:58 +0000</pubDate>
		<dc:creator>Romeo Adrian Cioaba</dc:creator>
				<category><![CDATA[ImageMagick]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[cli]]></category>

		<guid isPermaLink="false">http://www.myscienceisbetter.info/?p=305</guid>
		<description><![CDATA[I had a bunch of image files A01.jpg, A02.jpg and so forth that i needed created into a PDF. ImageMagick to the rescue:]]></description>
			<content:encoded><![CDATA[<p>I had a bunch of image files A01.jpg, A02.jpg and so forth that i needed created into a PDF. ImageMagick to the rescue:</p>
<pre class="brush: bash; title: ; notranslate">
cd /path/to/jpgs
convert -define pdf:use-trimbox=true *.jpg batbox.pdf
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.myscienceisbetter.info/create-pdf-from-multiple-image-files-on-linux.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sublime text 2 Unity Launcher</title>
		<link>http://www.myscienceisbetter.info/sublime-text-2-unity-launcher.html</link>
		<comments>http://www.myscienceisbetter.info/sublime-text-2-unity-launcher.html#comments</comments>
		<pubDate>Mon, 20 Feb 2012 18:01:11 +0000</pubDate>
		<dc:creator>Romeo Adrian Cioaba</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[sublime text 2]]></category>

		<guid isPermaLink="false">http://www.myscienceisbetter.info/?p=298</guid>
		<description><![CDATA[I've looked into Sublime text 2 today, mostly unhappy with the speed Java based IDEs have on linux 64bit. When launching it, although I chose "keep in launcher", the icon does not stay there, so i created a custom launcher. Create a file sublime2.desktop and save it in ~/.local/share/applications. The file should look like this: [...]]]></description>
			<content:encoded><![CDATA[<p>I've looked into Sublime text 2 today, mostly unhappy with the speed Java based IDEs have on linux 64bit. When launching it, although I chose "keep in launcher", the icon does not stay there, so i created a custom launcher.</p>
<p>Create a file sublime2.desktop and save it in ~/.local/share/applications. The file should look like this:</p>
<pre class="brush: bash; title: ; notranslate">
#!/usr/bin/env xdg-open

[Desktop Entry]
Name=Sublime Text Editor
Comment=Sublime Text Editor
Exec=&quot;/usr/bin/sublime&quot; %F
MimeType=text/plain;
Terminal=false
Type=Application
Icon=/home/mimir/sublime.png
Categories=GNOME;GTK;Utility;TextEditor;Development;Utility;
</pre>
<p>You can find the link to the icon here: http://d2o0t5hpnwv4c1.cloudfront.net/1038_sublime/sublime.png</p>
<p>Make sure to change the Exec path, to where you have installed Sublime2. I've installed in /opt but i've symlinked in /usr/bin</p>
]]></content:encoded>
			<wfw:commentRss>http://www.myscienceisbetter.info/sublime-text-2-unity-launcher.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl recursive replace in files</title>
		<link>http://www.myscienceisbetter.info/perl-recursive-replace-in-files.html</link>
		<comments>http://www.myscienceisbetter.info/perl-recursive-replace-in-files.html#comments</comments>
		<pubDate>Wed, 15 Feb 2012 23:27:21 +0000</pubDate>
		<dc:creator>Romeo Adrian Cioaba</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.myscienceisbetter.info/?p=295</guid>
		<description><![CDATA[While working on a ZF application, i had some models under the wrong namespace, and changing all the files from Default namespace to Application would have taken me ages. After a bit of google-ing i've found this great perl onliner:]]></description>
			<content:encoded><![CDATA[<p>While working on a ZF application, i had some models under the wrong namespace, and changing all the files from Default namespace to Application would have taken me ages. After a bit of google-ing i've found this great perl onliner:</p>
<pre class="brush: bash; title: ; notranslate">
perl -p -i -e 's/Default_/Application_/g' `find ./ -name '*.php'`
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.myscienceisbetter.info/perl-recursive-replace-in-files.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Install synergy client on Lion</title>
		<link>http://www.myscienceisbetter.info/install-synergy-clien-on-lion.html</link>
		<comments>http://www.myscienceisbetter.info/install-synergy-clien-on-lion.html#comments</comments>
		<pubDate>Fri, 10 Feb 2012 17:55:22 +0000</pubDate>
		<dc:creator>Romeo Adrian Cioaba</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.myscienceisbetter.info/?p=293</guid>
		<description><![CDATA[I do most of my work on my Ubuntu laptop but i also have one mac mini next to it so i can debug websites in Safari or iPhone/iPad. In Snow Leopard i had setup synergy server on the laptop and the client on my mac, and i could easily use laptop's mouse and keyboard [...]]]></description>
			<content:encoded><![CDATA[<p>I do most of my work on my Ubuntu laptop but i also have one mac mini next to it so i can debug websites in Safari or iPhone/iPad. In Snow Leopard i had setup synergy server on the laptop and the client on my mac, and i could easily use laptop's mouse and keyboard to control both machines. Here is how you can setup this:</p>
<p><strong>On Ubuntu machine (server):</strong></p>
<pre class="brush: bash; title: ; notranslate">
# install synergy 1.3.6 (other versions seem to have all sort of bugs)
# if 1.3.6 is not in repo anymore, check the download page: http://synergy-foss.org/download/
sudo apt-get install synergy
</pre>
<p>Now create the server config file (you might need to adapt this according to your setup</p>
<pre class="brush: bash; title: ; notranslate">

section: screens
	orion:
	io.local:
		ctrl = super
		alt = alt
		super = ctrl
end
section: options
        mousebutton(7) = keystroke(control+right)
	mousebutton(6) = keystroke(control+left)

end
section: links
       orion:
           left = io.local
       io.local:
           right = orion
</pre>
<p>Add this line to startup:</p>
<pre class="brush: bash; title: ; notranslate">
/usr/bin/synergys --config /home/&lt;your_user_here&gt;/synergy.conf -f
</pre>
<p><strong>On Mac mini (client):</strong><br />
First of all, you'll need to install brew, if you haven't already (http://mxcl.github.com/homebrew/). For that check the installation at: https://github.com/mxcl/homebrew/wiki/installation</p>
<p>After you have brew installed open a terminal and install synergy:</p>
<pre class="brush: bash; title: ; notranslate">brew install synergy</pre>
<p>Now create a .profile file in your home directory and add:</p>
<pre class="brush: bash; title: ; notranslate">
if [ &quot;$(pidof synergyc)&quot; ]
then
    echo &quot;Synergy is already started&quot;;
else
    /usr/local/bin/synergyc &lt;your_server_ip&gt;
fi
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.myscienceisbetter.info/install-synergy-clien-on-lion.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First and last day of the month in PHP</title>
		<link>http://www.myscienceisbetter.info/first-and-last-day-of-the-month-in-php.html</link>
		<comments>http://www.myscienceisbetter.info/first-and-last-day-of-the-month-in-php.html#comments</comments>
		<pubDate>Sun, 18 Dec 2011 22:25:40 +0000</pubDate>
		<dc:creator>Romeo Adrian Cioaba</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.myscienceisbetter.info/?p=289</guid>
		<description><![CDATA[I've been working with dates today and i've found a pretty neat snippet to show the first and the last day of the month using php]]></description>
			<content:encoded><![CDATA[<p>I've been working with dates today and i've found a pretty neat snippet to show the <a href="http://www.myscienceisbetter.info/first-and-last-day-of-the-month-in-php.html">first and the last day of the month using php</a></p>
<pre class="brush: php; title: ; notranslate">
		$firstDoM = date(&quot;Y-m-01&quot;); //01 -&gt; first day of month
		$lastDoM = date(&quot;Y-m-t&quot;); //t -&gt; last day of month
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.myscienceisbetter.info/first-and-last-day-of-the-month-in-php.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Force IE to use the latest engine</title>
		<link>http://www.myscienceisbetter.info/force-ie-to-use-the-latest-engine.html</link>
		<comments>http://www.myscienceisbetter.info/force-ie-to-use-the-latest-engine.html#comments</comments>
		<pubDate>Thu, 08 Dec 2011 21:37:36 +0000</pubDate>
		<dc:creator>Romeo Adrian Cioaba</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ie]]></category>

		<guid isPermaLink="false">http://www.myscienceisbetter.info/?p=287</guid>
		<description><![CDATA[If by some unknown reason IE8/9/10 are rendering your site in compatibility mode, ie IE7 mode or something lame like that, just force it to use the latest engine available: note that the code added right before the doctype declaration. the using_ie() boolean function below (credits to Simeon for this solution: http://www.php.net/manual/en/function.get-browser.php#101314)]]></description>
			<content:encoded><![CDATA[<p>If by some unknown reason IE8/9/10 are rendering your site in compatibility mode, ie IE7 mode or something lame like that, just force it to use the latest engine available:</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php if (using_ie()) {header(&quot;X-UA-Compatible: IE=Edge&quot;); ?&gt;&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=Edge&quot;/&gt;&lt;?php } ?&gt;&lt;!DOCTYPE html&gt;
</pre>
<p>note that the code added right before the doctype declaration. the using_ie() boolean function below (credits to Simeon for this solution: http://www.php.net/manual/en/function.get-browser.php#101314)</p>
<pre class="brush: php; title: ; notranslate">
function using_ie()
{
    $u_agent = $_SERVER['HTTP_USER_AGENT'];
    $ub = False;
    if(preg_match('/MSIE/i',$u_agent))
    {
        $ub = True;
    } 

    return $ub;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.myscienceisbetter.info/force-ie-to-use-the-latest-engine.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magento get all products</title>
		<link>http://www.myscienceisbetter.info/magento-get-all-products.html</link>
		<comments>http://www.myscienceisbetter.info/magento-get-all-products.html#comments</comments>
		<pubDate>Tue, 15 Nov 2011 06:00:40 +0000</pubDate>
		<dc:creator>Romeo Adrian Cioaba</dc:creator>
				<category><![CDATA[magento]]></category>

		<guid isPermaLink="false">http://www.myscienceisbetter.info/?p=284</guid>
		<description><![CDATA[Here is an easy way to return all the products from a magento store.]]></description>
			<content:encoded><![CDATA[<p>Here is an easy way to return all the products from a magento store.</p>
<pre class="brush: php; title: ; notranslate">
$collection = Mage::getModel('catalog/product')
                        -&gt;getCollection()
                        -&gt;addAttributeToSelect('*');

foreach ($collection as $product) {
    echo $product-&gt;getName() . &quot;&lt;br /&gt;&quot;;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.myscienceisbetter.info/magento-get-all-products.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTTP response headers in Zend Framework</title>
		<link>http://www.myscienceisbetter.info/http-response-headers-in-zend-framework.html</link>
		<comments>http://www.myscienceisbetter.info/http-response-headers-in-zend-framework.html#comments</comments>
		<pubDate>Thu, 13 Oct 2011 22:17:58 +0000</pubDate>
		<dc:creator>Romeo Adrian Cioaba</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[zend framework]]></category>
		<category><![CDATA[response headers]]></category>

		<guid isPermaLink="false">http://www.myscienceisbetter.info/?p=279</guid>
		<description><![CDATA[I needed to display a Zend Framework generated PDF using the browser plugins and after a bit of looking around it turns out that some headers need to be set in order to achieve that. If you'd want to automatically download the PDF instead of displaying it using the browser plugins, you need to change [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to display a Zend Framework generated PDF using the browser plugins and after a bit of looking around it turns out that some headers need to be set in order to achieve that.</p>
<pre class="brush: php; title: ; notranslate">
$this-&gt;getResponse()
     -&gt;setHeader('Content-Disposition', 'inline; filename=invoice.pdf')
     -&gt;setHeader('Content-type', 'application/x-pdf');
</pre>
<p>If you'd want to automatically download the PDF instead of displaying it using the browser plugins, you need to change the 'Content-Disposition' as follows:</p>
<pre class="brush: php; title: ; notranslate">
$this-&gt;getResponse()
     -&gt;setHeader('Content-Disposition', 'attachment; filename=invoice.pdf')
     -&gt;setHeader('Content-type', 'application/x-pdf');
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.myscienceisbetter.info/http-response-headers-in-zend-framework.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Switch layouts in Zend Framework</title>
		<link>http://www.myscienceisbetter.info/switch-layouts-in-zend-framework.html</link>
		<comments>http://www.myscienceisbetter.info/switch-layouts-in-zend-framework.html#comments</comments>
		<pubDate>Thu, 13 Oct 2011 15:28:59 +0000</pubDate>
		<dc:creator>Romeo Adrian Cioaba</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[snippets]]></category>
		<category><![CDATA[zend framework]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[zend_layout]]></category>

		<guid isPermaLink="false">http://www.myscienceisbetter.info/?p=274</guid>
		<description><![CDATA[If you have a larger Zend Framework application, you probably want to you use a layout for more of your pages. For instance you'd need at least two layouts: one for a backend and another one for frontend. In order to tell ZF to use layouts, you'll need to set the layout paths in your [...]]]></description>
			<content:encoded><![CDATA[<p>If you have a larger Zend Framework application, you probably want to you use a layout for more of your pages. For instance you'd need at least two layouts: one for a backend and another one for frontend. In order to tell ZF to use layouts, you'll need to set the layout paths in your application.ini </p>
<p>In order to store the layouts in /application/layouts/scripts, add the following to /application/configs/application.ini</p>
<pre class="brush: bash; title: ; notranslate">
resources.layout.layoutpath = APPLICATION_PATH &quot;/layouts/scripts&quot;
</pre>
<p>You can now create several layouts, something around this model:</p>
<pre class="brush: php; title: ; notranslate">
&lt;!DOCTYPE html
    PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;
    &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
    &lt;?php echo $this-&gt;headTitle() ?&gt;
    &lt;?php echo $this-&gt;headScript() ?&gt;
    &lt;?php echo $this-&gt;headStyle() ?&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;?php echo $this-&gt;render('header.phtml') ?&gt;

    &lt;div id=&quot;content&quot;&gt;&lt;?php echo $this-&gt;layout()-&gt;content ?&gt;&lt;/div&gt;

    &lt;?php echo $this-&gt;render('footer.phtml') ?&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>By default, your application will use the layout in /application/layouts/scripts/layout.phtml, but if you want some pages to be rendered using another layout you can tell ZF to do so like this:</p>
<pre class="brush: php; title: ; notranslate">
// Within controller
// note that the file that's going to be rendered is /application/layouts/scripts/backend.phtml
$this-&gt;_helper-&gt;_layout-&gt;setLayout('backend')

//Within view script
$this-&gt;layout()-&gt;setLayout('other-layout'); ?&gt;
</pre>
<p>More info on using Zend_Layout: <a href="http://framework.zend.com/manual/en/zend.layout.quickstart.html">http://framework.zend.com/manual/en/zend.layout.quickstart.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.myscienceisbetter.info/switch-layouts-in-zend-framework.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

