<?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>Nicholas Workshop &#124; Nicholas Workshop</title>
	<atom:link href="http://nicholasworkshop.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://nicholasworkshop.com</link>
	<description>Just a Brilliant Workshop</description>
	<lastBuildDate>Tue, 02 Apr 2013 16:13:34 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Save Terminal from Process Completed in Mac OSX</title>
		<link>http://nicholasworkshop.com/2013/03/30/save-terminal-from-process-completed-in-mac-osx/</link>
		<comments>http://nicholasworkshop.com/2013/03/30/save-terminal-from-process-completed-in-mac-osx/#comments</comments>
		<pubDate>Sun, 31 Mar 2013 03:46:48 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Shell Script]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[4.1]]></category>
		<category><![CDATA[4.2]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[complete]]></category>
		<category><![CDATA[how]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[os]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[process completed]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[version]]></category>

		<guid isPermaLink="false">http://nicholasworkshop.com/?p=750</guid>
		<description><![CDATA[Solution with Minimal Explanations Go to the detailed explanations. What&#8217;s happening One day, when I opened up terminal as usual, it showed [Process completed] and just terminated. I could not type any thing, run any scripts and work on my project. Even worse, this made me unable to install programs into &#8230;]]></description>
				<content:encoded><![CDATA[<h2>Solution with Minimal Explanations</h2>
<p><a href="#save-terminal-detailed">Go to the detailed explanations.</a></p>
<hr style="margin: 0px; visibility: hidden;" />
<h3>What&#8217;s happening</h3>
<p><div id="attachment_751" class="wp-caption alignright" style="width: 310px"><a href="http://i1.wp.com/nicholasworkshop.com/wordpress/wp-content/uploads/2013/03/Screen-Shot-2013-03-30-at-10.58.34-PM.png"><img class="size-medium wp-image-751 " alt="Terminal Showing [Process Completed]" src="http://i1.wp.com/nicholasworkshop.com/wordpress/wp-content/uploads/2013/03/Screen-Shot-2013-03-30-at-10.58.34-PM.png?resize=300%2C210" data-recalc-dims="1" /></a><p class="wp-caption-text">Terminal Showing [Process Completed]</p></div>One day, when I opened up terminal as usual, it showed [Process completed] and just terminated. I could not type any thing, run any scripts and work on my project. Even worse, this made me unable to install programs into my computer because many installations need to run shell scripts.</p>
<p>Okay, I searched over the internet and there was no solution for that. I even peaked many parts in the Mac OSX system to see if there were any mis-configuration, of course nothing helps. After all, I though if there is nothing wrong, it must be  something done with my /bin/bash. And after I upgraded my bash, my lovely terminal came back!</p>
<hr style="margin: 0px; visibility: hidden;" />
<h3>Change shell&#8217;s default execution</h3>
<div id="attachment_758" class="wp-caption alignright" style="width: 310px"><a href="http://i2.wp.com/nicholasworkshop.com/wordpress/wp-content/uploads/2013/03/Screen-Shot-2013-03-30-at-11.32.31-PM.png"><img class="size-medium wp-image-758 " alt="Change What Shell Opens" src="http://i2.wp.com/nicholasworkshop.com/wordpress/wp-content/uploads/2013/03/Screen-Shot-2013-03-30-at-11.32.31-PM.png?resize=300%2C258" data-recalc-dims="1" /></a><p class="wp-caption-text">Change What Shell Opens</p></div>
<p>The truth is, when you open terminal, it execute /bin/bash. As it is not working now, we need another environment for us to execute stuff. Open &#8220;Terminal-&gt;Preference&#8221;, and change &#8220;Shells open with&#8221; manually to &#8220;/bin/sh&#8221;.</p>
<hr style="margin: 0px; visibility: hidden;" />
<h3>Update /bin/bash</h3>
<p>Now we are going to download the latest version of bash and replace the old one. Open up a new terminal and now you are able to execute commands. Copy and paste the following codes into the terminal, they will automatically handle everything for you.</p>
<pre class="brush: bash; title: ; notranslate">
curl -LO ftp://ftp.cwru.edu/pub/bash/bash-4.2.tar.gz
tar zxvf bash-4.2.tar.gz
cd bash-4.2
./configure &amp;&amp; make &amp;&amp; sudo make install
chsh -s /usr/local/bin/bash {user_name}
sudo bash -c &quot;echo /usr/local/bin/bash &gt;&gt; /private/etc/shells&quot;
cd /bin
sudo mv bash bash-old
sudo ln -s /usr/local/bin/bash bash
</pre>
<hr style="margin: 0px; visibility: hidden;" />
<h3>Once done</h3>
<p>Go to &#8220;Terminal-&gt;Preference&#8221; again and change :Shells open with: back to &#8220;Default login shell&#8221;. Enjoy!</p>
<hr id="save-terminal-detailed" style="margin: 0px; visibility: hidden;" />
<h2>Solution in Detailed</h2>
<hr style="margin: 0px; visibility: hidden;" />
<h3>What I did?</h3>
<p>Okay, I admit that I did something to the system sometimes ago. I was doing some experiments on &#8220;sandboxing&#8221; and played with &#8220;chroot jail&#8221; stuff before. That is, I need to create an environment with restricted support to the program I run. So I wrote a sandbox, configured it&#8217;s root to a &#8216;secure&#8217; place (anywhere not the actual root), and copy essential executables to that new root. Well, so far I think I didn&#8217;t do anything harm to the system, but I might corrupt the /bin/bash when I copied it to the sandbox root.</p>
<hr style="margin: 0px; visibility: hidden;" />
<h3>Diagnosis</h3>
<div id="attachment_760" class="wp-caption alignright" style="width: 310px"><a href="http://i2.wp.com/nicholasworkshop.com/wordpress/wp-content/uploads/2013/03/Screen-Shot-2013-03-31-at-12.02.04-AM.png"><img class="size-medium wp-image-760 " alt="Playing with Shell" src="http://i2.wp.com/nicholasworkshop.com/wordpress/wp-content/uploads/2013/03/Screen-Shot-2013-03-31-at-12.02.04-AM.png?resize=300%2C210" data-recalc-dims="1" /></a><p class="wp-caption-text">Playing with Shell</p></div>
<p>Shell will run the following files before letting user to do anything. Check everyone to see if there are any misconfigurations.</p>
<ul>
<li>~/.bash_profile (for /bin/bash)</li>
<li>~/.profile (for /bin/sh)</li>
<li>/etc/profile (for /bin/sh)</li>
<li>/etc/bashrc (for /bin/bash)</li>
<li>(google for more)</li>
</ul>
<p>To play with, add some echoes to see if they works. Btw, I love nano more than vi, so try out &#8220;sudo nano /etc/bashrc&#8221;.</p>
<hr style="margin: 0px; visibility: hidden;" />
<h3>Another thing</h3>
<p>The code above updates your bash to version 4.2. To check if there is any new version, go to the ftp.<br />
<a href="ftp://ftp.cwru.edu/pub/bash/">ftp://ftp.cwru.edu/pub/bash/</a></p>
<hr style="margin: 0px; visibility: hidden;" />
<h3>Reference</h3>
<p><a href=" http://techscienceinterest.blogspot.com/2010/05/change-to-new-bash-shell-41-for-mac-os.html">http://techscienceinterest.blogspot.com/2010/05/change-to-new-bash-shell-41-for-mac-os.html</a></p>
<hr style="margin: 0px; visibility: hidden;" />
]]></content:encoded>
			<wfw:commentRss>http://nicholasworkshop.com/2013/03/30/save-terminal-from-process-completed-in-mac-osx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Redesigning homepage</title>
		<link>http://nicholasworkshop.com/2013/03/05/redesigning-homepage/</link>
		<comments>http://nicholasworkshop.com/2013/03/05/redesigning-homepage/#comments</comments>
		<pubDate>Tue, 05 Mar 2013 16:49:04 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://nicholasworkshop.com/?p=743</guid>
		<description><![CDATA[scratching, drawing and writing lol]]></description>
				<content:encoded><![CDATA[<p>scratching, drawing and writing lol</p>

<a rel='attachment' href='http://nicholasworkshop.com/2013/03/05/redesigning-homepage/dsc06247/' title='DSC06247'><img src="http://i2.wp.com/nicholasworkshop.com/wordpress/wp-content/uploads/2013/03/DSC06247-e1362502102241.jpg?resize=150%2C150" class="attachment-thumbnail" alt="Redesigning..." /></a>

]]></content:encoded>
			<wfw:commentRss>http://nicholasworkshop.com/2013/03/05/redesigning-homepage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>External directory in Xampp (Apache)</title>
		<link>http://nicholasworkshop.com/2013/01/11/external-directory-in-xampp-apache/</link>
		<comments>http://nicholasworkshop.com/2013/01/11/external-directory-in-xampp-apache/#comments</comments>
		<pubDate>Sat, 12 Jan 2013 04:59:57 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nicholasworkshop.com/?p=736</guid>
		<description><![CDATA[For both server and website developing, I usually use Xampp&#8217;s Apache to create a localhost server. However, I hate to put my important files in the htdocs inside Apache. Instead I would rather put the folder inside Documents, and make a link to htdocs. First, create a symbolic link from &#8230;]]></description>
				<content:encoded><![CDATA[<p>For both server and website developing, I usually use Xampp&#8217;s Apache to create a localhost server. However, I hate to put my important files in the htdocs inside Apache. Instead I would rather put the folder inside Documents, and make a link to htdocs.</p>
<p>First, create a symbolic link from your actual folder to htdocs. For example, ln -s /Users/Nicholas/Documents/Xampp\ Workspace /Applications/Xampp/xamppfiles/htdocs/nicholas.</p>
<p>&lt;Image Pending&gt;</p>
<p>However, this is not done because the owner of your directory is Nicholas, but not &#8220;nobody&#8221;. Also, we cannot change the folder&#8217;s owner to nobody as this is actually an illegal owner. So what we gonna do is add Nicholas as the user in Apache. [Caution: This can actually create a security issue on your computer, since now the Xampp can access files of the user Nicholas]<br />
&lt;Image Pending&gt;</p>
<p>To do that, add &#8220;user Nicholas&#8221; to the end /Applications/Xampp/xamppfiles/etc/httpd.conf. Then restart Xampp.<br />
&lt;Image Pending&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://nicholasworkshop.com/2013/01/11/external-directory-in-xampp-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Portifilio</title>
		<link>http://nicholasworkshop.com/2013/01/11/my-portifilio/</link>
		<comments>http://nicholasworkshop.com/2013/01/11/my-portifilio/#comments</comments>
		<pubDate>Fri, 11 Jan 2013 16:02:02 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://nicholasworkshop.com/?p=714</guid>
		<description><![CDATA[Actually, this website was my portfolio webpage before becoming a wordpress. It is moved to here: nicholasworkshop.com/portfolio. Using wordpress, I put the old webpage aside and always forgot to transfer the information from it to the front page. Anyway, I hope this can remind me of the projects and webpages I created.]]></description>
				<content:encoded><![CDATA[<p>Actually, this website was my portfolio webpage before becoming a wordpress. It is moved to here: <a href="http://nicholasworkshop.com/portfolio/">nicholasworkshop.com/portfolio</a>. Using wordpress, I put the old webpage aside and always forgot to transfer the information from it to the front page. Anyway, I hope this can remind me of the projects and webpages I created.</p>
]]></content:encoded>
			<wfw:commentRss>http://nicholasworkshop.com/2013/01/11/my-portifilio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Take a Screenshot on BlackBerry PlayBook</title>
		<link>http://nicholasworkshop.com/2012/09/06/how-to-take-a-screenshot-on-blackberry-playbook/</link>
		<comments>http://nicholasworkshop.com/2012/09/06/how-to-take-a-screenshot-on-blackberry-playbook/#comments</comments>
		<pubDate>Thu, 06 Sep 2012 02:38:50 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[blackberry]]></category>
		<category><![CDATA[blackberry playbook]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[capture]]></category>
		<category><![CDATA[capture screen]]></category>
		<category><![CDATA[down]]></category>
		<category><![CDATA[hold]]></category>
		<category><![CDATA[how]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[picture]]></category>
		<category><![CDATA[playbook]]></category>
		<category><![CDATA[screenshot]]></category>
		<category><![CDATA[shutter]]></category>
		<category><![CDATA[shutter sound]]></category>
		<category><![CDATA[up]]></category>
		<category><![CDATA[volume]]></category>

		<guid isPermaLink="false">http://nicholasworkshop.com/?p=706</guid>
		<description><![CDATA[To capture screen in BlackBerry PlayBook, just hold the volume Up and Down buttons together. After a camera shutter sound, a screen image in the format JPG will be saved in Pictures &#62; Camera folder.]]></description>
				<content:encoded><![CDATA[<p>To capture screen in BlackBerry PlayBook, just hold the volume <strong>Up</strong> and <strong>Down</strong> buttons together. After a <strong>camera shutter sound</strong>, a screen image in the format JPG will be saved in <strong>Pictures </strong>&gt; <strong>Camera </strong>folder.</p>
<p><a href="http://i1.wp.com/nicholasworkshop.com/wp-content/uploads/2012/09/blackberry-playbook.jpg"><img class="aligncenter size-full wp-image-707" title="blackberry-playbook" src="http://i1.wp.com/nicholasworkshop.com/wp-content/uploads/2012/09/blackberry-playbook.jpg?resize=660%2C495" alt="" data-recalc-dims="1" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://nicholasworkshop.com/2012/09/06/how-to-take-a-screenshot-on-blackberry-playbook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>InstaMusic Beta is Coming!</title>
		<link>http://nicholasworkshop.com/2012/08/14/instamusic-beta-is-coming/</link>
		<comments>http://nicholasworkshop.com/2012/08/14/instamusic-beta-is-coming/#comments</comments>
		<pubDate>Tue, 14 Aug 2012 06:50:42 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[InstaMusic]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[beta channel]]></category>
		<category><![CDATA[instamusic]]></category>
		<category><![CDATA[instamusic beta]]></category>
		<category><![CDATA[jelly bean]]></category>
		<category><![CDATA[loading speed]]></category>
		<category><![CDATA[music stops]]></category>
		<category><![CDATA[play store]]></category>
		<category><![CDATA[stability]]></category>

		<guid isPermaLink="false">http://nicholasworkshop.com/?p=695</guid>
		<description><![CDATA[Hi there, its been a long time that InstaMusic haven&#8217;t been updated. Sorry for that because I had been so busy in working on a game project in my company. Anyway, I am quitting for the sake of pursuing a master degree. And finally I have time to implement what I thought &#8230;]]></description>
				<content:encoded><![CDATA[<p>Hi there, its been a long time that InstaMusic haven&#8217;t been updated. Sorry for that because I had been so busy in working on a game project in my company. Anyway, I am quitting for the sake of pursuing a master degree. And finally I have time to implement what I thought up and designed!</p>
<p>An new application &#8220;InstaMusic Beta Channel&#8221; will show up in Android Play Store soon. This application aims to provide a cutting-edge version of InstaMusic. This app could be unstable, lots of force closes, however this helps me kill bugs in the program. For those who only wants a stable music playback, please download the original &#8220;InstaMusic&#8221;.</p>
<p>As a new version is coming out, I have created a feature list presenting the main improvements done or working on.</p>
<ol>
<li><strong>Stability</strong><br />
InstaMusic has been unstable for a long time. Music stops suddenly without telling. After a deep diagnosis, the core reason leading this bug is found, and a fix is patched! Music never stops now!</li>
<li><strong>Loading Speed</strong><br />
Media loading speed has been a big concern for me while generating the music list. Long loading time affects user experience and might hinder other operations. Anyway, I have designed a new architecture specially for the list generation. This assured an optimised, low memory usage, synchronised and dynamic list generation.</li>
<li><strong>Jelly Bean Support <del>(Working in Progress) </del></strong><br />
There are lots of new features and supports from platforms beginning from Android 4.0 such as notification controls and new theme styles. I am working on making use of those new features and to create a whole new user experience for users!</li>
<li><strong>Editable Playlists integrating with Favourite List<strong> (Working in Progress)</strong></strong><br />
In the next version of InstaMusic, Favorite List will be integrated into Playlist. The reason is&#8230; actually there is no reason to separate them lol.</li>
</ol>
<p>Thank you for your supporting so far. Please comment below and tell me what you think on InstaMusic!</p>
]]></content:encoded>
			<wfw:commentRss>http://nicholasworkshop.com/2012/08/14/instamusic-beta-is-coming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Capitalizing Words in Javascript</title>
		<link>http://nicholasworkshop.com/2012/05/23/capitalizing-words-in-javascript/</link>
		<comments>http://nicholasworkshop.com/2012/05/23/capitalizing-words-in-javascript/#comments</comments>
		<pubDate>Wed, 23 May 2012 10:06:49 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[cap]]></category>
		<category><![CDATA[capitalize]]></category>
		<category><![CDATA[capitalizing]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[first letter]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[hello world]]></category>
		<category><![CDATA[how]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[letter]]></category>
		<category><![CDATA[lower]]></category>
		<category><![CDATA[lower case]]></category>
		<category><![CDATA[upper]]></category>
		<category><![CDATA[upper case]]></category>
		<category><![CDATA[word]]></category>
		<category><![CDATA[words]]></category>

		<guid isPermaLink="false">http://nicholasworkshop.wordpress.com/?p=555</guid>
		<description><![CDATA[This is a very old draft stuck at the bottom of my draft list. lol Making it as a function, we can do this.]]></description>
				<content:encoded><![CDATA[<p>This is a very old draft stuck at the bottom of my draft list. lol</p>
<pre class="brush: jscript; title: ; notranslate">
var str = &quot;hello world&quot;;
str = str.toLowerCase().replace(/b[a-z]/g, function(letter) {
    return letter.toUpperCase();
});
alert(str); //Displays &quot;Hello World&quot;
</pre>
<p>Making it as a function, we can do this.</p>
<pre class="brush: jscript; title: ; notranslate">
function capitalize(str) {
    return str.toLowerCase().replace(/b[a-z]/g, function(letter) {
        return letter.toUpperCase();
    });
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://nicholasworkshop.com/2012/05/23/capitalizing-words-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Take a Screenshot on Samsung Galaxy S2 after the Upgrade to Ice Cream Sandwich</title>
		<link>http://nicholasworkshop.com/2012/05/20/take-a-screenshot-on-samsung-galaxy-s2-after-the-upgrade-to-ice-cream-sandwich/</link>
		<comments>http://nicholasworkshop.com/2012/05/20/take-a-screenshot-on-samsung-galaxy-s2-after-the-upgrade-to-ice-cream-sandwich/#comments</comments>
		<pubDate>Sat, 19 May 2012 17:34:27 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[2x]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[4.0]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[capture]]></category>
		<category><![CDATA[capture screen]]></category>
		<category><![CDATA[cha]]></category>
		<category><![CDATA[cha cha]]></category>
		<category><![CDATA[galaxy]]></category>
		<category><![CDATA[galaxy s2]]></category>
		<category><![CDATA[home]]></category>
		<category><![CDATA[home button]]></category>
		<category><![CDATA[how]]></category>
		<category><![CDATA[htc]]></category>
		<category><![CDATA[htc cha cha]]></category>
		<category><![CDATA[ice cream sandwich]]></category>
		<category><![CDATA[ics]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[lg]]></category>
		<category><![CDATA[lg optimus 2x]]></category>
		<category><![CDATA[lg optimus 3d]]></category>
		<category><![CDATA[magic key]]></category>
		<category><![CDATA[optimus]]></category>
		<category><![CDATA[power]]></category>
		<category><![CDATA[power button]]></category>
		<category><![CDATA[press and hold home and tap the power button]]></category>
		<category><![CDATA[s2]]></category>
		<category><![CDATA[samsung]]></category>
		<category><![CDATA[samsung galaxy s2]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[screenshot]]></category>
		<category><![CDATA[snapshot]]></category>

		<guid isPermaLink="false">http://nicholasworkshop.com/?p=656</guid>
		<description><![CDATA[Thank you for checking out this tutorial. Reading the discussions in this post, seems like there is quite a number of people having troubles to take screenshots with Galaxy S2. To clear any confusions, I summarized some information and added as followings. Hope you could make it too. Fingers crossed. &#8230;]]></description>
				<content:encoded><![CDATA[<p>Thank you for checking out this tutorial. Reading the discussions in this post, seems like there is quite a number of people having troubles to take screenshots with Galaxy S2. To clear any confusions, I summarized some information and added as followings. Hope you could make it too. Fingers crossed.</p>
<p><strong>First, make sure your Galaxy S2 is running Android version 4 or above.</strong></p>
<p><strong>Volume Down + Power Key will work fine.<br />
Press both keys at the same time gently. In about 1 second, screen capture would be done. A notification and an animation would be shown too.</strong></p>
<p>Edited on 12 July.</p>
<hr />
<p><strong>Press and hold power and volume down button together. </strong>This is the way to take screenshot in the new Android system 4.0 Ice Cream Sandwich. After the Samsung Galaxy S2 updated to this new version, it uses this method instead of the way mentioned in my <a href="http://nicholasworkshop.com/2011/08/14/take-a-screenshot-on-samsung-galaxy-s2/">old post</a>.</p>
<p><a href="http://i1.wp.com/nicholasworkshop.com/wp-content/uploads/2012/05/how-to-take-screenshot-in-ics.jpg"><img class="aligncenter size-full wp-image-657" title="how-to-take-screenshot-in-ics" src="http://i1.wp.com/nicholasworkshop.com/wp-content/uploads/2012/05/how-to-take-screenshot-in-ics.jpg?resize=660%2C495" alt="" data-recalc-dims="1" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://nicholasworkshop.com/2012/05/20/take-a-screenshot-on-samsung-galaxy-s2-after-the-upgrade-to-ice-cream-sandwich/feed/</wfw:commentRss>
		<slash:comments>81</slash:comments>
		</item>
		<item>
		<title>Finally, the blog moved back to nicholasworkshop.com!</title>
		<link>http://nicholasworkshop.com/2012/05/19/finally-the-blog-moved-back-to-nicholasworkshop-com/</link>
		<comments>http://nicholasworkshop.com/2012/05/19/finally-the-blog-moved-back-to-nicholasworkshop-com/#comments</comments>
		<pubDate>Sat, 19 May 2012 15:10:51 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nicholasworkshop.com/?p=650</guid>
		<description><![CDATA[Today, I moved my nicholasworkshop.wordpress.com to my owned domain nicholasworkshop.com, integrated with my old portfolio website. Thanks to my subscribers, my blog has been having a steady viewing rate over time. However, all those traffics went to wordpress.com as the blog was hosted there. To redirect them back to my domain, I &#8230;]]></description>
				<content:encoded><![CDATA[<p>Today, I moved my <a href="http://nicholasworkshop.wordpress.com">nicholasworkshop.wordpress.com</a> to my owned domain <a href="http://nicholasworkshop.com">nicholasworkshop.com</a>, integrated with my old portfolio website. Thanks to my subscribers, my blog has been having a steady viewing rate over time. However, all those traffics went to wordpress.com as the blog was hosted there. To redirect them back to my domain, I have been preparing the things needed for a long time.</p>
<p>As a record, I had my blog in <a href="http://nicholasworkshop.blogspot.com">BlogSpot</a> and <a href="http://nicholasworkshop.wordpress.com">WordPress</a> before, and now they are redirected to <a href="http://nicholasworkshop.com">nicholasworkshop</a>.</p>
<p>Anyways, it is finally here and thank you for checking out my blog!</p>
]]></content:encoded>
			<wfw:commentRss>http://nicholasworkshop.com/2012/05/19/finally-the-blog-moved-back-to-nicholasworkshop-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find the User Agent Strings of any Mobile Devices</title>
		<link>http://nicholasworkshop.com/2012/02/03/find-the-user-agent-strings-of-any-mobile-devices/</link>
		<comments>http://nicholasworkshop.com/2012/02/03/find-the-user-agent-strings-of-any-mobile-devices/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 03:08:37 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Website]]></category>
		<category><![CDATA[agent]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[determine]]></category>
		<category><![CDATA[develop]]></category>
		<category><![CDATA[device broswer]]></category>
		<category><![CDATA[device browser]]></category>
		<category><![CDATA[explorer]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[galaxy]]></category>
		<category><![CDATA[how]]></category>
		<category><![CDATA[information]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[mobile device]]></category>
		<category><![CDATA[samsung]]></category>
		<category><![CDATA[scientia]]></category>
		<category><![CDATA[scientiamobile]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[string]]></category>
		<category><![CDATA[tera]]></category>
		<category><![CDATA[user]]></category>
		<category><![CDATA[user agent]]></category>
		<category><![CDATA[wurfl]]></category>

		<guid isPermaLink="false">http://nicholasworkshop.wordpress.com/?p=574</guid>
		<description><![CDATA[It&#8217;s quite often for a developer to make use of the user agent to determine what browser does a user used, especially for those who develop web services and websites. Recently I found a website which has a huge database of mobile device information, including the user agent string and &#8230;]]></description>
				<content:encoded><![CDATA[<p>It&#8217;s quite often for a developer to make use of the user agent to determine what browser does a user used, especially for those who develop web services and websites. Recently I found a website which has a huge database of mobile device information, including the user agent string and even the functions supported in the device browser.</p>
<p><a href="http://www.tera-wurfl.com/explore/search.php?action=browse"><strong>ScientiaMobile WURFL Explorer</strong></p>
<p>http://www.tera-wurfl.com/explore/search.php?action=browse</a></p>
<p><a href="http://www.tera-wurfl.com/explore/?action=wurfl_id&amp;id=samsung_gt_i9100_ver1"><strong>Tera-WURFL Explorer &#8211; Samsung GT-9100 (Galaxy SII)</strong></p>
<p>http://www.tera-wurfl.com/explore/?action=wurfl_id&#038;id=samsung_gt_i9100_ver1</a></p>
<p><a href="http://i1.wp.com/nicholasworkshop.com/wp-content/uploads/2012/02/screen-shot-2012-02-03-at-10-58-41-am.png"><img class="aligncenter size-full wp-image-607" title="Screen Shot 2012-02-03 at 10.58.41 AM" src="http://i1.wp.com/nicholasworkshop.com/wp-content/uploads/2012/02/screen-shot-2012-02-03-at-10-58-41-am.png?resize=545%2C341" alt="" data-recalc-dims="1" /></a><a href="http://i2.wp.com/nicholasworkshop.com/wp-content/uploads/2012/02/screen-shot-2012-02-03-at-10-59-25-am.png"><img class="aligncenter size-full wp-image-608" title="Screen Shot 2012-02-03 at 10.59.25 AM" src="http://i2.wp.com/nicholasworkshop.com/wp-content/uploads/2012/02/screen-shot-2012-02-03-at-10-59-25-am.png?resize=545%2C422" alt="" data-recalc-dims="1" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://nicholasworkshop.com/2012/02/03/find-the-user-agent-strings-of-any-mobile-devices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>InstaMusic Got 10,000 Downloads over Lunar New Year!</title>
		<link>http://nicholasworkshop.com/2012/01/22/instamusic-got-10000-downloads-over-lunar-new-year/</link>
		<comments>http://nicholasworkshop.com/2012/01/22/instamusic-got-10000-downloads-over-lunar-new-year/#comments</comments>
		<pubDate>Sun, 22 Jan 2012 05:17:09 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[InstaMusic]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[10000]]></category>
		<category><![CDATA[album]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[android market]]></category>
		<category><![CDATA[android static]]></category>
		<category><![CDATA[androidstatic]]></category>
		<category><![CDATA[develop]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[flattered]]></category>
		<category><![CDATA[how]]></category>
		<category><![CDATA[insta]]></category>
		<category><![CDATA[instamusic]]></category>
		<category><![CDATA[market]]></category>
		<category><![CDATA[minimal]]></category>
		<category><![CDATA[minimalism]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[player]]></category>
		<category><![CDATA[reason]]></category>
		<category><![CDATA[song]]></category>
		<category><![CDATA[started]]></category>
		<category><![CDATA[ten thousand]]></category>

		<guid isPermaLink="false">http://nicholasworkshop.wordpress.com/?p=540</guid>
		<description><![CDATA[Happy lunar new year to all. I am flattered. In less than a month since I put the InstaMusic to the Android Market on 27 Dec 2011, today it has already more than 10,000 downloads. To be honest, I never expected this. If you are uninitialized, InstaMusic is a music player android &#8230;]]></description>
				<content:encoded><![CDATA[<p><img class="alignright  wp-image-556" title="icon" src="http://i2.wp.com/nicholasworkshop.com/wp-content/uploads/2012/01/icon.png?resize=131%2C131" alt="" data-recalc-dims="1" /></p>
<p>Happy lunar new year to all.</p>
<p><strong>I am flattered. In less than a month since I put the InstaMusic to the Android Market on 27 Dec 2011, today it has already more than 10,000 downloads. To be honest, I never expected this.</strong></p>
<p>If you are uninitialized, <strong><a href="https://market.android.com/details?id=com.nicholasworkshop.instamusic">InstaMusic</a></strong> is a music player android application with simple and stylish outlook.</p>
<p>There are all kinda music player in the world, in my opinion, a player with style and an pleasant appearance would always become the famous one. Here I would like to thank you for downloading and trying InstaMusic. Especially<strong> those fans of minimalism who supported me </strong>and<strong> AndroidStatic who gave InstaMusic a pleasant review in the post &#8220;<a href="http://www.androidstatic.com/instamusic-is-a-minimal-slick-music-player-that-you-should-download-now">Instamusic Is A Minimal, Slick Music Player That You Should Download Now</a>&#8220;.</strong></p>
<p>Looking back the day that I began my developmement, the reason for me to kick started is that I was really unstatisfied with the music players on the Android Market. Admittedly, I am a perfectionist and I want every part of a music player to meet user&#8217;s ways of thinking. So, I hate album artworks to be scratched and unable to tell what album is it. I also hate a song sung by different artists will be will be isolated from the album. And millions of things to list.</p>
<p>Okay, let&#8217;s get back to talk about the my next build of InstaMusic. I am sorry for the long waited update. In code level, I really did an upside down on InstaMusic. And as expected, lock screen player is implemented already, but there are just some bug and pressure testing work to do before it can really come out to meet its users.</p>
<p><a href="http://i0.wp.com/nicholasworkshop.com/wp-content/uploads/2012/01/screen-shot-2012-01-22-at-1-11-04-pm.png"><img class="aligncenter size-full wp-image-563" title="Screen Shot 2012-01-22 at 1.11.04 PM" src="http://i0.wp.com/nicholasworkshop.com/wp-content/uploads/2012/01/screen-shot-2012-01-22-at-1-11-04-pm.png?resize=545%2C488" alt="" data-recalc-dims="1" /></a></p>
<p><a href="http://i2.wp.com/nicholasworkshop.com/wp-content/uploads/2012/01/screen-shot-2012-01-22-at-12-30-20-pm.png"><img class="aligncenter size-full wp-image-557" title="Screen Shot 2012-01-22 at 12.30.20 PM" src="http://i2.wp.com/nicholasworkshop.com/wp-content/uploads/2012/01/screen-shot-2012-01-22-at-12-30-20-pm.png?resize=545%2C328" alt="" data-recalc-dims="1" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://nicholasworkshop.com/2012/01/22/instamusic-got-10000-downloads-over-lunar-new-year/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Caffeine on Mac and Ubuntu</title>
		<link>http://nicholasworkshop.com/2012/01/04/caffeine-on-mac-and-ubuntu/</link>
		<comments>http://nicholasworkshop.com/2012/01/04/caffeine-on-mac-and-ubuntu/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 05:03:17 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[caffeine]]></category>
		<category><![CDATA[computer]]></category>
		<category><![CDATA[lock]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[screensaver]]></category>
		<category><![CDATA[sleep]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://nicholasworkshop.wordpress.com/?p=544</guid>
		<description><![CDATA[Caffeine has been a very useful app to instantly disable or enable the screensaver on mac. At least for me, I am using multiple computers in office and all of them except the one I am using will usually get idle. Getting into screensaver, however, is bad sometimes especially I &#8230;]]></description>
				<content:encoded><![CDATA[<p>Caffeine has been a very useful app to instantly disable or enable the screensaver on mac. At least for me, I am using multiple computers in office and all of them except the one I am using will usually get idle. Getting into screensaver, however, is bad sometimes especially I was reading from that screen and type things on another screen, and not to mention the password input after the screen lock. Well anyway, I highly recommend it.</p>
<h1>Mac</h1>
<p>On mac, we can install it easily with the app store.</p>
<p><img class="aligncenter size-full wp-image-546" title="Screen Shot 2012-01-04 at 12.33.56 PM" src="http://i1.wp.com/nicholasworkshop.com/wp-content/uploads/2012/01/screen-shot-2012-01-04-at-12-33-56-pm.png?resize=326%2C259" alt="" data-recalc-dims="1" /><a href="http://i1.wp.com/nicholasworkshop.com/wp-content/uploads/2012/01/screen-shot-2012-01-04-at-12-42-32-pm-1.png"><img class="aligncenter size-full wp-image-545" title="Screen Shot 2012-01-04 at 12.42.32 PM 1" src="http://i1.wp.com/nicholasworkshop.com/wp-content/uploads/2012/01/screen-shot-2012-01-04-at-12-42-32-pm-1.png?resize=545%2C382" alt="" data-recalc-dims="1" /></a></p>
<h1>Ubuntu</h1>
<p>But in ubuntu, it is not available on the software center. But you can still get it through command line. Turn on terminal and input the following one by one.</p>
<pre class="brush: bash; title: ; notranslate">
sudo add-apt-repository ppa:caffeine-developers/ppa
sudo apt-get update
sudo apt-get install caffeine
</pre>
<p><a href="http://i0.wp.com/nicholasworkshop.com/wp-content/uploads/2012/01/screen-shot-2012-01-04-at-12-59-19-pm.png"><img class="aligncenter size-full wp-image-549" title="Screen Shot 2012-01-04 at 12.59.19 PM" src="http://i0.wp.com/nicholasworkshop.com/wp-content/uploads/2012/01/screen-shot-2012-01-04-at-12-59-19-pm.png?resize=343%2C184" alt="" data-recalc-dims="1" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://nicholasworkshop.com/2012/01/04/caffeine-on-mac-and-ubuntu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Detecting browsers of iPhone, iPod, iPad, Android and BlackBerry with JavaScript and PHP</title>
		<link>http://nicholasworkshop.com/2011/12/09/detecting-browsers-of-iphone-ipod-ipad-android-and-blackberry-with-javascript-and-php/</link>
		<comments>http://nicholasworkshop.com/2011/12/09/detecting-browsers-of-iphone-ipod-ipad-android-and-blackberry-with-javascript-and-php/#comments</comments>
		<pubDate>Thu, 08 Dec 2011 17:20:01 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nicholasworkshop.wordpress.com/?p=524</guid>
		<description><![CDATA[To begin with, we need to understand that in the HTTP protocol, browser send its identity called user agent to the server to request the wanted webpage. Every browser has its only unique user agent value, and therefore we can check that value to identify the user browser. So, first &#8230;]]></description>
				<content:encoded><![CDATA[<p>To begin with, we need to understand that in the HTTP protocol, browser send its identity called user agent to the server to request the wanted webpage. Every browser has its only unique user agent value, and therefore we can check that value to identify the user browser. So, first we have to take a look at some examples of user agents of mobile devices.</p>
<p>iPhone user agent</p>
<pre class="brush: plain; title: ; notranslate">
Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3
</pre>
<p>iPod Touch user agent</p>
<pre class="brush: plain; title: ; notranslate">
Mozilla/5.0 (iPod; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/3A101a Safari/419.3
</pre>
<p>iPad user agent</p>
<pre class="brush: plain; title: ; notranslate">
Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10
</pre>
<p>Android user agent</p>
<pre class="brush: plain; title: ; notranslate">
Mozilla/5.0 (Linux; U; Android 1.1; en-gb; dream) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2
Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17
</pre>
<p>BlackBerry user agent</p>
<pre class="brush: plain; title: ; notranslate">
BlackBerry9000/4.6.0.266 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/120
</pre>
<p>After all, in programming, we gather these data to do the checking. First in JavaScript:</p>
<pre class="brush: jscript; title: ; notranslate">
if (/(iPhone|iPod|iPad)/.test(navigator.userAgent)) {
    /* This is iOS */
}
if (/Android/.test(navigator.userAgent)) {
    /* This is Android */
}
if (/BlackBerry)/.test(navigator.userAgent)) {
    /* This is BlackBerry */
}
if (/(iPhone|iPod|iPad|BlackBerry|Android)/.test(navigator.userAgent)) {
    /* This is one of the mentioned mobile device browsers */
}
</pre>
<p>And this is how it works in PHP:</p>
<pre class="brush: php; title: ; notranslate">
if (preg_match('/iPhone|iPod|iPad/', $_SERVER['HTTP_USER_AGENT'])) {
    /* This is iOS */
}
if (preg_match('/Android/', $_SERVER['HTTP_USER_AGENT'])) {
    /* This is Android */
}
if (preg_match('/BlackBerry/', $_SERVER['HTTP_USER_AGENT'])) {
    /* This is BlackBerry */
}
if (preg_match('/iPhone|iPod|iPad|BlackBerry|Android/', $_SERVER['HTTP_USER_AGENT'])) {
    /* This is one of the mentioned mobile device browsers */
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://nicholasworkshop.com/2011/12/09/detecting-browsers-of-iphone-ipod-ipad-android-and-blackberry-with-javascript-and-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Show completions and quick help tips in Xcode</title>
		<link>http://nicholasworkshop.com/2011/12/06/show-completions-and-quick-help-tips-in-xcode/</link>
		<comments>http://nicholasworkshop.com/2011/12/06/show-completions-and-quick-help-tips-in-xcode/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 04:18:09 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[Cocos2D]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[?]]></category>
		<category><![CDATA[assist]]></category>
		<category><![CDATA[autocompletion]]></category>
		<category><![CDATA[cmd]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[common task]]></category>
		<category><![CDATA[completion]]></category>
		<category><![CDATA[completions]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[control + command + ?]]></category>
		<category><![CDATA[control + space]]></category>
		<category><![CDATA[ctl]]></category>
		<category><![CDATA[desc]]></category>
		<category><![CDATA[description]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[fatigued]]></category>
		<category><![CDATA[figure]]></category>
		<category><![CDATA[hell]]></category>
		<category><![CDATA[linked]]></category>
		<category><![CDATA[memorize]]></category>
		<category><![CDATA[press]]></category>
		<category><![CDATA[quick help]]></category>
		<category><![CDATA[shortcuts]]></category>
		<category><![CDATA[space]]></category>
		<category><![CDATA[tedious]]></category>
		<category><![CDATA[troublesome]]></category>
		<category><![CDATA[understand]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://nicholasworkshop.wordpress.com/?p=505</guid>
		<description><![CDATA[I know it is troublesome, tedious, or just like hell. Apple has his own way to do a common task. Very often, we need to use the autocompletion in IDE to assist coding so we do not need to memorize the billions of function names. In Eclipse, everything is automatic. A list &#8230;]]></description>
				<content:encoded><![CDATA[<p>I know it is troublesome, tedious, or just like hell. Apple has his own way to do a common task. Very often, we need to use the autocompletion in <a href="http://en.wikipedia.org/wiki/Integrated_development_environment">IDE</a> to assist coding so we do not need to memorize the billions of function names. <strong>In Eclipse, <strong>everything is automatic.</strong></strong> A list of function names linked together with descriptions next to it pops up as soon as you type. <strong>In Xcode, where is it?</strong> Yes, you need to press shortcuts. For the<strong> completions, </strong>press<strong> &#8220;control + space&#8221;</strong>. But, where are the descriptions? It&#8217;s called <strong>&#8220;quick help&#8221;</strong>, press<strong> &#8220;control + command + ?&#8221;</strong> to open it. Look at the figure then you will understand. Good luck for your fatigued fingers.<br />
<a href="http://i0.wp.com/nicholasworkshop.com/wp-content/uploads/2011/12/quick-help-in-xcode1.png"><img class="aligncenter size-full wp-image-510" title="quick-help-in-xcode" src="http://i0.wp.com/nicholasworkshop.com/wp-content/uploads/2011/12/quick-help-in-xcode1.png?resize=545%2C337" alt="" data-recalc-dims="1" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://nicholasworkshop.com/2011/12/06/show-completions-and-quick-help-tips-in-xcode/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to rotate gizmos to fit a game object in Unity</title>
		<link>http://nicholasworkshop.com/2011/11/28/how-to-rotate-gizmos-to-fit-a-game-object-in-unity/</link>
		<comments>http://nicholasworkshop.com/2011/11/28/how-to-rotate-gizmos-to-fit-a-game-object-in-unity/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 09:16:06 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[C Sharp]]></category>
		<category><![CDATA[Game Engine]]></category>
		<category><![CDATA[Unity]]></category>
		<category><![CDATA[csharp]]></category>
		<category><![CDATA[cube]]></category>
		<category><![CDATA[cube in unity]]></category>
		<category><![CDATA[draw wire cube]]></category>
		<category><![CDATA[drawwirecube]]></category>
		<category><![CDATA[fit]]></category>
		<category><![CDATA[game object]]></category>
		<category><![CDATA[gameobject]]></category>
		<category><![CDATA[gameplay]]></category>
		<category><![CDATA[gizmos]]></category>
		<category><![CDATA[gizmos matrix]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[local]]></category>
		<category><![CDATA[local to world matrix]]></category>
		<category><![CDATA[localtoworldmatrix]]></category>
		<category><![CDATA[matrix]]></category>
		<category><![CDATA[matrix of gizmos]]></category>
		<category><![CDATA[object transform]]></category>
		<category><![CDATA[one]]></category>
		<category><![CDATA[position]]></category>
		<category><![CDATA[position scale rotation]]></category>
		<category><![CDATA[rotate]]></category>
		<category><![CDATA[rotation]]></category>
		<category><![CDATA[scale]]></category>
		<category><![CDATA[transform]]></category>
		<category><![CDATA[transparent]]></category>
		<category><![CDATA[unity]]></category>
		<category><![CDATA[unity3d]]></category>
		<category><![CDATA[vector3]]></category>
		<category><![CDATA[vector3 one]]></category>
		<category><![CDATA[vector3 zero]]></category>
		<category><![CDATA[zero]]></category>

		<guid isPermaLink="false">http://nicholasworkshop.wordpress.com/?p=486</guid>
		<description><![CDATA[While you are making a cube in unity which is transparent in gameplay, you would probably want to make it visible only in editor mode with gizmos. However, gizmos doesn&#8217;t rotate with the object transform. So you can use the following tricks to rotate the gizmos to fit your object. &#8230;]]></description>
				<content:encoded><![CDATA[<p>While you are making a cube in unity which is transparent in gameplay, you would probably want to make it visible only in editor mode with gizmos. However, gizmos doesn&#8217;t rotate with the object transform. So you can use the following tricks to rotate the gizmos to fit your object. The code shown is to draw a cube which is totally the same as your object. <strong>By setting up the matrix of gizmos, we can transform gizmos to the local position, scale and rotation.</strong></p>
<pre class="brush: csharp; title: ; notranslate">
Gizmos.color = Color.green;
Gizmos.matrix = transform.localToWorldMatrix;
Gizmos.DrawWireCube(Vector3.zero,Vector3.one);
</pre>
<p><a href="http://i0.wp.com/nicholasworkshop.com/wp-content/uploads/2011/11/gizmos.png"><img class="aligncenter size-full wp-image-490" title="gizmos" src="http://i0.wp.com/nicholasworkshop.com/wp-content/uploads/2011/11/gizmos.png?resize=545%2C389" alt="" data-recalc-dims="1" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://nicholasworkshop.com/2011/11/28/how-to-rotate-gizmos-to-fit-a-game-object-in-unity/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Change author info for old commits in Git</title>
		<link>http://nicholasworkshop.com/2011/11/25/change-author-info-for-old-commits-in-git/</link>
		<comments>http://nicholasworkshop.com/2011/11/25/change-author-info-for-old-commits-in-git/#comments</comments>
		<pubDate>Fri, 25 Nov 2011 12:45:43 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[Shell Script]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Version Control]]></category>
		<category><![CDATA[alter]]></category>
		<category><![CDATA[author]]></category>
		<category><![CDATA[branch]]></category>
		<category><![CDATA[branches]]></category>
		<category><![CDATA[change author]]></category>
		<category><![CDATA[change name]]></category>
		<category><![CDATA[commit]]></category>
		<category><![CDATA[commit filter]]></category>
		<category><![CDATA[commit tree]]></category>
		<category><![CDATA[commits]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[how]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[informaion]]></category>
		<category><![CDATA[name]]></category>
		<category><![CDATA[repo]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[shellscript]]></category>
		<category><![CDATA[system]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[version]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://nicholasworkshop.wordpress.com/?p=449</guid>
		<description><![CDATA[While using hit, it is really usual to have regrets on the commits done, especially the name used. In order to change those information in your repository, open terminal (or cmd in windows), go to the folder of your git repositoy, and run the following commands. Remember, replace &#8220;old_name&#8221;, &#8220;new_name&#8221; &#8230;]]></description>
				<content:encoded><![CDATA[<p>While using hit, it is really usual to have regrets on the commits done, especially the name used. In order to change those information in your repository, open terminal (or cmd in windows), go to the folder of your git repositoy, and run the following commands. <strong>Remember, replace &#8220;old_name&#8221;, &#8220;new_name&#8221; and &#8220;new@email.address&#8221; with your own information.</strong></p>
<pre class="brush: bash; title: ; notranslate">
git filter-branch --commit-filter '
  if [ &amp;quot;$GIT_COMMITTER_NAME&amp;quot; = &amp;quot;old_name&amp;quot; ];
  then
    GIT_COMMITTER_NAME=&amp;quot;new_name&amp;quot;;
    GIT_AUTHOR_NAME=&amp;quot;new_name&amp;quot;;
    GIT_COMMITTER_EMAIL=&amp;quot;new@email.address&amp;quot;;
    GIT_AUTHOR_EMAIL=&amp;quot;new@email.address&amp;quot;;
    git commit-tree &amp;quot;$@&amp;quot;;
  else
    git commit-tree &amp;quot;$@&amp;quot;;
  fi' HEAD
</pre>
]]></content:encoded>
			<wfw:commentRss>http://nicholasworkshop.com/2011/11/25/change-author-info-for-old-commits-in-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ssh with password saved</title>
		<link>http://nicholasworkshop.com/2011/11/23/ssh-with-password-saved/</link>
		<comments>http://nicholasworkshop.com/2011/11/23/ssh-with-password-saved/#comments</comments>
		<pubDate>Wed, 23 Nov 2011 10:07:49 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[Shell Script]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[auth]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[authorize]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[dsa]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[keygen]]></category>
		<category><![CDATA[openssh]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[remote]]></category>
		<category><![CDATA[rsa]]></category>
		<category><![CDATA[sda]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ssh with password saved]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[verification]]></category>
		<category><![CDATA[verify]]></category>

		<guid isPermaLink="false">http://nicholasworkshop.wordpress.com/?p=456</guid>
		<description><![CDATA[Ssh is a very convenient way to remotely command or control other devices. We use ssh to push commits to git server, to access remote server, and even to manipulate the content of our iphones and ipads. However it&#8217;s usually distributing to type your long and elusive password every time. &#8230;]]></description>
				<content:encoded><![CDATA[<p>Ssh is a very convenient way to remotely command or control other devices. We use ssh to push commits to git server, to access remote server, and even to manipulate the content of our iphones and ipads. However it&#8217;s usually distributing to type your long and elusive password every time. Therefore here I would like introduce a way to create a steady relationship between your computer and the remote server you wanna connect with.</p>
<p>The principle is this, ssh connection establishments requires verification using the computer unique key of both devices. in order to simplify this step, we can generate a public key of your computer in advanced and which allows other to identify you. While you put that public key in the remote device as authorized key, you can kinda fast forward the process.</p>
<p>step 1: open terminal and &#8220;ssh-keygen -t dsa&#8221;<br />
step 2: open &#8220;.ssh/id_dsa.pub&#8221; and copy content inside<br />
step 3: open new tab in terminal and ssh server<br />
step 4: paste all content into /home//.ssh/authorized_keys</p>
<p>a@A:~&gt; ssh-keygen -t rsa<br />
a@A:~&gt; ssh b@B mkdir -p .ssh<br />
a@A:~&gt; cat .ssh/id_rsa.pub | ssh b@B &#8216;cat &gt;&gt; .ssh/authorized_keys&#8217;</p>
]]></content:encoded>
			<wfw:commentRss>http://nicholasworkshop.com/2011/11/23/ssh-with-password-saved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Merge 2 unrelated branches in Bazaar</title>
		<link>http://nicholasworkshop.com/2011/11/07/merge-2-unrelated-branches-in-bazaar/</link>
		<comments>http://nicholasworkshop.com/2011/11/07/merge-2-unrelated-branches-in-bazaar/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 05:07:58 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[Bazaar]]></category>
		<category><![CDATA[Shell Script]]></category>
		<category><![CDATA[Version Control]]></category>
		<category><![CDATA[2 entirely unrelated branches]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[bazaar]]></category>
		<category><![CDATA[bazaar merge]]></category>
		<category><![CDATA[branch]]></category>
		<category><![CDATA[branch location]]></category>
		<category><![CDATA[branches]]></category>
		<category><![CDATA[bzr]]></category>
		<category><![CDATA[bzr explorer]]></category>
		<category><![CDATA[bzr merge]]></category>
		<category><![CDATA[cmd]]></category>
		<category><![CDATA[explorer]]></category>
		<category><![CDATA[how]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[latest]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[merge]]></category>
		<category><![CDATA[merge branch]]></category>
		<category><![CDATA[other]]></category>
		<category><![CDATA[r0]]></category>
		<category><![CDATA[revision]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[shell script]]></category>
		<category><![CDATA[shellscript]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[unrelated]]></category>
		<category><![CDATA[version]]></category>

		<guid isPermaLink="false">http://nicholasworkshop.wordpress.com/?p=468</guid>
		<description><![CDATA[To merge 2 entirely unrelated branches or projects, we need to specify 0 as first revision in revision range. Turn on terminal (in Mac) or cmd (in Windows) and get to your project folder. Merge with the following shell script. merge -r0..-1 means to merge from revision 0 to the &#8230;]]></description>
				<content:encoded><![CDATA[<p>To merge 2 entirely unrelated branches or projects, we need to specify 0 as first revision in revision range. Turn on terminal (in Mac) or cmd (in Windows) and get to your project folder. Merge with the following shell script. <code>merge -r0..-1</code> means to merge from revision 0 to the latest revision.</p>
<pre class="brush: bash; title: ; notranslate">
bzr merge [other_branch_location] -r0..-1
</pre>
]]></content:encoded>
			<wfw:commentRss>http://nicholasworkshop.com/2011/11/07/merge-2-unrelated-branches-in-bazaar/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Animated sprites in Cocos2D</title>
		<link>http://nicholasworkshop.com/2011/09/22/animated-sprites-in-cocos2d/</link>
		<comments>http://nicholasworkshop.com/2011/09/22/animated-sprites-in-cocos2d/#comments</comments>
		<pubDate>Thu, 22 Sep 2011 09:41:43 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[Cocos2D]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[animated]]></category>
		<category><![CDATA[animated sprites]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[ccspriteframecache]]></category>
		<category><![CDATA[ccspritesheet]]></category>
		<category><![CDATA[cocos2d]]></category>
		<category><![CDATA[comment]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[how]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[share]]></category>
		<category><![CDATA[sprite]]></category>
		<category><![CDATA[sprites]]></category>

		<guid isPermaLink="false">http://nicholasworkshop.wordpress.com/?p=412</guid>
		<description><![CDATA[I have been working with Cocos2D for a while and I am still a newbie. The way to deal with animations in Cocos2D 1.0.0 &#8211; the stable version currently &#8211; is different from the way before using CCSpriteSheet. Now Cocos2D adapts animations as cache shared in the project using CCSpriteFrameCache. It &#8230;]]></description>
				<content:encoded><![CDATA[<p>I have been working with Cocos2D for a while and I am still a newbie. The way to deal with animations in Cocos2D 1.0.0 &#8211; the stable version currently &#8211; is different from the way before using CCSpriteSheet. <strong>Now Cocos2D adapts animations as cache shared in the project using CCSpriteFrameCache.</strong> It also requires a plist file as well as a texture file.</p>
<p><strong>First</strong>, put the following assets into the project &#8220;Resources&#8221; folder to let the program use.</p>
<ul>
<li><strong><a href="https://github.com/cocos2d/cocos2d-iphone/blob/develop/Resources/animations/grossini.plist">grossini.plist</a></strong> &#8211; The file contain the <strong>animation information</strong> such as frame details.</li>
<li><strong><a href="https://github.com/cocos2d/cocos2d-iphone/blob/develop/Resources/animations/grossini.pvr.gz">grossini.pvr.gz</a></strong> &#8211; The <strong>texture</strong> file in pvr format which allow better performance in Cocos2D.</li>
</ul>
<p><strong>Second</strong>, add the following codes into the function init. <strong>Take a look at the comments for program explanation.</strong> =]</p>
<pre class="brush: objc; highlight: [1,4,8,13,20,23]; title: ; wrap-lines: true; notranslate">
// Capture the window size
CGSize size = [[CCDirector sharedDirector] winSize];

// Load the plist into the cache
CCSpriteFrameCache *cache = [CCSpriteFrameCache sharedSpriteFrameCache];
[cache addSpriteFramesWithFile:@&amp;quot;grossini.plist&amp;quot;];

// Create sprite with the first frame
CCSprite *sprite = [CCSprite spriteWithSpriteFrameName:@&amp;quot;grossini_dance_01.png&amp;quot;];
sprite.position = ccp( size.width/2, size.height/2);
sprite.anchorPoint = ccp(0.5f, 0.5f);

// Create array for the animation frames
NSMutableArray *animFrames = [NSMutableArray array];
for(int i = 0; i &amp;lt; 14; i++) {
    CCSpriteFrame *frame = [cache spriteFrameByName:[NSString stringWithFormat:@&amp;quot;grossini_dance_%02d.png&amp;quot;,(i+1)]];
    [animFrames addObject:frame];
}

// Convert the array into animation
CCAnimation *animation = [CCAnimation animationWithFrames:animFrames];

// Run the sprite with the created animation and display it by adding it to the scene
[sprite runAction:[CCRepeatForever actionWithAction: [CCAnimate actionWithDuration:2.8f animation:animation restoreOriginalFrame:NO] ]];
[self addChild:sprite z:0];
</pre>
<p><strong>After all</strong>, don&#8217;t forget to deallocate the resources loaded in cache in function dealloc.</p>
<pre class="brush: objc; highlight: [1]; title: ; notranslate">
// Deallocate the resource in cache
CCSpriteFrameCache *cache = [CCSpriteFrameCache sharedSpriteFrameCache];
[cache removeSpriteFramesFromFile:@&amp;quot;animations/grossini.plist&amp;quot;];
</pre>
<p><strong>Finally</strong>, this is a screenshot. Enjoy. XD</p>
<p><a href="http://i0.wp.com/nicholasworkshop.com/wp-content/uploads/2011/09/animated-sprite.png"><img class="aligncenter size-full wp-image-444" title="animated-sprite" src="http://i0.wp.com/nicholasworkshop.com/wp-content/uploads/2011/09/animated-sprite.png?resize=584%2C300" alt="" data-recalc-dims="1" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://nicholasworkshop.com/2011/09/22/animated-sprites-in-cocos2d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making LoL for Mac works again after the beta closed</title>
		<link>http://nicholasworkshop.com/2011/09/11/making-lol-for-mac-works-again-after-the-beta-closed/</link>
		<comments>http://nicholasworkshop.com/2011/09/11/making-lol-for-mac-works-again-after-the-beta-closed/#comments</comments>
		<pubDate>Sun, 11 Sep 2011 11:54:35 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[beta closed]]></category>
		<category><![CDATA[closed]]></category>
		<category><![CDATA[downloader]]></category>
		<category><![CDATA[installer]]></category>
		<category><![CDATA[launcher]]></category>
		<category><![CDATA[league]]></category>
		<category><![CDATA[league legends]]></category>
		<category><![CDATA[league of]]></category>
		<category><![CDATA[league of legend]]></category>
		<category><![CDATA[league of legend for mac]]></category>
		<category><![CDATA[league of legend for mac beta]]></category>
		<category><![CDATA[league of legend mac]]></category>
		<category><![CDATA[league of legends]]></category>
		<category><![CDATA[league of legends for mac]]></category>
		<category><![CDATA[league of legends for mac beta]]></category>
		<category><![CDATA[legend]]></category>
		<category><![CDATA[lol]]></category>
		<category><![CDATA[lol closed beta]]></category>
		<category><![CDATA[lol for mac]]></category>
		<category><![CDATA[lol mac]]></category>
		<category><![CDATA[lollauncher]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[mac beta]]></category>
		<category><![CDATA[mac closed beta]]></category>
		<category><![CDATA[works again]]></category>

		<guid isPermaLink="false">http://nicholasworkshop.wordpress.com/?p=399</guid>
		<description><![CDATA[It is very disappointing that the League of Legends for Mac is closed after 6 Sep. It is really sad to see the compulsory close button after opening the LoL as shown in the below screenshot. Luckily, there is a way to make the game working again temporary. Technically, as &#8230;]]></description>
				<content:encoded><![CDATA[<p>It is very disappointing that the League of Legends for Mac is closed after 6 Sep. It is really sad to see the compulsory close button after opening the LoL as shown in the below screenshot.</p>
<p><a href="http://i1.wp.com/nicholasworkshop.com/wp-content/uploads/2011/09/lol-work-again-1.jpg"><img class="aligncenter size-full wp-image-401" title="lol-work-again-1" src="http://i1.wp.com/nicholasworkshop.com/wp-content/uploads/2011/09/lol-work-again-1.jpg?resize=584%2C365" alt="" data-recalc-dims="1" /></a></p>
<p><strong>Luckily, there is a way to make the game working again temporary.</strong> Technically, as the game is a transplant from Windows with the emulator tool Wine, the whole thing is just running a Windows program in Mac environment. Therefore it is possible to put the files of LoL in Windows back to Mac to trick the server that I am using Windows. Of course, please take your own risk to do the following steps. =]</p>
<p><strong>Step 1:</strong> Download the Windows version of LoLLauncher.exe <a href="http://q.gs/678829/lollauncher">here</a>.</p>
<p><strong>Step 2:</strong> Replace the LoLLauncher.exe with the downloaded one under<br />
/Applications/League of Legends.app/<br />
Contents/Resources/transgaming/c_drive/rads/projects/lol_launcher/releases/0.0.0.33/deploy/</p>
<p><a href="http://i1.wp.com/nicholasworkshop.com/wp-content/uploads/2011/09/lol-work-again-2.jpg"><img class="aligncenter size-full wp-image-402" title="lol-work-again-2" src="http://i1.wp.com/nicholasworkshop.com/wp-content/uploads/2011/09/lol-work-again-2.jpg?resize=584%2C365" alt="" data-recalc-dims="1" /></a><strong>Step 3:</strong> Relaunch the LoL and now you are able to update your game! <strong>Hope this fix would last longer!</strong> =]</p>
<p><a href="http://i1.wp.com/nicholasworkshop.com/wp-content/uploads/2011/09/lol-work-again-3.jpg"><img class="aligncenter size-full wp-image-403" title="lol-work-again-3" src="http://i1.wp.com/nicholasworkshop.com/wp-content/uploads/2011/09/lol-work-again-3.jpg?resize=584%2C365" alt="" data-recalc-dims="1" /></a></p>
<p><a href="http://i0.wp.com/nicholasworkshop.com/wp-content/uploads/2011/09/lol-work-again-4.jpg"><img class="aligncenter size-full wp-image-408" title="lol-work-again-4" src="http://i0.wp.com/nicholasworkshop.com/wp-content/uploads/2011/09/lol-work-again-4.jpg?resize=584%2C365" alt="" data-recalc-dims="1" /></a><a href="http://i0.wp.com/nicholasworkshop.com/wp-content/uploads/2011/09/lol-work-again-5.jpg"><img class="aligncenter size-full wp-image-409" title="lol-work-again-5" src="http://i0.wp.com/nicholasworkshop.com/wp-content/uploads/2011/09/lol-work-again-5.jpg?resize=584%2C365" alt="" data-recalc-dims="1" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://nicholasworkshop.com/2011/09/11/making-lol-for-mac-works-again-after-the-beta-closed/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
