<?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>Arif.my</title>
	<atom:link href="http://arif.my/feed/" rel="self" type="application/rss+xml" />
	<link>http://arif.my</link>
	<description>Application developer from Petaling Jaya</description>
	<lastBuildDate>Fri, 08 Jul 2011 11:49:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Serialize and Unserialize using base64</title>
		<link>http://arif.my/blog/cakephp-serialize-multidimensional-array-safely/</link>
		<comments>http://arif.my/blog/cakephp-serialize-multidimensional-array-safely/#comments</comments>
		<pubDate>Fri, 08 Jul 2011 11:43:53 +0000</pubDate>
		<dc:creator>Mior Mohd Arif</dc:creator>
				<category><![CDATA[Coding World]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://arif.my/?p=129</guid>
		<description><![CDATA[I&#8217;ve encounter error at offset when using unserialize. Notice: unserialize&#40;&#41;: Error at offset 2 of 52 bytes in file.php on line 8881 So here&#8217;s the solution: If you want to bring multi dimensional array to the next function , you have to serialize it and write to cookie . This is how you can do [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve encounter error at offset when using unserialize.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">Notice<span style="color: #339933;">:</span> <span style="color: #990000;">unserialize</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> Error at offset <span style="color: #cc66cc;">2</span> of <span style="color: #cc66cc;">52</span> bytes in <span style="color: #990000;">file</span><span style="color: #339933;">.</span>php on line <span style="color: #cc66cc;">8881</span></pre></div></div>

<p>So here&#8217;s the solution:</p>
<p>If you want to bring multi dimensional array to the next function , you have to serialize it and write to cookie .<br />
This is how you can do it safely without losing offset.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//securely serialize your data</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Cookie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">write</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'nama_data_set'</span><span style="color: #339933;">,</span> <span style="color: #990000;">base64_encode</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">serialize</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//how to securely unserialize it on another function</span>
<span style="color: #000088;">$data_yang_dibaca</span> <span style="color: #339933;">=</span> <span style="color: #990000;">unserialize</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">base64_decode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Cookie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">read</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'nama_data_set'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://arif.my/blog/cakephp-serialize-multidimensional-array-safely/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Seconds to Time &#8211; CakePHP Helpers</title>
		<link>http://arif.my/blog/seconds-to-time-cakephp-helpers/</link>
		<comments>http://arif.my/blog/seconds-to-time-cakephp-helpers/#comments</comments>
		<pubDate>Fri, 27 May 2011 17:28:41 +0000</pubDate>
		<dc:creator>Mior Mohd Arif</dc:creator>
				<category><![CDATA[Coding World]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://arif.my/?p=107</guid>
		<description><![CDATA[First, you need to create a new file in app/views/helpers/ and name it saat2masa.php . Insert this code below &#038; save: &#160; &#60;?php class Saat2masaHelper extends AppHelper &#123; &#160; function formatMasa&#40;$secs&#41; &#123; $times = array&#40;3600, 60, 1&#41;; $time = ''; $tmp = ''; for&#40;$i = 0; $i &#60; 3; $i++&#41; &#123; $tmp = floor&#40;$secs / [...]]]></description>
			<content:encoded><![CDATA[<p>First, you need to create a new file in app/views/helpers/ and name it <strong>saat2masa.php</strong> .<br />
Insert this code below &#038; save:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #000000; font-weight: bold;">class</span> Saat2masaHelper <span style="color: #000000; font-weight: bold;">extends</span> AppHelper <span style="color: #009900;">&#123;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">function</span> formatMasa<span style="color: #009900;">&#40;</span><span style="color: #000088;">$secs</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		    <span style="color: #000088;">$times</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">3600</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">60</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		    <span style="color: #000088;">$time</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
		    <span style="color: #000088;">$tmp</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
		    <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">3</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000088;">$tmp</span> <span style="color: #339933;">=</span> <span style="color: #990000;">floor</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$secs</span> <span style="color: #339933;">/</span> <span style="color: #000088;">$times</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tmp</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
					<span style="color: #000088;">$tmp</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'00'</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tmp</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
					<span style="color: #000088;">$tmp</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'0'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$tmp</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
				<span style="color: #000088;">$time</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$tmp</span><span style="color: #339933;">;</span>
				<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
					<span style="color: #000088;">$time</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">':'</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
				<span style="color: #000088;">$secs</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$secs</span> <span style="color: #339933;">%</span> <span style="color: #000088;">$times</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		   <span style="color: #009900;">&#125;</span>
		   <span style="color: #b1b100;">return</span> <span style="color: #000088;">$time</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Next you need to enable it application wide. Open <strong>app_controller.php</strong> and add &#8216;Saat2masa&#8217; to var $helpers array. Example as show below :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$helpers</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
  <span style="color: #0000ff;">'Html'</span><span style="color: #339933;">,</span>
  <span style="color: #0000ff;">'Form'</span><span style="color: #339933;">,</span>
  <span style="color: #0000ff;">'Javascript'</span><span style="color: #339933;">,</span>
  <span style="color: #0000ff;">'Session'</span><span style="color: #339933;">,</span>
  <span style="color: #0000ff;">'Saat2masa'</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Lastly, you can call this function in any view file like this &#8216;$this->Saat2masa->formatMasa(6400)&#8217; which will give you the result in HH:MM:SS format equals to &#8217;01:46:40&#8242; . Example usage in CakePHP 1.3 is :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Saat2masa</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">formatMasa</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">6400</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//or u can use it like this</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Saat2masa</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">formatMasa</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$user</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'time_connected'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Happy Coding &#038; Weekends guys !<br />
P/s: Lets go to National Youth Day @ Putrajaya [<a href="http://www.haribelianegara.org.my/">http://www.haribelianegara.org.my/</a>]</p>
]]></content:encoded>
			<wfw:commentRss>http://arif.my/blog/seconds-to-time-cakephp-helpers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating subdomain using PHP (cpanel environment)</title>
		<link>http://arif.my/blog/creating-subdomain-using-php-cpanel-environment/</link>
		<comments>http://arif.my/blog/creating-subdomain-using-php-cpanel-environment/#comments</comments>
		<pubDate>Thu, 12 May 2011 07:30:40 +0000</pubDate>
		<dc:creator>Mior Mohd Arif</dc:creator>
				<category><![CDATA[Coding World]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://arif.my/?p=68</guid>
		<description><![CDATA[What this snippets do ? Bypass server cpanel to create each user their subdomain without administrator adding your subdomain manually. &#60;!--?php &#160; // your cPanel username $cpanel_user = 'username'; &#160; // your cPanel password $cpanel_pass = 'password'; &#160; // your cPanel skin . hover at your cpanel home link button and see the theme name [...]]]></description>
			<content:encoded><![CDATA[<p><strong>What this snippets do ?</strong><br />
Bypass server cpanel to create each user their subdomain without administrator adding your subdomain manually.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;!--</span>?php
&nbsp;
<span style="color: #666666; font-style: italic;">// your cPanel username</span>
<span style="color: #000088;">$cpanel_user</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'username'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// your cPanel password</span>
<span style="color: #000088;">$cpanel_pass</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'password'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// your cPanel skin . hover at your cpanel home link button and see the theme name after /frontend/</span>
<span style="color: #000088;">$cpanel_skin</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'x3'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// your cPanel domain</span>
<span style="color: #000088;">$cpanel_host</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'arif.my'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Replace with your subdomain name e.g: 'blog' for blog.arif.my</span>
<span style="color: #000088;">$subdomain</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'subdomain'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// create the subdomain</span>
&nbsp;
<span style="color: #000088;">$sock</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fsockopen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$cpanel_host</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">2082</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$sock</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #b1b100;">print</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Socket error'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000088;">$pass</span> <span style="color: #339933;">=</span> <span style="color: #990000;">base64_encode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$cpanel_user</span>:<span style="color: #006699; font-weight: bold;">$cpanel_pass</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$in</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;GET /frontend/<span style="color: #006699; font-weight: bold;">$cpanel_skin</span>/subdomain/doadddomain.html?rootdomain=<span style="color: #006699; font-weight: bold;">$cpanel_host</span>&amp;amp;domain=<span style="color: #006699; font-weight: bold;">$subdomain</span><span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$in</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;HTTP/1.0<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$in</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;Host:<span style="color: #006699; font-weight: bold;">$cpanel_host</span><span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$in</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;Authorization: Basic <span style="color: #006699; font-weight: bold;">$pass</span><span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$in</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #990000;">fputs</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sock</span><span style="color: #339933;">,</span> <span style="color: #000088;">$in</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">feof</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sock</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$result</span> <span style="color: #339933;">.=</span> <span style="color: #990000;">fgets</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$sock</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">128</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sock</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$result</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://arif.my/blog/creating-subdomain-using-php-cpanel-environment/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Adding CakePHP as GIT submodule</title>
		<link>http://arif.my/blog/adding-cakephp-as-git-submodule/</link>
		<comments>http://arif.my/blog/adding-cakephp-as-git-submodule/#comments</comments>
		<pubDate>Wed, 11 May 2011 16:14:37 +0000</pubDate>
		<dc:creator>Mior Mohd Arif</dc:creator>
				<category><![CDATA[Coding World]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://arif.my/?p=60</guid>
		<description><![CDATA[Why we should apply this in our development environment ? Because it is easier to update CakePHP library used in your application. Follow this trail below ,  junior programmer should be able to understand it : cd /var/www/my_cakephp_application # First, remove the current cake folder &#160; rm -rf cake/ &#160; mkdir core/ # Now add [...]]]></description>
			<content:encoded><![CDATA[<p>Why we should apply this in our development environment ? Because it is easier to update CakePHP library used in your application.</p>
<p>Follow this trail below ,  junior programmer should be able to understand it :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>my_cakephp_application</pre></div></div>

<p># First, remove the current cake folder</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">&nbsp;
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> cake<span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> core<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p># Now add cakephp as your application submodule</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">git</span> submodule add  <span style="color: #c20cb9; font-weight: bold;">git</span><span style="color: #000000; font-weight: bold;">@</span>github.com:arifsanchez<span style="color: #000000; font-weight: bold;">/</span>cakephp.git core<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">git</span> submodule init
<span style="color: #c20cb9; font-weight: bold;">git</span> submodule update</pre></div></div>

<p># Okay, now you should see files in core/ directory.<br />
# Set your application to read cakephp library from new directory.<br />
# Open app/webroot/index.php (try line 53)</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">defined</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'CAKE_CORE_INCLUDE_PATH'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'CAKE_CORE_INCLUDE_PATH'</span><span style="color: #339933;">,</span> ROOT <span style="color: #339933;">.</span> DS <span style="color: #339933;">.</span> <span style="color: #0000ff;">'core'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>So every morning, before you start your code writing again, please run</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">git</span> submodule init
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">git</span> submodule update</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://arif.my/blog/adding-cakephp-as-git-submodule/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySql Text field maximum length</title>
		<link>http://arif.my/blog/mysql-text-field-maximum-length/</link>
		<comments>http://arif.my/blog/mysql-text-field-maximum-length/#comments</comments>
		<pubDate>Mon, 09 May 2011 14:34:59 +0000</pubDate>
		<dc:creator>Mior Mohd Arif</dc:creator>
				<category><![CDATA[Coding World]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://arif.my/?p=58</guid>
		<description><![CDATA[Some of my favorite text storage field type in MySql : TINYTEXT (up to 256 bytes) TEXT (up to ~64kb) MEDIUMTEXT (up to ~16MB) LONGTEXT (up to ~4GB) For example; a short description about a &#8220;user profile&#8221;, normally i use TEXT to store multiple paragraph with standard html syntax. ~Sharing what i&#8217;ve experienced to the [...]]]></description>
			<content:encoded><![CDATA[<p>Some of my favorite text storage field type in MySql :</p>
<p><strong>TINYTEXT</strong> (up to 256 bytes)<br />
<strong>TEXT</strong> (up to ~64kb)<br />
<strong>MEDIUMTEXT</strong> (up to ~16MB)<br />
<strong>LONGTEXT</strong> (up to ~4GB)</p>
<p>For example; a short description about a &#8220;user profile&#8221;, normally i use <strong>TEXT</strong> to store multiple paragraph with standard html syntax.</p>
<p>~Sharing what i&#8217;ve experienced to the world</p>
]]></content:encoded>
			<wfw:commentRss>http://arif.my/blog/mysql-text-field-maximum-length/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving from 960.gs to 978.gs</title>
		<link>http://arif.my/blog/moving-from-960-gs-to-978-gs/</link>
		<comments>http://arif.my/blog/moving-from-960-gs-to-978-gs/#comments</comments>
		<pubDate>Mon, 09 May 2011 07:48:03 +0000</pubDate>
		<dc:creator>Mior Mohd Arif</dc:creator>
				<category><![CDATA[Coding World]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[layout]]></category>

		<guid isPermaLink="false">http://arif.my/?p=47</guid>
		<description><![CDATA[On my last 2 application develop using CakePHP Framework , i&#8217;ve used 960 grid system (960.gs) for the layout. As of the new release of my application since we are all moving to multiple platform viewer such as ipad2, iphone4, android mobile and in-car-monitor ; im gonna start using 978 Grid System (978.gs) in my [...]]]></description>
			<content:encoded><![CDATA[<p>On my last 2 application develop using <a href="http://www.cakephp.org">CakePHP</a> Framework , i&#8217;ve used 960 grid system (<a href="http://960.gs">960.gs</a>) for the layout.</p>
<p><a href="http://arif.my/blog/wp-content/uploads/2011/05/978-gs.jpg"><img class="aligncenter size-full wp-image-75" title="978-gs" src="http://arif.my/blog/wp-content/uploads/2011/05/978-gs.jpg" alt="" width="240" height="71" /></a></p>
<p>As of the new release of my application since we are all moving to multiple platform viewer such as ipad2, iphone4, android mobile and in-car-monitor ; im gonna start using 978 Grid System (<a href="http://978.gs/">978.gs</a>) in my next update of <a href="http://github.com/arifsanchez/infosys">infosys</a>.</p>
<p><strong>Why move to 978 grid system ?</strong></p>
<p>&#8220;The default gutters are pretty narrow, causing text and content to appear cramped. 978 alleviates this by opening up gutter space and taking advantage of more screen real-estate. ~creator of 978.gs&#8221;</p>
<p>My answer would be its easier to have our team designer working on great design without having argument with u.x engineer :p</p>
]]></content:encoded>
			<wfw:commentRss>http://arif.my/blog/moving-from-960-gs-to-978-gs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;m A Developer rap</title>
		<link>http://arif.my/blog/im-a-developer-rap/</link>
		<comments>http://arif.my/blog/im-a-developer-rap/#comments</comments>
		<pubDate>Fri, 06 May 2011 08:13:36 +0000</pubDate>
		<dc:creator>Mior Mohd Arif</dc:creator>
				<category><![CDATA[Things I Like]]></category>
		<category><![CDATA[music]]></category>

		<guid isPermaLink="false">http://arif.my/?p=33</guid>
		<description><![CDATA[Listen to &#8216;awesome&#8217; I&#8217;m A Developer rap. Smixx &#8211; Developers (feat. Steve Ballmer) by Smixx I’m a developer in many senses of the word cause I make these applications but I also use these verbs to make this music I construct it line by line just like when I’m coding another software design in both [...]]]></description>
			<content:encoded><![CDATA[<p>Listen to &#8216;awesome&#8217; <strong>I&#8217;m A Developer</strong> rap.</p>
<p><object height="81" width="100%"><param name="movie" value="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F14032377&#038;color=3b5998&#038;show_artwork=false&#038;height=84&#038;width=398"></param><param name="allowscriptaccess" value="always"></param><embed allowscriptaccess="always" height="81" src="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F14032377&#038;color=3b5998&#038;show_artwork=false&#038;height=84&#038;width=398" type="application/x-shockwave-flash" width="100%"></embed></object><span><a href="http://soundcloud.com/smixx/smixx-developers-feat-steve">Smixx &#8211; Developers (feat. Steve Ballmer)</a> by <a href="http://soundcloud.com/smixx">Smixx</a></span></p>
<p><span id="more-33"></span><br />
I’m a developer<br />
in many senses of the word<br />
cause I make these applications<br />
but I also use these verbs<br />
to make this music</p>
<p>I construct it line by line<br />
just like when I’m coding<br />
another software design<br />
in both cases<br />
its about design patterns<br />
anyone can get the job done<br />
its the execution that matters</p>
<p>I have many interests<br />
sometimes they conflict<br />
my creativity can usually be a benefit<br />
but sometimes it keeps me<br />
far too busy<br />
but I can’t complain<br />
because my life is hardly gritty<br />
so I think i’ll sit back<br />
and pen myself another ditty<br />
why is it that Linus Torvalds<br />
the only one that Gits me<br />
did you get that reference I was using<br />
or is the thought of source source control too confusing<br />
may just lay myself down a Team Foundation<br />
so I can test the objects of my creation</p>
<p><em>Chorus (Steve Ballmer)</em></p>
<p>Developers Developers Developers Developers<br />
Developers Developers Developers Developers<br />
Developers Developers Developers Developers<br />
Developers Developers Developers Developers</p>
<p>Not a fan of jewelry<br />
except for Ruby on Rails</p>
<p>I can use my skills<br />
to increase my online sales<br />
capitalize on the popularity of Facebook<br />
or grill up some beats<br />
so they declare me a great cook<br />
never really been a big fan of insects<br />
so I track down bugs<br />
remove them when in test<br />
make sure they never get pushed to production<br />
but sometimes deadlines decide they get rushed in</p>
<p>I’m the same way<br />
when it comes to my songs<br />
perfection is the goal whenever the mic is on<br />
I don’t want a bad verse to slip in the mix<br />
cause it could look really bad<br />
for Cory or smixx<br />
only a fan of your behaviour<br />
if its driven development<br />
theres no sense of<br />
adding features for the hell of it<br />
complexity is irrelevant<br />
whether its with music or software<br />
your users have stories so you should be telling them</p>
<p><em>Chorus (Steve Ballmer)</em><br />
Developers Developers Developers Developers<br />
Developers Developers Developers Developers<br />
Developers Developers Developers Developers<br />
Developers Developers Developers Developers</p>
<p>Seeing my creations<br />
on others devices<br />
after years of concentration<br />
is nothing but priceless<br />
whether its with software<br />
or a song just like this</p>
<p>I put myself out there<br />
so go on and hype this<br />
Running 3 external monitors<br />
off of my macbook<br />
currently reviewer on a Windows Phone Pact book<br />
now I got Steve Ballmer<br />
and he’s bombing on this tracks hook<br />
of course my QA’s on me<br />
cause this app just crashed look<br />
when I write my raps<br />
never use a marker<br />
constantly refactor<br />
like I’m using Resharper<br />
doing ad hoc deploys<br />
and I’m always deliverin’<br />
and I made that choice<br />
regardless of dividends<br />
creating all this noise<br />
in some form<br />
until the bitter end<br />
stating with with my voice<br />
theres no norm<br />
that I can fit within<br />
haven’t been sleeping<br />
but using lots of REST<br />
pass the mic back to who rocked it best !</p>
]]></content:encoded>
			<wfw:commentRss>http://arif.my/blog/im-a-developer-rap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeRadius MySql user password hashing</title>
		<link>http://arif.my/blog/freeradius-mysql-user-password-hashing/</link>
		<comments>http://arif.my/blog/freeradius-mysql-user-password-hashing/#comments</comments>
		<pubDate>Fri, 06 May 2011 04:20:47 +0000</pubDate>
		<dc:creator>Mior Mohd Arif</dc:creator>
				<category><![CDATA[Coding World]]></category>
		<category><![CDATA[freeradius]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://arif.my/?p=20</guid>
		<description><![CDATA[Here&#8217;s the quick note on how to insert hash password entry in mysql for FreeRadius environment. Run insert via linux terminal using this line: INSERT INTO radcheck &#40;username, attribute, op, password&#41; VALUES&#40;'admin','Crypt-Password', ':=',  encrypt&#40;'test1234'&#41;&#41;; Result entry di dalam database : VALUES&#40;'admin','Crypt-Password',':=','YHx56BpoLV0uU'&#41;; Notice that the password value is encrypted from &#8216;test1234&#8216; becoming &#8216;YHx56BpoLV0uU&#8216;. Hashing method yang [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s the quick note on how to insert hash password entry in mysql for FreeRadius environment.<br />
Run insert via linux terminal using this line:</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">INSERT</span> <span style="color: #990099; font-weight: bold;">INTO</span> radcheck <span style="color: #FF00FF;">&#40;</span>username<span style="color: #000033;">,</span> attribute<span style="color: #000033;">,</span> op<span style="color: #000033;">,</span> <span style="color: #000099;">password</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">VALUES</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">'admin'</span><span style="color: #000033;">,</span><span style="color: #008000;">'Crypt-Password'</span><span style="color: #000033;">,</span> <span style="color: #008000;">':='</span><span style="color: #000033;">,</span>  <span style="color: #000099;">encrypt</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">'test1234'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span></pre></div></div>

<p>Result entry di dalam database :</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">VALUES</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">'admin'</span><span style="color: #000033;">,</span><span style="color: #008000;">'Crypt-Password'</span><span style="color: #000033;">,</span><span style="color: #008000;">':='</span><span style="color: #000033;">,</span><span style="color: #008000;">'YHx56BpoLV0uU'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span></pre></div></div>

<p>Notice that the password value is encrypted from &#8216;<strong>test1234</strong>&#8216; becoming &#8216;<strong>YHx56BpoLV0uU</strong>&#8216;.</p>
<p>Hashing method yang boleh digunakan di FreeRadius environment.</p>
<p>{clear}		<strong>User-Password </strong> <span style="color: #ff0000;"><em>clear-text passwords</em></span><br />
{cleartext} <strong> User-Password</strong> <span style="color: #ff0000;"><em>clear-text passwords</em></span><br />
{crypt}	   	<strong>Crypt-Password</strong> <em><span style="color: #ff0000;">Unix-style &#8220;crypt&#8221;ed passwords</span></em><br />
{md5}	   	<strong>MD5-Password</strong> <span style="color: #ff0000;"><em>MD5 hashed passwords</em></span><br />
{smd5}	   	<strong>SMD5-Password</strong> <span style="color: #ff0000;"><em>MD5 hashed passwords, with a salt</em></span><br />
{sha}	<strong> SHA-Password</strong> <span style="color: #ff0000;"><em>SHA1 hashed passwords</em></span><br />
{ssha}	<strong> SSHA-Password</strong> <span style="color: #ff0000;"><em>SHA1 hashed passwords, with a salt</em></span></p>
]]></content:encoded>
			<wfw:commentRss>http://arif.my/blog/freeradius-mysql-user-password-hashing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove .svn recursive</title>
		<link>http://arif.my/blog/remove-svn-recursive/</link>
		<comments>http://arif.my/blog/remove-svn-recursive/#comments</comments>
		<pubDate>Wed, 04 May 2011 12:01:12 +0000</pubDate>
		<dc:creator>Mior Mohd Arif</dc:creator>
				<category><![CDATA[Coding World]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://arif.my/?p=13</guid>
		<description><![CDATA[Im having hard time to do my application code cleanup. after a few google search result hop. So, this is how to remove .svn folder recursively (works in linux terminal) : find . -name &#34;.svn&#34; -exec rm -rf &#123;&#125; \;]]></description>
			<content:encoded><![CDATA[<p>Im having hard time to do my application code cleanup. after a few google search result hop.</p>
<p>So, this is how to remove .svn folder recursively (works in linux terminal) :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">find</span> . <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;.svn&quot;</span> <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://arif.my/blog/remove-svn-recursive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello world!</title>
		<link>http://arif.my/blog/hello-world/</link>
		<comments>http://arif.my/blog/hello-world/#comments</comments>
		<pubDate>Wed, 04 May 2011 02:16:48 +0000</pubDate>
		<dc:creator>Mior Mohd Arif</dc:creator>
				<category><![CDATA[Quick Note]]></category>

		<guid isPermaLink="false">http://arif.com.my/?p=1</guid>
		<description><![CDATA[&#160; echo &#34;Bismillahi-Rahmani-Rahim&#34;; &#160; echo &#34;Hello World!&#34;;]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Bismillahi-Rahmani-Rahim&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Hello World!&quot;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://arif.my/blog/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

