<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Shiki</title>
	
	<link>http://shikii.net/blog</link>
	<description>web and game developer</description>
	<lastBuildDate>Fri, 16 Jul 2010 07:51:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/shikii/OfdV" /><feedburner:info uri="shikii/ofdv" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>The undefined curl function in console (WampServer)</title>
		<link>http://feedproxy.google.com/~r/shikii/OfdV/~3/_fO76j0pER8/</link>
		<comments>http://shikii.net/blog/the-undefined-curl-function-in-console-wampserver/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 08:57:06 +0000</pubDate>
		<dc:creator>Shiki</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wampserver]]></category>

		<guid isPermaLink="false">http://shikii.net/blog/?p=122</guid>
		<description><![CDATA[Stupid stupid me. On Windows/WampServer, I&#8217;ve always had this problem when working with PHP code that can run in the console and using cURL methods..
PHP Fatal error: &#160;Call to undefined function curl_init&#40;&#41; in D:\Shiki\github\yii-clockwerk\test-app\CurlHelper.php on line 90
Fatal error: Call to undefined function curl_init&#40;&#41; in D:\Shiki\github\yii-clockwerk\test-app\CurlHelper.php on line 90
It (cURL) works in the browser but not [...]]]></description>
			<content:encoded><![CDATA[<p>Stupid stupid me. On Windows/WampServer, I&#8217;ve always had this problem when working with PHP code that can run in the console and using <a href="http://php.net/manual/en/book.curl.php">cURL </a>methods..</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:640px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">PHP Fatal error: &nbsp;Call to undefined <span style="color: #000000; font-weight: bold;">function</span> curl_init<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">in</span> D:\Shiki\github\yii-clockwerk\test-app\CurlHelper.php on line <span style="color: #000000;">90</span><br />
Fatal error: Call to undefined <span style="color: #000000; font-weight: bold;">function</span> curl_init<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">in</span> D:\Shiki\github\yii-clockwerk\test-app\CurlHelper.php on line <span style="color: #000000;">90</span></div></div>
<p>It (cURL) works in the browser but not when in console. I didn&#8217;t think that it was <a href="http://old.nabble.com/Using-curl-inside-cake-console-td20409372.html">this simple</a> to fix. The PHP CLI uses a different config file (php.ini) compared to the one used by WampServer/Apache. You can see the location of the config file being used by typing:</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:640px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">php <span style="color: #660033;">--ini</span></div></div>
<p>Result:</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:640px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Configuration File <span style="color: #7a0874; font-weight: bold;">&#40;</span>php.ini<span style="color: #7a0874; font-weight: bold;">&#41;</span> Path: C:\Windows<br />
Loaded Configuration File: &nbsp; &nbsp; &nbsp; &nbsp; C:\wamp\bin\php\php5.3.0\php.ini<br />
Scan <span style="color: #000000; font-weight: bold;">for</span> additional .ini files <span style="color: #000000; font-weight: bold;">in</span>: <span style="color: #7a0874; font-weight: bold;">&#40;</span>none<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
Additional .ini files parsed: &nbsp; &nbsp; &nbsp;<span style="color: #7a0874; font-weight: bold;">&#40;</span>none<span style="color: #7a0874; font-weight: bold;">&#41;</span></div></div>
<p>You can then fix the curl problem by enabling it in the php.ini file being used. Make sure this is not commented out:</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:640px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #007800;">extension</span>=php_curl.dll</div></div><img src="http://feeds.feedburner.com/~r/shikii/OfdV/~4/_fO76j0pER8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://shikii.net/blog/the-undefined-curl-function-in-console-wampserver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://shikii.net/blog/the-undefined-curl-function-in-console-wampserver/</feedburner:origLink></item>
		<item>
		<title>FirePHP Logger for Yii Framework</title>
		<link>http://feedproxy.google.com/~r/shikii/OfdV/~3/ReiNrd-vwX4/</link>
		<comments>http://shikii.net/blog/firephp-logger-for-yii-framework/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 11:59:41 +0000</pubDate>
		<dc:creator>Shiki</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[firephp]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[yii]]></category>

		<guid isPermaLink="false">http://shikii.net/blog/?p=96</guid>
		<description><![CDATA[I made this a few weeks ago. It is a Yii Framework extension which routes log messages to FirePHP.
Requirements

Download the extension from the Yii Framework extension page or GitHub.
Install Firebug and FirePHP plugins for Firefox.
Enable output_buffering in php.ini.

Installation

Download and extract the &#8220;shiki&#8221; folder to your extensions directory. This is usually &#8220;/protected/extensions&#8221;.
Download the FirePHP core class [...]]]></description>
			<content:encoded><![CDATA[<p>I made this a few weeks ago. It is a <a href="http://yiiframework.com">Yii Framework</a> extension which routes log messages to <a href="http://firephp.org">FirePHP</a>.</p>
<h3>Requirements</h3>
<ul>
<li>Download the extension from the Yii Framework <a href="http://www.yiiframework.com/extension/firephp-logroute/">extension page</a> or <a href="http://github.com/shiki/yii-firephplogroute">GitHub</a>.</li>
<li>Install <a href="http://getfirebug.com/">Firebug</a> and FirePHP plugins for <a href="http://getfirefox.com/">Firefox</a>.</li>
<li>Enable <a href="http://www.php.net/manual/en/outcontrol.configuration.php#ini.output-buffering">output_buffering</a> in php.ini.</li>
</ul>
<h3>Installation</h3>
<ol>
<li>Download and extract the &#8220;shiki&#8221; folder to your extensions directory. This is usually &#8220;/protected/extensions&#8221;.</li>
<li>Download the FirePHP core class and put it somewhere in your &#8220;/protected&#8221; directory. I usually put these files in /protected/vendors.</li>
<li>Modify your config file to include this LogRoute class and set the &#8220;fbPath&#8221; property to the path of fb.php. Use a Yii alias (i.e. application.vendors.FirePHPCore031.lib.FirePHPCore.fb):</li>
</ol>
<h5>config file code (i.e. /protected/config/main.php)</h5>
<div class="codecolorer-container php mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:640px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">....</span><br />
<br />
<span style="color: #0000ff;">'log'</span><span style="color: #339933;">=&gt;</span>array<span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">'class'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'CLogRouter'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">'routes'</span><span style="color: #339933;">=&gt;</span>array<span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// the default (file logger)</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'class'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'CFileLogRoute'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'levels'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'error, warning'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// the FirePHP LogRoute</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'class'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'ext.shiki.firePHPLogRoute.ShikiFirePHPLogRoute'</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">// &quot;ext&quot; alias points to /protected/extensions</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'fbPath'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'application.vendors.FirePHPCore031.lib.FirePHPCore.fb'</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">// set path to fb.php</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
<br />
<span style="color: #339933;">....</span></div></div>
<h3>Usage</h3>
<p>Once you&#8217;ve got the extension setup in the config, you can use Yii&#8217;s logging methods to log messages to FirePHP.</p>
<div class="codecolorer-container php mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:640px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">// logging an INFO message (arrays will work and looks awesome in FirePHP)</span><br />
Yii<span style="color: #339933;">::</span><a href="http://www.php.net/log"><span style="color: #990000;">log</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'username'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Shiki'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'profiles'</span> <span style="color: #339933;">=&gt;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'twidl'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'twitter'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'facebook'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> CLogger<span style="color: #339933;">::</span><span style="color: #004000;">LEVEL_INFO</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;">// logging a WARNING message</span><br />
Yii<span style="color: #339933;">::</span><a href="http://www.php.net/log"><span style="color: #990000;">log</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;You didn't setup a profile, are you really a person?&quot;</span><span style="color: #339933;">,</span> CLogger<span style="color: #339933;">::</span><span style="color: #004000;">LEVEL_WARNING</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;">// logging with a CATEGORY (categories are displayed as &quot;labels&quot; in FirePHP -- just an additional info text)</span><br />
Yii<span style="color: #339933;">::</span><a href="http://www.php.net/log"><span style="color: #990000;">log</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Profile successfully created'</span><span style="color: #339933;">,</span> CLogger<span style="color: #339933;">::</span><span style="color: #004000;">LEVEL_INFO</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'application.user.profiles'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;">// tracing simple text</span><br />
Yii<span style="color: #339933;">::</span><span style="color: #004000;">trace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Loading application.user.profiles.ninja'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'application.user.profiles'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;">// logging an ERROR</span><br />
Yii<span style="color: #339933;">::</span><a href="http://www.php.net/log"><span style="color: #990000;">log</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'We have successfully determined that you are not a person'</span><span style="color: #339933;">,</span> CLogger<span style="color: #339933;">::</span><span style="color: #004000;">LEVEL_ERROR</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Any category/label will work'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div><img src="http://feeds.feedburner.com/~r/shikii/OfdV/~4/ReiNrd-vwX4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://shikii.net/blog/firephp-logger-for-yii-framework/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://shikii.net/blog/firephp-logger-for-yii-framework/</feedburner:origLink></item>
		<item>
		<title>Installing Memcached for PHP 5.3 on Windows 7</title>
		<link>http://feedproxy.google.com/~r/shikii/OfdV/~3/20lF-jjsTYs/</link>
		<comments>http://shikii.net/blog/installing-memcached-for-php-5-3-on-windows-7/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 06:23:30 +0000</pubDate>
		<dc:creator>Shiki</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wampserver]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://shikii.net/blog/?p=80</guid>
		<description><![CDATA[
First off, all credits go to this guy. I&#8217;m just listing the steps on how I did it in Windows 7 with PHP 5.3. Also, I tested this using WampServer but I believe it should work on any PHP install.
Install memcached

Download the Memcached Win32 library here: http://code.jellycan.com/memcached/. Extract the downloaded archive file in a directory [...]]]></description>
			<content:encoded><![CDATA[<div class="wide"><img title="Memcached" src="http://shikii.net/blog/wp-content/uploads/2010/03/memcached-win7.jpg" alt="" width="640" /></div>
<p>First off, all credits go to <a href="http://pureform.wordpress.com/2008/01/10/installing-memcache-on-windows-for-php/">this guy</a>. I&#8217;m just listing the steps on how I did it in Windows 7 with PHP 5.3. Also, I tested this using <a href="http://www.wampserver.com/en/">WampServer</a> but I believe it should work on any PHP install.</p>
<h2>Install memcached</h2>
<ol>
<li>Download the Memcached Win32 library here: <a href="http://code.jellycan.com/memcached/">http://code.jellycan.com/memcached/</a>. Extract the downloaded archive file in a directory (i.e. <em>c:\memcached</em>). There should be a <em>memcached.exe</em> in there.</li>
<li>Run a command prompt <strong>as an administrator</strong>. Some info on how to do that <a href="http://blogs.msdn.com/tims/archive/2006/11/02/windows-vista-secret-10-open-an-elevated-command-prompt-in-six-keystrokes.aspx">here</a>.</li>
<li>Install memcached as a service. Go to the memcached directory, type and run:
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:640px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">memcached <span style="color: #660033;">-d</span> <span style="color: #c20cb9; font-weight: bold;">install</span></div></div>
</li>
<li>Start the memcached service by running:
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:640px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">memcached <span style="color: #660033;">-d</span> start</div></div>
</li>
</ol>
<h2>Install PHP Memcache extension (php_memcache.dll)</h2>
<ol>
<li>Chances are you don&#8217;t have php_memcache.dll in your PHP extensions yet. You can download a build of it <a href="http://downloads.php.net/pierre/">here</a>. Make sure to download the correct one for your system. Mine was 32bit and PHP 5.3 so I used this: <a href="http://downloads.php.net/pierre/php_memcache-cvs-20090703-5.3-VC6-x86.zip">php_memcache-cvs-20090703-5.3-VC6-x86.zip</a>. The archive should contain <em>php_memcache.dll</em>. Extract the archive to your php extensions directory. On my system (WampServer), this was <em>C:\wamp\bin\php\php5.3.0\ext</em>.</li>
<li>Edit <strong>php.ini</strong>, add this line to enable the extension:
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:640px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">extension=php_memcache.dll</div></div>
<p>This is a little easier for WampServer users because there&#8217;s a menu for enabling extensions ^_^x</li>
</ol>
<h2>Test</h2>
<p>Test the installation using the sample PHP code here: <a href="http://www.php.net/manual/en/memcache.examples-overview.php">http://www.php.net/manual/en/memcache.examples-overview.php</a></p><img src="http://feeds.feedburner.com/~r/shikii/OfdV/~4/20lF-jjsTYs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://shikii.net/blog/installing-memcached-for-php-5-3-on-windows-7/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://shikii.net/blog/installing-memcached-for-php-5-3-on-windows-7/</feedburner:origLink></item>
		<item>
		<title>“Ignoring funny ref” error on Git + Dropbox</title>
		<link>http://feedproxy.google.com/~r/shikii/OfdV/~3/Hx9TXb2IVLo/</link>
		<comments>http://shikii.net/blog/ignoring-funny-ref-error-on-git-dropbox/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 03:54:28 +0000</pubDate>
		<dc:creator>Shiki</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[dropbox]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://shikii.net/blog/?p=70</guid>
		<description><![CDATA[At Twidl HQ, we use a combination of Git and Dropbox for managing our source code. It&#8217;s a simple but awesome setup. Sometimes, we get this really cryptic error when fetching from our main repo (our shared Dropbox folder):
Ignoring funny ref 'refs/remotes/origin/master (Shiki's conflicted copy 2010-01-14&#41;' locally
It seems to happen when 2 people push to [...]]]></description>
			<content:encoded><![CDATA[<p>At <a href="http://twidl.it">Twidl HQ</a>, we use a combination of <a href="http://git-scm.com/">Git</a> and <a href="https://www.dropbox.com/">Dropbox</a> for managing our source code. It&#8217;s a simple but awesome setup. Sometimes, we get this really cryptic error when <strong>fetching</strong> from our main repo (our <em>shared</em> Dropbox folder):</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:640px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Ignoring funny ref <span style="color: #ff0000;">'refs/remotes/origin/master (Shiki'</span>s conflicted copy <span style="color: #000000;">2010</span>-01-<span style="color: #000000;">14</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #ff0000;">' locally</span></div></div>
<p>It seems to happen when 2 people push to <strong>origin/master</strong> at almost the same time. This makes Dropbox update the same file and seems to be the cause of the error. When this happens, you can bet that one of the people who did the push will <strong>lose</strong> his changes to origin/master. So you&#8217;ll have to fix it accordingly. </p>
<p>The &#8220;funny ref&#8221; error does not have any critical effect on the repo and Git seems to work perfectly. It will just annoy you every time you try to fetch ^_^x It turns out that this &#8220;<strong>master (Shiki&#8217;s conflicted copy 2010-01-14)</strong>&#8221; is a branch in the main repo. Simply deleting it will remove the error. In terminal, go to your main repo&#8217;s <em>(Dropbox)</em> root folder:</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:640px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">git</span> branch <span style="color: #660033;">-d</span> <span style="color: #ff0000;">&quot;master (Shiki's conflicted copy 2010-01-14)&quot;</span></div></div>
<p>If you&#8217;re not sure of the name of the conflicting branch, you can execute &#8220;<em>git branch</em>&#8221; to show all branches. There should at least be a &#8220;master&#8221; branch and your conflicting branch.</p><img src="http://feeds.feedburner.com/~r/shikii/OfdV/~4/Hx9TXb2IVLo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://shikii.net/blog/ignoring-funny-ref-error-on-git-dropbox/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://shikii.net/blog/ignoring-funny-ref-error-on-git-dropbox/</feedburner:origLink></item>
		<item>
		<title>Creating custom Box2D shape components in PushButton Engine</title>
		<link>http://feedproxy.google.com/~r/shikii/OfdV/~3/p-PmZC0FzBY/</link>
		<comments>http://shikii.net/blog/creating-custom-box2d-shape-components-in-pushbutton-engine/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 13:40:22 +0000</pubDate>
		<dc:creator>Shiki</dc:creator>
				<category><![CDATA[Flash Games]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[box2d]]></category>
		<category><![CDATA[component]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[pushbutton engine]]></category>

		<guid isPermaLink="false">http://shikii.net/blog/?p=58</guid>
		<description><![CDATA[If you ever need to use other ways of creating Box2D shapes that are not currently available in PushButton Engine, you can simply make one yourself. You&#8217;ll just need to create a subclass of CollisionShape and use it just like the PBE shape classes.
Here&#8217;s a sample class we use to create an oriented box shape:
package [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever need to use other ways of creating <a href="http://www.box2d.org">Box2D</a> shapes that are not currently available in <a href="http://www.pushbuttonengine.com">PushButton Engine</a>, you can simply make one yourself. You&#8217;ll just need to create a subclass of CollisionShape and use it just like the PBE shape classes.</p>
<p>Here&#8217;s a sample class we use to create an oriented box shape:</p>
<div class="codecolorer-container actionscript mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:640px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">package cavalcade.<span style="color: #006600;">box2D</span><br />
<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0066CC;">import</span> Box2D.<span style="color: #006600;">Collision</span>.<span style="color: #006600;">Shapes</span>.<span style="color: #006600;">b2PolygonDef</span>;<br />
&nbsp; &nbsp; <span style="color: #0066CC;">import</span> Box2D.<span style="color: #006600;">Collision</span>.<span style="color: #006600;">Shapes</span>.<span style="color: #006600;">b2ShapeDef</span>;<br />
&nbsp; &nbsp; <span style="color: #0066CC;">import</span> Box2D.<span style="color: #006600;">Common</span>.<span style="color: #0066CC;">Math</span>.<span style="color: #006600;">b2Vec2</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #0066CC;">import</span> com.<span style="color: #006600;">pblabs</span>.<span style="color: #006600;">box2D</span>.<span style="color: #006600;">CollisionShape</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">geom</span>.<span style="color: #006600;">Point</span>;<br />
<br />
&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> OrientedBoxCollisionShape <span style="color: #0066CC;">extends</span> CollisionShape<br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> halfWidth:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">0.5</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> halfHeight:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">0.5</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> center:Point = <span style="color: #000000; font-weight: bold;">new</span> Point<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> angle:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">0</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> OrientedBoxCollisionShape<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; override protected <span style="color: #000000; font-weight: bold;">function</span> doCreateShape<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:b2ShapeDef<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> scale:<span style="color: #0066CC;">Number</span> = <span style="color: #0066CC;">_parent</span>.<span style="color: #006600;">manager</span>.<span style="color: #006600;">inverseScale</span>; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> shape:b2PolygonDef = <span style="color: #000000; font-weight: bold;">new</span> b2PolygonDef<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; shape.<span style="color: #006600;">SetAsOrientedBox</span><span style="color: #66cc66;">&#40;</span>halfWidth <span style="color: #66cc66;">*</span> scale <span style="color: #66cc66;">*</span> <span style="color: #0066CC;">_parent</span>.<span style="color: #0066CC;">size</span>.<span style="color: #006600;">x</span>, halfHeight <span style="color: #66cc66;">*</span> scale <span style="color: #66cc66;">*</span> <span style="color: #0066CC;">_parent</span>.<span style="color: #0066CC;">size</span>.<span style="color: #006600;">y</span>, b2Vec2.<span style="color: #006600;">Make</span><span style="color: #66cc66;">&#40;</span>center.<span style="color: #006600;">x</span>, center.<span style="color: #006600;">y</span><span style="color: #66cc66;">&#41;</span>, angle<span style="color: #66cc66;">&#41;</span>; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> shape;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div></div>
<p>As you can see, the class inherits from CollisionShape and overrides the <strong>doCreateShape</strong> method in order to create the actual Box2D oriented box shape from there. Use it in the level files like this:</p>
<div class="codecolorer-container xml mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:640px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;component</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;com.pblabs.box2D.Box2DSpatialComponent&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Cart&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;collidesWithTypes</span> <span style="color: #000066;">childType</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;_0<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Platform<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/_0<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/collidesWithTypes<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;collisionShapes</span> <span style="color: #000066;">childType</span>=<span style="color: #ff0000;">&quot;com.pblabs.box2D.CollisionShape&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;_0</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;cavalcade.box2D.OrientedBoxCollisionShape&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;halfWidth<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>0.42<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/halfWidth<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;halfHeight<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>0.12<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/halfHeight<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;density<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>50<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/density<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> <span style="color: #808080; font-style: italic;">&lt;!-- you can still use the same properties in CollisionShape --&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;friction<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/friction<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;restitution<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/restitution<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;angle<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>3<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/angle<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> <span style="color: #808080; font-style: italic;">&lt;!-- specify an angle of rotation --&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;center<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> <span style="color: #808080; font-style: italic;">&lt;!-- you can override the location of the box so it won't be positioned somewhere other than the center of the entity --&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;x<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/x<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;y<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>-0.5<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/y<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> <br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/center<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/_0<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/collisionShapes<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;collisionType</span> <span style="color: #000066;">childType</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;_0<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Renderable<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/_0<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/collisionType<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;manager</span> <span style="color: #000066;">componentReference</span>=<span style="color: #ff0000;">&quot;SpatialDB&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;position</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;x<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/x<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;y<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>110<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/y<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/position<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;size</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;x<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>60<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/x<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;y<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>45<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/y<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/size<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/component<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div><img src="http://feeds.feedburner.com/~r/shikii/OfdV/~4/p-PmZC0FzBY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://shikii.net/blog/creating-custom-box2d-shape-components-in-pushbutton-engine/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://shikii.net/blog/creating-custom-box2d-shape-components-in-pushbutton-engine/</feedburner:origLink></item>
		<item>
		<title>Experiment: Using SWF MovieClips in PushButton Engine</title>
		<link>http://feedproxy.google.com/~r/shikii/OfdV/~3/2uq9-ltspsU/</link>
		<comments>http://shikii.net/blog/experiment-using-swf-movieclips-in-pushbutton-engine/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 17:11:17 +0000</pubDate>
		<dc:creator>Shiki</dc:creator>
				<category><![CDATA[Flash Games]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[component]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[movieclip]]></category>
		<category><![CDATA[pushbutton engine]]></category>
		<category><![CDATA[swf]]></category>

		<guid isPermaLink="false">http://shikii.net/blog/?p=32</guid>
		<description><![CDATA[Important: This tutorial is now deprecated due to the new and awesome, fully rewritten, rendering components. You can see some discussions about it here.
I&#8217;ve been working with PushButton Engine for a short while now but last night was actually the first time I tried integrating/using a MovieClip from a SWF into PBE. Unfortunately, there are [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p><strong>Important:</strong> This tutorial is now deprecated due to the new and awesome, fully rewritten, rendering components. You can see some discussions about it <a href="http://pushbuttonengine.com/forum/viewtopic.php?f=5&#038;t=353">here</a>.</p></blockquote>
<p>I&#8217;ve been working with <a href="http://www.pushbuttonengine.com">PushButton Engine</a> for a short while now but last night was actually the first time I tried integrating/using a MovieClip from a SWF into PBE. Unfortunately, there are no documentations on how do this at the moment. The examples mostly use images (pngs). I won&#8217;t b*tch about it because that is totally understandable. The PBE team are working their a**es off to get to 1.0 and the documentation is the least of their worries. I could at least thank them for doing such a good job &#8212; PBE&#8217;s a well thought-out framework, everything I learned from it made a lot of sense.</p>
<p>Anyway, what I wanted to do was simply to put my MovieClip in a SWF library into the stage. I am using FlexBuilder 3 + the latest PBE code from the SVN. I somehow got some ideas on how to do this when I was hanging out at the <a href="http://pushbuttonengine.com/chat/">#pbengine IRC channel</a>. And I did a lot of digging on the PBE code and did lots of experiments to try to understand how to use them. There are 2 different components we can use:</p>
<ul>
<li><strong>com.pblabs.rendering2D.SWFSpriteSheetComponent.</strong> This one actually had a class description:<em> &#8220;A class that is similar to the SpriteSheetComponent except the frames are loaded by rasterizing a MovieClip rather than a single image&#8221;</em><em>. </em>Assuming you&#8217;ve gone through the PBE examples, I think this means that instead of creating the frames from a sprite sheet image and have it used by SpriteRenderComponent, you&#8217;ll be getting your frames from a loaded MovieClip instead. Nevertheless, this isn&#8217;t what I was aiming for.</li>
<li><strong>com.pblabs.rendering2D.SWFRenderComponent.</strong> This component somehow works like SpriteRenderComponent, only it uses MovieClips. A little code investigation later, looks like this component will need to be subclassed in order for it to work. From that subclass, you can do what you want to do with your movieclip  using a protected _clip variable.</li>
</ul>
<p>Since I still wanted control over <strong>a movieclip</strong>, I used SWFRenderComponent. I&#8217;ll explain below how I did it. Please do note that I am still a novice with PBE (and Flex for that matter) so the method I used might not be good practice.<span id="more-32"></span></p>
<h2>Requirements</h2>
<ul>
<li><strong>Latest PBE code</strong>. You can get it from the SVN <a href="http://code.google.com/p/pushbuttonengine/source/checkout">here</a> or download <a href="http://code.google.com/p/pushbuttonengine/downloads/list">here</a>. As of this writing, I&#8217;m at revision 470 (Sep 10, 2009)</li>
<li><strong>SWF</strong>. I have a compiled SWF containing exported assets (movieclip classes) that I want to use in PBE.</li>
<li><strong>Flex compiler / IDE</strong> / or whatever your preferred tool is. I&#8217;m using FlexBuilder + Flex Compiler.</li>
<li><strong>A PBE Project</strong>. Our team used the <a href="http://code.google.com/p/pushbuttonengine/source/browse/trunk#trunk/examples/PBEngineDemo">PBEngineDemo</a> project as the base project.</li>
</ul>
<h2>Embed the SWF</h2>
<p>In Resources.as, embed the SWF using the same method as the sample embedded resources in the PBEngineDemo project.</p>
<div class="codecolorer-container actionscript mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:640px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>source=<span style="color: #ff0000;">'../assets/gamemovieclips.swf'</span>, mimeType=<span style="color: #ff0000;">'application/octet-stream'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> _embeddedSWF:<span style="color: #000000; font-weight: bold;">Class</span>;</div></div>
<p>I thought that the above would be enough just like embedding images. However, I was getting this warning from the log:</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:640px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">WARN: Resources - ResourceBundle - No resource type specified for extension '.swf'. &nbsp;In the ExtensionTypes parameter, expected to see something like: ResourceBundle.ExtensionTypes.mycustomext = &amp;quot;com.mydomain.customresource&amp;quot; where mycustomext is the (lower-case) extension, and &amp;quot;com.mydomain.customresource&amp;quot; is a string of the fully qualified resource class name. &nbsp;Defaulting to generic DataResource.</div></div>
<p>This resulted to the <em>gamemovieclips.swf</em> not getting embedded in the final swf. I tried to look at the problem in ResourceBundle.as, and somehow, adding this to Resources.as fixed it:</p>
<div class="codecolorer-container actionscript mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:640px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Resources <span style="color: #0066CC;">extends</span> ResourceBundle<br />
<span style="color: #66cc66;">&#123;</span><br />
ResourceBundle.<span style="color: #006600;">ExtensionTypes</span>.<span style="color: #006600;">swf</span> = <span style="color: #66cc66;">&amp;</span>quot;com.<span style="color: #006600;">pblabs</span>.<span style="color: #006600;">engine</span>.<span style="color: #006600;">resource</span>.<span style="color: #006600;">SWFResource</span><span style="color: #66cc66;">&amp;</span>quot;; <span style="color: #808080; font-style: italic;">// added this line</span><br />
<br />
<span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>source=<span style="color: #ff0000;">'../assets/gamemovieclips.swf'</span>, mimeType=<span style="color: #ff0000;">'application/octet-stream'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> _embeddedSWF:<span style="color: #000000; font-weight: bold;">Class</span>; <span style="color: #808080; font-style: italic;">// our embedded swf</span><br />
<br />
<span style="color: #808080; font-style: italic;">// other embed files below</span><br />
...</div></div>
<h2>Subclass SWFRenderComponent</h2>
<p>Next, I created a new class which inherits SWFRenderComponent and overrides the <em>getClipInstance()</em> method. For this example, let&#8217;s say in my embedded swf (gamemovieclips.swf in the example above) I have a car animation movieclip exported as CarMC. I will then need to have getClipInstance() return an instance of that movieclip. My class would then look like this:</p>
<div class="codecolorer-container actionscript mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:640px;height:300px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">package com.<span style="color: #006600;">game</span>.<span style="color: #006600;">renders</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">pblabs</span>.<span style="color: #006600;">engine</span>.<span style="color: #006600;">resource</span>.<span style="color: #006600;">Resource</span>;<br />
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">pblabs</span>.<span style="color: #006600;">engine</span>.<span style="color: #006600;">resource</span>.<span style="color: #006600;">ResourceManager</span>;<br />
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">pblabs</span>.<span style="color: #006600;">engine</span>.<span style="color: #006600;">resource</span>.<span style="color: #006600;">SWFResource</span>;<br />
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">pblabs</span>.<span style="color: #006600;">rendering2D</span>.<span style="color: #006600;">SWFRenderComponent</span>;<br />
<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #0066CC;">MovieClip</span>;<br />
<br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> CarRenderComponent <span style="color: #0066CC;">extends</span> SWFRenderComponent<br />
<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> CarRenderComponent<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// override getClipInstance() and return a CarMC movieclip instance</span><br />
&nbsp; &nbsp; protected override <span style="color: #000000; font-weight: bold;">function</span> getClipInstance<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">MovieClip</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// check if we are currently loading the movieclip or a CarMC instance was already loaded</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_clipInstance == <span style="color: #000000; font-weight: bold;">null</span> <span style="color: #66cc66;">&amp;</span>amp;<span style="color: #66cc66;">&amp;</span>amp; <span style="color: #66cc66;">!</span>_loading<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _loading = <span style="color: #000000; font-weight: bold;">true</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// load CarMC from gamemovieclips.swf using PBE's ResourceManager</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//I'm also passing an anonymous function which gets called if gamemovieclips.swf is loaded</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ResourceManager.<span style="color: #006600;">instance</span>.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&amp;</span>quot;..<span style="color: #66cc66;">/</span>assets<span style="color: #66cc66;">/</span>gamemovieclips.<span style="color: #006600;">swf</span><span style="color: #66cc66;">&amp;</span>quot;, SWFResource, <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>resource:Resource<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// reaching this part of the code means that gamemovieclips.swf was loaded</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// we will then get an instance of CarMC by calling getExportedAsset below</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _clipInstance = <span style="color: #66cc66;">&#40;</span>resource as SWFResource<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">getExportedAsset</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&amp;</span>quot;CarMC<span style="color: #66cc66;">&amp;</span>quot;<span style="color: #66cc66;">&#41;</span> as <span style="color: #0066CC;">MovieClip</span>;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_clipInstance<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> <span style="color: #808080; font-style: italic;">// check if the class was actually loaded</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// if it was loaded, you can now do whatever you want with it</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// for example, I have a child movieclip in CarMC with instance name &amp;quot;wheel&amp;quot; and I want it stopped initially</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _wheel = _clipInstance.<span style="color: #006600;">getChildByName</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&amp;</span>quot;wheel<span style="color: #66cc66;">&amp;</span>quot;<span style="color: #66cc66;">&#41;</span> as <span style="color: #0066CC;">MovieClip</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _wheel.<span style="color: #0066CC;">stop</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _loading = <span style="color: #000000; font-weight: bold;">false</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// return our CarMC instance that will be rendered to the scene/stage</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> _clipInstance;<br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _loading:<span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>; <span style="color: #808080; font-style: italic;">// set to true if we are currently loading a movieclip</span><br />
&nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _clipInstance:<span style="color: #0066CC;">MovieClip</span> = <span style="color: #000000; font-weight: bold;">null</span>; <span style="color: #808080; font-style: italic;">// will temporarily hold the loaded movieclip</span><br />
&nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _wheel:<span style="color: #0066CC;">MovieClip</span> = <span style="color: #000000; font-weight: bold;">null</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div></div>
<p>A problem with this method is that I&#8217;m using <em>ResourceManager</em> to load the swf and then the movieclip. This means that loading the movieclip is not instantaneous. I did try a different method for this but somehow couldn&#8217;t get the movieclip loaded into PBE.</p>
<h2>Add the component to the level file</h2>
<p>Now that I have a render class (CarRenderComponent). I can add it to any entity with a spatial component. (Please see PBEngineDemo for more info on this)</p>
<div class="codecolorer-container xml mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:640px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;entity</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;car&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;component</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;com.pblabs.box2D.Box2DSpatialComponent&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;CarSpatial&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; ....<br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/component<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">&lt;!-- our render component here --&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;component</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;com.game.renders.CarRenderComponent&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;SWFRender&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;loop<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/loop<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> <span style="color: #808080; font-style: italic;">&lt;!-- set to TRUE. The SWFRenderComponent will destroy the CarMC once it's done playing if this is FALSE --&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;positionReference<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>@CarSpatial.position<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/positionReference<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> <span style="color: #808080; font-style: italic;">&lt;!-- set the spatial's position as the movieclip's position when rendering --&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;scaleFactor<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>0.3<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/scaleFactor<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> <span style="color: #808080; font-style: italic;">&lt;!-- you can resize/scale your MC using this --&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;screenOffset<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> <span style="color: #808080; font-style: italic;">&lt;!-- or you can offset it's render position from the @CarSpatial.position --&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;x<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/x<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;y<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>20<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/y<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/screenOffset<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/component<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/entity<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div>
<p>One thing I noticed was the properties &lt;sizeReference&gt; and &lt;rotationReference&gt; didn&#8217;t seem to have any effect on the render. I&#8217;ll have look at that another time. Maybe I&#8217;m just missing something.</p>
<p>That&#8217;s it. I was happy enough to see the movieclip embedded, rendered and animated on the scene. Hopefully, this will be of help to someone.</p><img src="http://feeds.feedburner.com/~r/shikii/OfdV/~4/2uq9-ltspsU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://shikii.net/blog/experiment-using-swf-movieclips-in-pushbutton-engine/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<feedburner:origLink>http://shikii.net/blog/experiment-using-swf-movieclips-in-pushbutton-engine/</feedburner:origLink></item>
		<item>
		<title>Zend Studio (Eclipse) Remote Editing through a secure proxy</title>
		<link>http://feedproxy.google.com/~r/shikii/OfdV/~3/paQheWo4Rj4/</link>
		<comments>http://shikii.net/blog/zend-studio-eclipse-remote-editing-through-a-secure-proxy/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 15:47:05 +0000</pubDate>
		<dc:creator>Shiki</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[putty]]></category>
		<category><![CDATA[remote-editing]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[tunnel]]></category>
		<category><![CDATA[zend-studio]]></category>

		<guid isPermaLink="false">http://shikii.net/blog/?p=11</guid>
		<description><![CDATA[Remote Editing in Zend Studio for Eclipse has to be one of the biggest reasons why I use it in my current job. I work from home and our team&#8217;s development environment is securely setup on a Linux server with a firewall open only to specific IP addresses. This is a no biggie if my [...]]]></description>
			<content:encoded><![CDATA[<p>Remote Editing in Zend Studio for Eclipse has to be one of the biggest reasons why I use it in my current job. I work from home and our team&#8217;s development environment is securely setup on a Linux server with a firewall open only to specific IP addresses. This is a no biggie if my IP address never changes or if I work only in one place. Unfortunately, that&#8217;s not the case for my DSL setup &#8212; I get a different IP address everyday. And since I can&#8217;t bug the server admin every time I need to have my IP address added to the firewall, I connect through our proxy server first and then connect to the main development server. The setup&#8217;s kinda like this:</p>
<p style="text-align: center;"><img class="size-full wp-image-16 aligncenter" title="Local Machine to Proxy Server to Development Server setup" src="http://shikii.net/blog/wp-content/uploads/2009/08/zendstudioproxy.jpg" alt="Local Machine to Proxy Server to Development Server setup" width="640" /></p>
<p>The problem now is Zend Studio doesn&#8217;t seem to support this kind of setup. At least, that&#8217;s what I concluded after so many hours of googling. Then I found this super awesome <a href="http://paulstamatiou.com/how-to-surf-securely-with-ssh-tunnel">article</a>. We can use Putty! Or just plain ol&#8217; Terminal on a Mac (Linux should be the same I think).<span id="more-11"></span></p>
<h2>Tools needed</h2>
<p>Of course you need Zend Studio for Eclipse. You just need <a href="http://www.putty.org/">Putty</a> if you&#8217;re on Windows. You&#8217;ll just need the already available/installed Terminal on a Mac (it&#8217;s in <em>Applications &gt; Utilities</em>).</p>
<h2>Proxy setup</h2>
<p>Open up Putty/Terminal. Enter this into the console:</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:640px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ssh -D 8080 username@proxydomain.com</div></div>
<p>The &#8220;8080&#8243; should be an unused port on your machine. In most cases, port 8080 is fine. The &#8220;username&#8221; should be the user name you need to login to the proxy server (ie proxydomain.com). You should be prompted with the password after entering this command. This will create a tunnel on the port 8080 where all HTTP traffic will go through the proxy server. That is, if an application uses the port 8080 as a proxy. This won&#8217;t have any effect on your current applications (i.e. browsers) unless you modify your settings to use this proxy. Please note that you&#8217;ll have to keep the terminal window open so your proxy session won&#8217;t be destroyed. There are probably other ways to make it work without the window left open but I&#8217;m content with this.</p>
<h2>Modifying Zend Studio settings</h2>
<p>Since we now have a proxy available, we need to instruct Zend Studio to use it.</p>
<ol>
<li>Open Zend Studio.</li>
<li>Go to Preferences (located under the <em>Application</em> menu on Mac and under <em>Window</em> on Windows)</li>
<li>Navigate to <em>General &gt; Network Connections</em></li>
<li>Set the proxy setting to <em>Manual proxy configuration</em>. And enter <strong>127.0.0.1</strong> in the SOCKS proxy field and <strong>8080</strong> on the Port field beside that.</li>
</ol>
<p>Your setup should look something like this:</p>
<div id="attachment_19" class="wp-caption aligncenter" style="width: 650px"><img class="size-full wp-image-19" title="Zend Studio Network Settings" src="http://shikii.net/blog/wp-content/uploads/2009/08/Preferences-1.jpg" alt="Zend Studio Network Settings" width="610" /><p class="wp-caption-text">Zend Studio Network Settings</p></div>
<p>Save the settings and you should be ready to open up a connection to the target server (in this case, the main development server). Create a remote connection to your target server like you normally would. I couldn&#8217;t discuss that here but <a href="http://files.zend.com/help/Zend-Studio-Eclipse/remote_systems_view.htm">this</a> might help.</p>
<h3>Other References</h3>
<ul>
<li><a href="http://paulstamatiou.com/how-to-surf-securely-with-ssh-tunnel">How To: Surf Securely with an SSH Tunnel</a></li>
<li><a href="http://www.linuxjournal.com/content/use-ssh-create-http-proxy">Use SSH to Create an HTTP Proxy</a></li>
<li><a href="http://blogs.techrepublic.com.com/security/?p=421">Use PuTTY as a secure proxy on Windows</a></li>
<li><a href="http://files.zend.com/help/Zend-Studio-Eclipse/remote_systems_view.htm">Zend Studio Remote Systems View</a></li>
</ul><img src="http://feeds.feedburner.com/~r/shikii/OfdV/~4/paQheWo4Rj4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://shikii.net/blog/zend-studio-eclipse-remote-editing-through-a-secure-proxy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://shikii.net/blog/zend-studio-eclipse-remote-editing-through-a-secure-proxy/</feedburner:origLink></item>
		<item>
		<title>Installing the missing Extract feature in Photoshop CS4</title>
		<link>http://feedproxy.google.com/~r/shikii/OfdV/~3/DJn9hdYHVsI/</link>
		<comments>http://shikii.net/blog/installing-the-missing-extract-feature-in-photoshop-cs4/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 12:37:27 +0000</pubDate>
		<dc:creator>Shiki</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[cs4]]></category>
		<category><![CDATA[extract]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://shikii.net/blog/?p=3</guid>
		<description><![CDATA[
Yeah so I&#8217;m a little late on this. Primarily because I&#8217;m no designer and I don&#8217;t use Photoshop that much. But I just found out that the Extract filter has been removed from CS4. Or maybe CS3 too? I didn&#8217;t notice until I needed to use it at work today where I just had to [...]]]></description>
			<content:encoded><![CDATA[<div class="wide"><img class="alignnone size-full wp-image-4" title="Extract Filter in Adobe Photoshop CS4" src="http://shikii.net/blog/wp-content/uploads/2009/08/extractfilter.jpg" alt="Extract Filter in Adobe Photoshop CS4" width="640" /></div>
<p>Yeah so I&#8217;m a little late on this. Primarily because I&#8217;m no designer and I don&#8217;t use Photoshop that much. But I just found out that the Extract filter has been removed from CS4. Or maybe CS3 too? I didn&#8217;t notice until I needed to use it at work today where I just had to take out some cats and dogs out of their backgrounds.</p>
<p>So, with some googling I found <a href="http://blogs.adobe.com/jnack/2008/10/where_did_extra.html">this article</a> by John Nack. There he explains why they took Extract and other filters/plugins away. I still wish they retained Extract though, it&#8217;s kinda useful for us noob Photoshop users :p Thankfully you can still install the missing features. Just follow these steps:</p>
<ol>
<li>Download the plugins package. Download <a href="http://www.adobe.com/support/downloads/detail.jsp?ftpID=4047">here</a> for Mac, and <a href="http://www.adobe.com/support/downloads/detail.jsp?ftpID=4048">here</a> for Windows.</li>
<li>In the package you should find 3 language folders. Open the one you need (ie English) and copy the child folder named <strong>Goodies</strong> and paste it somewhere safe like the Photoshop application folder. That&#8217;s /Applications/Adobe Photoshop CS4 for Mac and somewhere in C:/Program Files/ for Windows (sorry I can&#8217;t be too precise).</li>
<li>Open Photoshop. Go to Preferences &gt; Plug-Ins. Find a setting named <strong>Additional Plug-Ins Folder</strong> and set that to the Goodies folder.</li>
<li>Restart Photoshop.</li>
</ol>
<p>That should do it.</p><img src="http://feeds.feedburner.com/~r/shikii/OfdV/~4/DJn9hdYHVsI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://shikii.net/blog/installing-the-missing-extract-feature-in-photoshop-cs4/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://shikii.net/blog/installing-the-missing-extract-feature-in-photoshop-cs4/</feedburner:origLink></item>
	</channel>
</rss>
