<?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>myGUIDE</title>
	<atom:link href="http://myguide.bagarinao.com/feed" rel="self" type="application/rss+xml" />
	<link>http://myguide.bagarinao.com</link>
	<description>random notes, random thoughts</description>
	<lastBuildDate>Fri, 20 Nov 2009 08:45:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Installing Youtube Direct</title>
		<link>http://myguide.bagarinao.com/2009/11/20/installing-youtube-direct.htm</link>
		<comments>http://myguide.bagarinao.com/2009/11/20/installing-youtube-direct.htm#comments</comments>
		<pubDate>Fri, 20 Nov 2009 08:40:02 +0000</pubDate>
		<dc:creator>baggy</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[youtube direct]]></category>

		<guid isPermaLink="false">http://myguide.bagarinao.com/2009/11/20/installing-youtube-direct.htm</guid>
		<description><![CDATA[Youtube Direct is a new tool from Google/Youtube that makes it easier for media organizations or websites to request users to submit video clips, review submitted clips, and possibly re-broadcast these clips, just like CNN’s iReport.&#160; It allows websites to embed Youtube’s upload functionality with ease, includes moderation panel to approve or deny submitted clips, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.youtube.com/direct">Youtube Direct</a> is a new tool from Google/Youtube that makes it easier for media organizations or websites to request users to submit video clips, review submitted clips, and possibly re-broadcast these clips, just like CNN’s iReport.&#160; It allows websites to embed Youtube’s upload functionality with ease, includes moderation panel to approve or deny submitted clips, and provides a link back to the website when videos are viewed on Youtube. </p>
<p>Here is a summary of my attempt to install Youtube Direct (YTD). YTD is designed to run&#160; on Google App Engine (GAE) so you need to have a GAE account. Don’t worry, it’s free. After getting one, I downloaded the source and prepared it to be deployed in GAE. To do this, there are several things that need to be configured. One is to have <a href="http://www.eclipse.org/">Eclipse</a> and the related <a href="http://code.google.com/appengine/docs/java/tools/eclipse.html">Google Plugin</a>. </p>
<p><strong>Installing Eclipse</strong>. Download <a href="http://www.eclipse.org/downloads/">Eclipse IDE for Java EE Developers</a> from the Eclipse project website. The file is eclipse-jee-galileo-SR1-win32.zip, which is about 190MB. Extract the eclipse directory from the zip file. This directory contains the eclipse.exe executable, which runs Eclipse. </p>
<p><strong>Install Google Plugin for Eclipse</strong>. Run Eclipse. Then select the <strong>Help</strong> menu and choose <strong>Install New Software..</strong> menu item. In the <strong>Work with</strong> text box, enter the following URL: <a href="http://dl.google.com/eclipse/plugin/3.5">http://dl.google.com/eclipse/plugin/3.5</a>. Click the <strong>Add</strong> button and then the <strong>OK</strong> button, keeping the name blank as it will be retrieved automatically from the site. Next, click the triangle next to “Plugin” and “SDKs”. Check the boxes next to “Google Plugin for Eclipse 3.5” and “Google App Engine Java SDK.” You can also include the “Google Web Toolkit SDK” if you like. Click the <strong>Next</strong> button and accept the terms of service to install the plugin. When the installation is complete, restart Eclipse and the plugin is installed. </p>
<p><strong>Install subclipse to manage SVN checkout</strong>. Subclipse can be found <a href="http://subclipse.tigris.org/">here</a>. To install it in Eclipse, open Eclipse and click the <strong>Help</strong> menu. Select <strong>Install New Software</strong> menu item. In the <strong>Work with</strong> text box, enter the following URL: <a href="http://subclipse.tigris.org/update_1.6.x">http://subclipse.tigris.org/update_1.6.x</a>. Click <strong>Add</strong> button. Follow the same process as in Step 2. This time selecting Subclipse from the available options. Restart Eclipse to complete the installation.</p>
<p><strong>Download the source code</strong>. Now, you are ready to download the YTD source code. In Eclipse, select <strong>File</strong> menu, then click the <strong>Import</strong> menu item. In the Import dialog box, click the small triangle next to <strong>SVN</strong>, and then select <strong>Checkout Projects from SVN</strong>. Click <strong>Next</strong> button. From the Checkout from SVN dialog box, choose <strong>Create a new repository location</strong>. Click <strong>Next</strong>. Specify the URL as follows: <a href="http://youtube-direct.googlecode.com/svn/tags/20091113">http://youtube-direct.googlecode.com/svn/tags/20091113</a>. Click <strong>Next</strong>. Select the folder to be checkout by highlighting <a href="http://youtube-direct.googlecode.com/svn/tags/20091113">http://youtube-direct.googlecode.com/svn/tags/20091113</a>. Click <strong>Finish</strong>. A new project called ytd[tags/20091113] should appear in the Project Explorer after Eclipse completed downloading the source code. </p>
<p>Copy war/WEB-INF/appengine-web_DEFAULT.xml into war/WEB_INF/appengine-web.xml. Edit this file. Put within the &lt;application&gt; tag the registered App Engine instance name of your application. Specify the version of the application within the &lt;version&gt; tag. Replace the value of com.google.ytd.YTDeveloperKey property with your registered Youtube developer key. If you don’t have a developer key, get one <a href="http://code.google.com/apis/youtube/dashboard/">here</a>. </p>
<p>Run the application by clicking the Run action in Eclipse. If everything is working fine, you should have a server running at <a href="http://localhost:8080/">http://localhost:8080/</a>. While still in Eclipse, deploy the application to GAE by clicking the <strong>Deploy App Engine Project</strong> button in the toolbar. </p>
<p>At first, I encountered several errors. I didn’t have a clue why. When I tried to deploy the application to GAE, it failed because it cannot find javac in the path. As it turned out, I needed to set Java in Windows –&gt; Preferences –&gt; Java –&gt; Installed JREs to the installed Java SDK, not just the JRE. Any way, after setting Java to the SDK,&#160; all the errors disappeared and the application worked and I was able to deploy it to GAE.</p>
<p><strong>GAE dashboard</strong>. Go to the admin panel of YTD by visiting <a href="http://YOUR_APP.appspot.com/admin">http://YOUR_APP.appspot.com/admin</a>. From this panel, you can create new assignments, moderate submitted videos, etc. You can also get the codes that you can paste into a page in your website to enable video submission for each assignment.</p>
<p>That’s it! I still have to see how this works. You can also check the <a href="http://code.google.com/p/youtube-direct/wiki/GettingStarted">Youtube Direct Getting Started Guide</a> for more details. Till next post. </p>
]]></content:encoded>
			<wfw:commentRss>http://myguide.bagarinao.com/2009/11/20/installing-youtube-direct.htm/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>NinfG and Firewall</title>
		<link>http://myguide.bagarinao.com/2009/10/20/ninfg-and-firewall.htm</link>
		<comments>http://myguide.bagarinao.com/2009/10/20/ninfg-and-firewall.htm#comments</comments>
		<pubDate>Tue, 20 Oct 2009 03:06:49 +0000</pubDate>
		<dc:creator>baggy</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[solutions]]></category>

		<guid isPermaLink="false">http://myguide.bagarinao.com/2009/10/20/ninfg-and-firewall.htm</guid>
		<description><![CDATA[The latest version of NinfG (version 5.0) has a lot to offer in terms of allowing client-server connectivity. First, it introduces the invoke server module separating components used to invoke remote applications from the core. This does not only decouple NinfG from the Globus Toolkit like the previous versions, but it also allows the use [...]]]></description>
			<content:encoded><![CDATA[<p>The latest version of <a href="http://ninf.apgrid.org/">NinfG</a> (version 5.0) has a lot to offer in terms of allowing client-server connectivity. First, it introduces the invoke server module separating components used to invoke remote applications from the core. This does not only decouple NinfG from the <a href="http://www.globus.org/toolkit/">Globus Toolkit</a> like the previous versions, but it also allows the use of other middlewares such as SSH to execute remote commands. Since most Linux distributions already include some form of SSH, this makes the installation of NinfG more useful and a lot easier. You don’t have to install the Globus Toolkit just to install NinfG. The other feature I like is the communication proxy module, which tries to solve firewall-related problems. Unfortunately, NinfG currently only supports a communication proxy for the Globus Toolkit. If you don’t want to install the Globus Toolkit and only employ SSH invoke server, you are out of luck. </p>
<p>In this post, I would like to introduce a work-around of the firewall problem using only the SSH invoke server. The assumption is that the NinfG client and server applications are separated by a firewall. We would like also to assume that the client machine, where the client application is running, can connect to the server machine via SSH directly or via virtual private network. In this way, we can then use the SSH invoke server. If not, we are completely out of luck.</p>
<p>Although NinfG version 5 can now use SSH to invoke remote commands, it still has the same firewall problem inherent when using the Globus Toolkit. The reason is that the server application still needs to connect back to the client application. So if there is a firewall in-between client and server applications, this connection always fails and thus the entire application fails even if the client can connect to the server via SSH (since SSH connection is usually only allowed one way). This is further compounded if the client machine is in a NAT network.&#160; </p>
<p>To solve the problem, we should find a way such that the server application does not have to connect back directly to the client application, which causes the connection failure. My solution is therefore to use SSH port forwarding. Since we can connect to the server via SSH, we can instruct SSH to forward a port from the server machine to a local port in the client machine. We can then configure the server application to connect to this local port (in the server machine) instead of connecting directly to the client machine. At the same time, we can also configure the client application to listen to this specific local port. </p>
<p>Fortunately, NinfG allows us to do this using the configuration file. The specific section to use is the CLIENT section. The CLIENT section of the configuration file can look like this:</p>
<blockquote><p>&lt;CLIENT&gt;      <br />hostname&#160; localhost       <br />listen_port 2222       <br />&lt;/CLIENT&gt;</p>
</blockquote>
<p>This will trick the server application to connect to port 2222 in localhost (which is set to be the hostname of the connecting client). But local port 2222 in the server machine is forwarded to the client’s local port 2222 via SSH. So when the server application connects to this port, it is indirectly connected to the client application and thereby establishing the server and the client connection with SSH working in the background. The SSH command to achieve this is as follows (run from the client machine)</p>
<blockquote><p>[user@client]$ ssh –R 2222:localhost:2222 remoteserver.com&#160; </p>
</blockquote>
<p>For a more general setting, you can use a third machine which is globally accessible via SSH. You can then use SSH to forward a port from this third machine to a local port in the client machine and configure NinfG’s server applications to connect back to this machine in the forwarded port. The CLIENT section of the configuration file will now look like this assuming thirdserver.com is the hostname of the third machine.</p>
<blockquote><p>&lt;CLIENT&gt;     <br />hostname&#160;&#160; thirdserver.com      <br />listen_port 2222      <br />&lt;/CLIENT&gt;</p>
</blockquote>
<p>And the SSH command is</p>
<blockquote><p>[user@client]$ ssh –R 2222:localhost:2222 thirdserver.com</p>
</blockquote>
<p>This also assumes that you have an account in thirdserver.com machine. Or else, you will not be able to connect to it. In general, you should allow the forwarded port to be available to any machine, not just thirdserver.com. In this way, other server applications residing in other machines can connect to your client application via thirdserver.com. To do this, you can set GatewayPorts to yes in /etc/sshd_config in thirdserver.com.</p>
]]></content:encoded>
			<wfw:commentRss>http://myguide.bagarinao.com/2009/10/20/ninfg-and-firewall.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to change hostname in Linux</title>
		<link>http://myguide.bagarinao.com/2009/10/07/how-to-change-hostname-in-linux.htm</link>
		<comments>http://myguide.bagarinao.com/2009/10/07/how-to-change-hostname-in-linux.htm#comments</comments>
		<pubDate>Wed, 07 Oct 2009 14:23:25 +0000</pubDate>
		<dc:creator>baggy</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[hostname]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://myguide.bagarinao.com/2009/10/07/how-to-change-hostname-in-linux.htm</guid>
		<description><![CDATA[In order to change the hostname of your linux machine, you can do the following:
1) Edit file /etc/sysconfig/network using your favourite editor, say using vi. 
[root@mycomp]# vi /etc/sysconfig/network

2) Look for the line with HOSTNAME in it and change the entry to the desired hostname
HOSTNAME=mycomp.mydomain.com

3) Save the file and restart xinetd service
[root@mycomp]# /sbin/service xinetd restart

That’s it! [...]]]></description>
			<content:encoded><![CDATA[<p>In order to change the hostname of your linux machine, you can do the following:</p>
<p>1) Edit file /etc/sysconfig/network using your favourite editor, say using vi. </p>
<blockquote><p>[root@mycomp]# vi /etc/sysconfig/network</p>
</blockquote>
<p>2) Look for the line with HOSTNAME in it and change the entry to the desired hostname</p>
<blockquote><p>HOSTNAME=mycomp.mydomain.com</p>
</blockquote>
<p>3) Save the file and restart xinetd service</p>
<blockquote><p>[root@mycomp]# /sbin/service xinetd restart</p>
</blockquote>
<p>That’s it! You have just changed your hostname in Linux platform</p>
]]></content:encoded>
			<wfw:commentRss>http://myguide.bagarinao.com/2009/10/07/how-to-change-hostname-in-linux.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Regular expression</title>
		<link>http://myguide.bagarinao.com/2009/10/06/regular-expression.htm</link>
		<comments>http://myguide.bagarinao.com/2009/10/06/regular-expression.htm#comments</comments>
		<pubDate>Tue, 06 Oct 2009 08:34:03 +0000</pubDate>
		<dc:creator>baggy</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[regular expression]]></category>

		<guid isPermaLink="false">http://myguide.bagarinao.com/2009/10/06/regular-expression.htm</guid>
		<description><![CDATA[Especial Characters:
[    \     ^     $     &#124;     ?     *     +     .     (     )
If you want to use [...]]]></description>
			<content:encoded><![CDATA[<p>Especial Characters:</p>
<p>[    <br />\     <br />^     <br />$     <br />|     <br />?     <br />*     <br />+     <br />.     <br />(     <br />)</p>
<p>If you want to use any of the above characters as a literal in a regular expression, you need to escape them with a backslash. For example, 1\+1=2 will search 1+1=2.</p>
<p>With a character class or character set, you can tell the regex engine to match only one out of several characters. This can be done by simply placing the characters you want to match&#160; between square brackets. For example, if you want to match ‘a’ or ‘e’, simply use [ae]. Thus, gr[ae]y will match either gray or grey,&#160; but not graay, or graey, or similar strings.</p>
<p>To specify a range of characters or numbers, you can use a hyphen inside a character class. For example, [a-z] will match a single character from a to z, and [0-9] will match a single digit from 0 to 9.</p>
<p>Typing&#160; a ^ after the opening bracket will negate the character class. For example, q[^u] means a ‘q’ followed by characters not a ‘u’.</p>
<p>Note that the only metacharacters inside a character class are the closing bracket ], the backslash \, the caret ^, and the hyphen –. To include these characters inside a character class, you need to escape them with a backslash. </p>
<p>Short hand character classes include \d for [0-9], \w for “word character” or [0-9a-zA-Z_], and \s for “whitespace character”. Negated short hand character classes include \D for ^\d, \W for ^\w, and \S for ^\s.</p>
<p>The dot (.) matches a single character without caring what that character is, except new line characters.</p>
<p>Anchors match position before, between, or after characters. The caret ^ matches the position before the first character in the string. For example, applying ^a to “abc” matches ‘a’. But ^b will not match “abc” at all because ‘b’ cannot be matched at the start of the string. Similarly $ matches right after the last character in the string. c$ matches ‘c’ in “abc”, while a$ does not match at all. </p>
<p>\b for word boundaries. For example, \bis\b will match “is” in “This island is beautiful.”</p>
<p>Alternation or | is used to match one regular expression out of several regular expressions. For example, apple|banana|oranges. Note, you can use round brackets for regex grouping (e.g., \b(cat|dog)\b.</p>
<p>The question mark ? makes the preceding token in a regular expression optional. For example, colou?r&#160; matches both colour and color. You can make several tokens optional by grouping them together and attaching the question mark at the closing round bracket, such as Nov(ember)? which will match “Nov” and “November”.</p>
<p>The asterisk or star or * tells the engine to match the preceding token zero or more times. The plus + tells the engine to match the preceding token once or more times. You can limit the repetition by using {min,max} where min is a positive integer number indicating the minimum number of matches and max is an integer equal to or greater than min indicating the maximum number of matches. If comma is present but max is omitted, the maximum number of matches is infinite. </p>
]]></content:encoded>
			<wfw:commentRss>http://myguide.bagarinao.com/2009/10/06/regular-expression.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debugging with gdb</title>
		<link>http://myguide.bagarinao.com/2008/12/12/debugging-with-gdb.htm</link>
		<comments>http://myguide.bagarinao.com/2008/12/12/debugging-with-gdb.htm#comments</comments>
		<pubDate>Fri, 12 Dec 2008 05:21:46 +0000</pubDate>
		<dc:creator>baggy</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://myguide.bagarinao.com/2008/12/12/debugging-with-gdb/</guid>
		<description><![CDATA[GDB is the GNU project debugger which can be very helpful when you're trying to figure out what goes wrong in the application you're developing. With gdb, you can start a program, specify points or conditions where the program's execution will be stopped so that you can examine its current condition, and experiment correcting values [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.gnu.org/software/gdb/">GDB</a> is the GNU project debugger which can be very helpful when you're trying to figure out what goes wrong in the application you're developing. With gdb, you can start a program, specify points or conditions where the program's execution will be stopped so that you can examine its current condition, and experiment correcting values to discover bugs that maybe lurking in your code. gdb's online documentation can be found <a href="http://sourceware.org/gdb/current/onlinedocs/gdb_toc.html">here</a>.</p>
<p>To use gdb, you need to compile your program with the <strong>-g</strong> option to include debugging information. For instance, using gcc, you can compile program myprog.c as follows:</p>
<p><strong>[user] gcc -g <em>myprog.c</em></strong></p>
<p>To start gdb, run <strong>gdb <em>program</em></strong> in the command prompt, where <em><strong>program</strong></em> is the name of your executable file. For instance, </p>
<p><strong>[user] gdb <em>a.out</em></strong></p>
<p>First, this will display gdb's front material describing its copyright and non-warranty, among other information. Then you will be put in gdb prompt <strong>(gdb)</strong>.</p>
<p>Start the program by issuing the command <strong>run</strong> in the <strong>(gdb)</strong> prompt. If you have not yet issued any break points, the program will continue running until it finishes or it encounters fatal error. To quit gdb, just issue the <strong>quit</strong> command. </p>
<p>The main purpose of gdb is to allow programmers to stop the program before it terminates so that its current condition can be examined and potential sources of trouble can be known. This is where <em>breakpoints</em>, <em>catchpoints</em>, and <em>watchpoints</em> become handy. A <em>breakpoint</em> makes your program stops whenever a certain point is reached. On the other hand, a <em>watchpoint</em> is a special breakpoint that stops the program when the value of an expression changes. A <em>catchpoint</em> is another kind of breakpoint that stops the program when a certain kind of event occurs. </p>
<p>To setup a breakpoint, use the <strong>break</strong> command followed by the location. The location can be a function name, a line number, or an address of an instruction. For example,</p>
<p><strong>(gdb) break <em>10</em></strong></p>
<p>will set a breakpoint at line number 10, and</p>
<p><strong>(gdb) break <em>myfunc</em></strong></p>
<p>will set a breakpoint at the start of function <strong><em>myfunc</em></strong>.</p>
<p>To examine your source file within gdb, you can use the <strong>list</strong> command. <strong>list</strong> prints 10 lines by default from the source file. It also prints the line numbers which you can use in the <strong>break</strong> command. Some of the useful <strong>list</strong> options are as follows:</p>
<p><strong>(gdb) list <em>linenum</em></strong></p>
<p>will print lines centered around <strong><em>linenum</em></strong>.</p>
<p><strong>(gdb) list <em>startline, numlines</em></strong></p>
<p>will print <em><strong>numlines</strong></em> starting from <em><strong>startline</strong></em> in the current source file.</p>
<p><strong>(gdb) list <em>function</em></strong></p>
<p>will print lines centered around the beginning of <em><strong>function</strong></em></p>
<p><strong>(gdb) list</strong></p>
<p>will print the next 10 lines.</p>
<p>After a break, you can continue the program execution using the <strong>continue</strong> or <strong>c</strong> command. You can also run the program until the next line is reached with the <strong>step</strong> or <strong>s</strong> command. To step by machine execution instead of source line, use the <strong>stepi</strong> or <strong>si</strong> command. The <strong>next</strong> or <strong>n</strong> command will execute the next line including any function call. To execute just the next machine instruction, use <strong>nexti</strong> or <strong>ni</strong>. </p>
<p>The above commands should keep you started. If you need help, just type <strong>help</strong> in the (gdb) prompt. You can further refine <strong>help</strong> by appending any command after <strong>help</strong>, such as </p>
<p><strong>(gdb) help break</strong></p>
<p>That's it! And happy debugging.</p>
]]></content:encoded>
			<wfw:commentRss>http://myguide.bagarinao.com/2008/12/12/debugging-with-gdb.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>All about SVN</title>
		<link>http://myguide.bagarinao.com/2008/09/15/all-about-svn.htm</link>
		<comments>http://myguide.bagarinao.com/2008/09/15/all-about-svn.htm#comments</comments>
		<pubDate>Mon, 15 Sep 2008 04:27:06 +0000</pubDate>
		<dc:creator>baggy</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://myguide.bagarinao.com/2008/09/15/all-about-svn/</guid>
		<description><![CDATA[Subversion (or SVN) is an open source version control system that can be used to maintain several versions of files such as program source codes, webpages, and other documentation. It has several features including most CVS features, versioned copy, delete, renames, etc. Most Linux installations already include SVN so that you can use it immediately [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://subversion.tigris.org/">Subversion</a> (or SVN) is an open source version control system that can be used to maintain several versions of files such as program source codes, webpages, and other documentation. It has several <a href="http://subversion.tigris.org/features.html">features</a> including most CVS features, versioned copy, delete, renames, etc. Most Linux installations already include SVN so that you can use it immediately if you like.&#160; </p>
<p>I started using SVN only recently to track changes I made to the source codes of programs I have written, and hence this note. SVN is quite handy as it allows you to access your source code from any computer which can access your repository. You can commit changes you made to the code in one workstation, and when you work on those codes in another workstation,&#160; you can just update the local copy to reflect the changes you made. In the following, I'll assume that SVN is already installed. </p>
<p><strong>1. Creating an SVN Repository</strong></p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   1:</span> [user@mycomp] cd</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span> [user@mycomp] mkdir Repos</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   3:</span> [user@mycomp] svnadmin create Repos</pre>
</p></div>
</div>
<p>First, create a directory which will serve as the SVN repository. In the example above, a directory called <em>Repos/</em> is created in the user's home directory (line 2). To tell SVN to use this as the repos, use <strong>svnadmin create</strong> command passing the directory name as the target (line 3).&#160; After executing this command, SVN will place several directories and files in this directory. You can check the contents of <em>Repos/</em> by running <strong>ls -al Repos</strong>.</p>
<p><strong>2. Storing codes into the repository</strong></p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   1:</span> [user@mycomp] mkdir appwebcam</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span> [user@mycomp] mkdir appwebcam/trunk</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   3:</span> [user@mycomp] mkdir appwebcam/logs</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span> [user@mycomp] mkdir appwebcam/branches</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   5:</span> [user@mycomp] mkdir appwebcam/trunk/SRC</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span> [user@mycomp] mkdir appwebcam/trunk/bin</pre>
</p></div>
</div>
<p>Now that you have your repository setup, it is time to add some data into it. You can structure the data within the repository any way you like. But usually, you'll have a main directory for a project (say, <em>appwebcam/</em>), then within this, you have subdirectories for <em>trunk/</em>, <em>logs/</em>, and <em>branches/</em>. Within the <em>trunk/</em> subdirectory, you can have <em>SRC/</em> subdirectory to hold your source codes, <em>bin/</em> subdirectory for the binaries, etc. Lines 1-6 simply create this directory structure.&#160; </p>
<p><strong>3. Import your codes to the repository</strong></p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   1:</span> [user@mycomp] svn import ./appwebcam file:///home/user/Repos/appwebcam -m &quot;Initial import&quot;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span> Adding appwebcam/trunk</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   3:</span> Adding appwebcam/trunk/SRC</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span> Adding appwebcam/trunk/bin</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   5:</span> Adding appwebcam/logs</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span> Adding appwebcam/branches</pre>
</p></div>
</div>
<p>To import the created directory structure into the repository, use <strong>svn import</strong> as shown in line 1 giving the directory you want to import (<em>./appwebcam</em>), the location of the repository (<em>file:///home/user/Repos/appwebcam</em>), and an import comment option (<em>-m &quot;Initial import&quot;</em>) as parameters. This will create an &quot;invisible&quot; directory <em>appwebcam/</em> under the <em>Repos/</em> directory. </p>
<p><strong>4. Checking out codes from the repository</strong></p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   1:</span> [user@mycomp] svn co file:///home/user/Repos/appwebcam/trunk appwebcam</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span> A    appwebcam/SRC</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   3:</span> A    appwebcam/bin</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span> Checked out revision 1.</pre>
</p></div>
</div>
<p>Finally, if you want to checkout a certain portion of your repository, use <strong>svn checkout</strong> (or svn co). In the above example, only the contents of the <em>trunk/</em> subdirectory under <em>appwebcam/</em> are being checkout into the <em>appwebcam/</em> directory in the user's current directory. After the checkout, <em>appwebcam/</em> will contain the <em>SRC/</em> and <em>bin/</em> subdirectories.</p>
]]></content:encoded>
			<wfw:commentRss>http://myguide.bagarinao.com/2008/09/15/all-about-svn.htm/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Generating self-signed certificate using ADT to sign AIR applications</title>
		<link>http://myguide.bagarinao.com/2008/09/05/generating-self-signed-certificate-using-adt-to-sign-air-applications.htm</link>
		<comments>http://myguide.bagarinao.com/2008/09/05/generating-self-signed-certificate-using-adt-to-sign-air-applications.htm#comments</comments>
		<pubDate>Fri, 05 Sep 2008 13:37:13 +0000</pubDate>
		<dc:creator>baggy</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[ADT]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[self-signed certificate]]></category>

		<guid isPermaLink="false">http://myguide.bagarinao.com/2008/09/05/generating-self-signed-certificate-using-adt-to-sign-air-applications/</guid>
		<description><![CDATA[To package an Adobe AIR application using ADT (AIR Developer Tool), a certificate is needed. Digitally signing your application with a certificate from a recognized certificate authority identifies you as the publisher. It also provides assurance to users that your application has not been accidentally or maliciously altered. For these purposes, you can get a [...]]]></description>
			<content:encoded><![CDATA[<p>To package an Adobe AIR application using ADT (AIR Developer Tool), a certificate is needed. Digitally signing your application with a certificate from a recognized certificate authority identifies you as the publisher. It also provides assurance to users that your application has not been accidentally or maliciously altered. For these purposes, you can get a certificate from known certificate providers such as VeriSign or Thawte. But if you're just developing an application for personal or friends' use, you can use a self-signed certificate, which can be generated using ADT. You can then use this certificate to sign your personal AIR applications <img src='http://myguide.bagarinao.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
<p>To generate the certificate, run the following command:</p>
<div class="csharpcode-wrapper">
<div class="csharpcode">
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">adt -certificate -cn name [-ou org_unit][-o org_name][-c country] key_type pfx_file password</pre>
</p></div>
</p></div>
</p></div>
</div>
<p>where <strong>-cn name</strong> is the common name that will be used for the generated certificate, <strong>-ou org_unit</strong> refers to the organizational unit issuing the certificate, <strong>-o org_name</strong> is the name of the organization issuing the certificate, <strong>-c country</strong> is a two-letter ISO-3166 country code, <strong>key_type</strong> can either be &quot;1024-RSA&quot; or &quot;2048-RSA&quot; <strong>pfx_file</strong> is the name of the file where the certificate will be stored, and <strong>password</strong> is the certificate's password. The parameters inside square brackets are optional.</p>
<p>As an example, the actual command may look like this:</p>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> adt -certificate -cn &quot;My Certificate&quot; -ou bagarinao.com -o &quot;ABK Co&quot; -c US 2048-RSA myCert.p12 sd#$wd23</pre>
<p>
    </p>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span> adt -certificate -cn &quot;AIR App&quot; 1024-RSA MyCert.p12 sd#$wd23</pre>
</div>
<p>The first line illustrates how to generate a certificate specifying all the possible parameters. On the other hand, the second line only uses the required parameters in generating the certificate. Both will generate a new certificate and will store it in a file called myCert.p12 with password sd#$wd23.</p>
<p>To use the generated certificate to sign an AIR application, use adt using the <strong>-package</strong> option instead of the <strong>-certificate</strong> option. Use -storetype pkcs12, -keystore myCert.p12, and -keypass sd#$wd23 to specify the certificate that will be used to sign the application. The command is something like</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">adt -package -storetype pkcs12 -keystore myCert.p12 -keypass sd#$wd23 <span style="color: #0000ff">&lt;</span><span style="color: #800000">airfile</span><span style="color: #0000ff">&gt;</span> <span style="color: #0000ff">&lt;</span><span style="color: #800000">app-desc</span><span style="color: #0000ff">&gt;</span> other-files ..</pre>
</p></div>
</div>
<p>where <strong>&lt;airfile&gt;</strong> is the name of your package, <strong>&lt;app-desc&gt;</strong> specifies the XML application descriptor file, and <strong>other-files</strong> are the files and directories that you want to package with your air application.</p>
]]></content:encoded>
			<wfw:commentRss>http://myguide.bagarinao.com/2008/09/05/generating-self-signed-certificate-using-adt-to-sign-air-applications.htm/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing NinfG version 5</title>
		<link>http://myguide.bagarinao.com/2008/08/26/installing-ninfg-version-5.htm</link>
		<comments>http://myguide.bagarinao.com/2008/08/26/installing-ninfg-version-5.htm#comments</comments>
		<pubDate>Tue, 26 Aug 2008 06:22:45 +0000</pubDate>
		<dc:creator>baggy</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[globus toolkit]]></category>
		<category><![CDATA[grid]]></category>
		<category><![CDATA[gridRPC]]></category>
		<category><![CDATA[Ninf-G]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://myguide.bagarinao.com/2008/08/26/installing-ninfg-version-5/</guid>
		<description><![CDATA[NinfG is an open source grid middleware which provides a programming framework for grid-based remote procedure calls (GridRPC). It is a reference implementation of the GridRPC API (application programming interface), allowing programmers to create applications that can call procedures/executables installed on remote computers. In particular, it provides client library APIs that can be used to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://ninf.apgrid.org/">NinfG</a> is an open source grid middleware which provides a programming framework for grid-based remote procedure calls (GridRPC). It is a reference implementation of the GridRPC <a href="http://en.wikipedia.org/wiki/API">API</a> (application programming interface), allowing programmers to create applications that can call procedures/executables installed on remote computers. In particular, it provides client library APIs that can be used to control the execution of remote executables, running these executables remotely when necessary.</p>
<p>NinfG 5.0 is the latest version of NinfG. Unlike previous versions where the <a href="http://www.globus.org/toolkit/">Globus Toolkit</a> is required, NinfG 5.0 can now work with non-Globus grid environment. One of its new features is the ability to use <a href="http://http//en.wikipedia.org/wiki/Secure_Shell">SSH</a> to do remote procedure calls via the invoke server mechanism. This is very handy since most Linux systems have already SSH in the default installation, so there is no need to install additional packages to use NinfG. The following paragraphs outline the installation of NinfG on a system running Linux.</p>
</p>
<p><span id="more-35"></span><br />
<strong>1. Download NinfG</strong>
</p>
<p>You can download NinfG from <a href="http://ninf.apgrid.org/">http://ninf.apgrid.org/</a>. Be sure to get the current version (v. 5.0). You also need to download a patch, which can be found <a href="http://www.bagarinao.com/downloads/ninfg.patch">here</a>, for this version. I don't know if this patch is already incorporated in the package downloadable from the NinfG web site. In the following, I will assume that the download directory is located in /home/user/downloads.</p>
<pre class="csharpcode">[user@mycomp]$ cd /home/user/downloads/[user@mycomp]$ ls
ng5-latest.tgz
ninfg.patch</pre>
<p>
  </p>
<style type="text/css">
<p>.csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, &quot;courier new&quot;, courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }</style>
<p>The two files, ng5-latest.tgz and ninfg.patch, should be in the download directory.</p>
<p><strong>2. Extract the files</strong></p>
<p>After downloading the necessary files, you can now extract the files using tar.</p>
<pre class="csharpcode">[user@mycomp]$ cd /home/user/downloads/
[user@mycomp]$ tar -xzvf ng5-latest.tgz
[user@mycomp]$ ls
ng-5.0.0
ng5-latest.tgz
ninfg.patch</pre>
<p>
  </p>
<style type="text/css">
<p>.csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, &quot;courier new&quot;, courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }</style>
<p>This will create a subdirectory called ng-5.0.0 in the download directory. All the needed files are in this subdirectory.</p>
<p><strong>3. Apply the patch before compiling the package</strong></p>
<p>First, change directory to ng-5.0.0, then run patch as follows:</p>
<pre class="csharpcode">[user@mycomp]$ cd ng-5.0.0
[user@mycomp]$ patch -p0 &lt; ../ninfg.patch
patching file src/c/client/ngclRemoteClassGenerate.c
Hunk #1 succeeded at 1748 (offset 16 lines).</pre>
<p>
  </p>
<style type="text/css">
<p>.csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, &quot;courier new&quot;, courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }</style>
<p><strong>4. Configure, compile, and install</strong></p>
<p>Now that the patch is applied, you are set to compile and install the package.</p>
<div class="csharpcode">
<pre><span class="lnum">   1:  </span>[user@mycomp]$ ./configure --prefix=/opt/ng5.0.0 --with-zlib --with-ssh</pre>
<pre><span class="lnum">   2:  </span>:</pre>
<pre><span class="lnum">   3:  </span>:</pre>
<pre><span class="lnum">   4:  </span>[user@mycomp]$ make</pre>
<pre><span class="lnum">   5:  </span>:</pre>
<pre><span class="lnum">   6:  </span>:</pre>
<pre><span class="lnum">   7:  </span>[user@mycomp]$ su -</pre>
<pre><span class="lnum">   8:  </span>Password: xxxxxxx</pre>
<pre><span class="lnum">   9:  </span>[root@mycomp]# mkdir /opt/ng5.0.0</pre>
<pre><span class="lnum">  10:  </span>[root@mycomp]# cd /home/user/downloads/ng-5.0.0</pre>
<pre><span class="lnum">  11:  </span>[root@mycomp]# make install</pre>
<pre><span class="lnum">  12:  </span>:</pre>
<pre><span class="lnum">  13:  </span>:</pre>
<pre><span class="lnum">  14:  </span>[root@mycomp]#</pre>
</div>
<style type="text/css">
<p>.csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, &quot;courier new&quot;, courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }</style>
<p>In line 1, the configure command is run with several parameters: <code>--prefix=/opt/ng5.0.0</code> instructs configure to install the package in /opt/ng5.0.0 directory instead of using the default install directory, <code>--with-zlib</code> includes zlib compression support, and <code>--with-ssh</code> includes support for Invoke Server SSH. Invoke Server SSH is a new feature of NinfG allowing the use of SSH to do remote procedure calls instead of completely relying on the Globus Toolkit. To see the complete list of available options, you can run <code>./configure --help</code>.</p>
<p>Line 2 compiles the package. The output of this command is omitted in the listing above. After compilation, the package is now ready for installation.</p>
<p>Line 4 changes the user to the superuser using the su command. You will need the root password to proceed. If you don't have root access, you can still install NinfG in a directory where you have read/write permission. However, only you can use NinfG.</p>
<p>As root, create the installation directory (line 9). Then change directory to the location of the NinfG installation package (line 10). In this directory, run <code>make install</code> to install the package. If there are no errors, congratulations! You now have a working NinfG installation.</p>
<p><strong>5. Post installation setup</strong></p>
<p>For convenience, you can include the NinfG executables in your PATH. You can also set several environment variables needed by NinfG. To do this, add two files, namely, ninfg.sh and ninfg.csh, in your /etc/profile.d/ directory.</p>
<p>/etc/profile.d/ninfg.sh:</p>
<pre class="csharpcode">NG_DIR=/opt/ninfg; export NG_DIR
<span class="kwrd">if</span> [ -r ${NG_DIR}/etc/ninfg-user-env.sh ]
then
    . ${NG_DIR}/etc/ninfg-user-env.sh
fi</pre>
<p>
  </p>
<style type="text/css">
<p>.csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, &quot;courier new&quot;, courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }</style>
<p>/etc/profile.d/ninfg.csh:</p>
<pre class="csharpcode">setenv NG_DIR /opt/ninfg
<span class="kwrd">if</span> ( -r <span class="str">&quot;${NG_DIR}/etc/ninfg-user-env.csh&quot;</span> ) then
    source ${NG_DIR}/etc/ninfg-user-env.csh
endif</pre>
<p>
  </p>
<style type="text/css">
<p>.csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, &quot;courier new&quot;, courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }</style>
<p>Finally, as root, create a symbolic link /opt/ninfg pointing to /opt/ng5.0.0. This is useful when upgrading the version of NinfG. In this case, you only need to change the link to point to the new version to effect the changes.</p>
<pre class="csharpcode">[root@mycomp]# ln -s /opt/ng5.0.0 /opt/ninfg
[root@mycomp]# ls -al /opt
drwxr-xr-x   7 root root 4096 2008-08-26 12:23 ng5.0.0
lrwxrwxrwx   1 root root   12 2008-08-26 12:33 ninfg -&gt; /opt/ng5.0.0
[root@mycomp]#</pre>
<p>
  </p>
<style type="text/css">
<p>.csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, &quot;courier new&quot;, courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }</style>
<p>That's it! Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://myguide.bagarinao.com/2008/08/26/installing-ninfg-version-5.htm/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using SSH for Passwordless Remote Login</title>
		<link>http://myguide.bagarinao.com/2008/08/19/using-ssh-for-passwordless-remote-login.htm</link>
		<comments>http://myguide.bagarinao.com/2008/08/19/using-ssh-for-passwordless-remote-login.htm#comments</comments>
		<pubDate>Tue, 19 Aug 2008 05:33:09 +0000</pubDate>
		<dc:creator>baggy</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[passwordless login]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ssh-add]]></category>
		<category><![CDATA[ssh-agent]]></category>
		<category><![CDATA[ssh-keygen]]></category>

		<guid isPermaLink="false">http://myguide.bagarinao.com/2008/08/19/using-ssh-for-passwordless-remote-login/</guid>
		<description><![CDATA[Secure Shell or SSH is a network protocol allowing secure data exchanges between two networked devices. It is designed to replace Telnet, which sends information over the network in plain text making it susceptible to interception or eavesdropping. SSH, on the other hand, provides secure communication by encrypting the data sent over the network. It [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Secure_Shell">Secure Shell</a> or SSH is a network protocol allowing secure data exchanges between two networked devices. It is designed to replace <a href="http://en.wikipedia.org/wiki/Telnet">Telnet</a>, which sends information over the network in plain text making it susceptible to interception or eavesdropping. SSH, on the other hand, provides secure communication by encrypting the data sent over the network. It is typically used to login to a remote computer and to execute commands remotely. Aside from this, SSH can also be used to securely transfer files using scp or sftp, forward TCP ports, SSH tunneling, among others.</p>
<p>The following is my outline on how to use SSH for passwordless remote login. Of course, this is far from being complete and some of the things below may not work perfectly with your setup. There are many howtos regarding this topic and you should be able to find the one that is appropriate for your system.</p>
<p><span id="more-34"></span></p>
<p><strong>1. Generating key pairs</strong></p>
<p>SSH uses <a href="http://en.wikipedia.org/wiki/Public-key_cryptography">public-key cryptography</a> to authenticate remote computers. In this form of cryptography, a user has a public key, which can be widely distributed, and a private key, which should be kept secret. Before you can use SSH, you will need to generate this key pair. You can do this using ssh-keygen, as follows.</p>
<p> <code>[baggy@mycomp] ssh-keygen    <br />Generating public/private rsa key pair.     <br />Enter file in which to save the key (/home/baggy/.ssh/id_rsa): <font color="#ff0000">(hit enter to use the default value)</font>     <br />Enter passphrase (empty for no passphrase): <font color="#ff0000">(enter a passphrase or hit enter for empty passphrase)</font>     <br />Enter same passphrase again: <font color="#ff0000">(enter the same passphrase here)      <br /></font>Your identification has been saved in /home/baggy/.ssh/id_rsa.     <br />Your public key has been saved in /home/baggy/.ssh/id_rsa.pub.     <br />[baggy@mycomp]</code>
<p>Note that in the above, a passphrase refers to a string of words and characters that will be used to authenticate you when you want to use your ssh identification. It differs from a password in that you can use spaces or tabs and it is also usually longer. Generally, it is a phrase and not just a single word. </p>
<p>To generate different types of key pairs such as DSA or RSA, you can use the -t option of ssh-keygen. For example, the command should be ssh-keygen -t dsa to generate a DSA key pair. After generating your key pair, you'll need to install your public key to the remote systems you are planning to connect.</p>
<p><strong>2. Installing the public key to remote machines you want to connect</strong></p>
<p>To install your public key, you can use ssh-copy-id if this command is available.</p>
<p> <code>[baggy@mycomp] ssh-copy-id baggy@remote.machine.com    <br />baggy@remote.machine.com's password: <font color="#ff0000">(enter your password for remote machine)</font>     <br />Now try logging into the machine, with &quot;ssh 'baggy@remote.machine.com'&quot;, and check in:     <br />&#160;&#160;&#160; .ssh/authorized_keys     <br />to make sure we haven't added extra keys that you weren't expecting.     <br />[baggy@mycomp]</code>
<p>Replace baggy@remote.machine.com with your actual username and the hostname of the remote machine. If ssh-copy-id is not available, you can use scp to copy your public key file to the remote computer, then add this file to authorized_keys file in your home directory's .ssh subdirectory.</p>
<p>You can now try connecting to your remote system using the following:</p>
<p> <code>[baggy@mycomp] ssh baggy@remote.machine.com    <br />Enter passphrase for key '/home/baggy/.ssh/id_rsa': <font color="#ff0000">(enter passphrase here)</font>     <br />Last login: Tue Aug 18 08:08:08 from mycomp.localbox.com     <br />[baggy@remote]</code>
<p>As you might have noticed, instead of asking for the password of the remote machine, SSH asked the passphrase of your SSH identity. The advantage of this over using a password is that the passphrase is never transmitted over the network making the approach safer. If SSH still asks for a password, verify your remote system's sshd configuration and make sure that RSA/DSA authentication is enabled.</p>
<p>Okay, you don't type your password but it still requires you to type your passphrase. The password is just being replaced by the passphrase, sort of. So is there a way to do away with the passphrase also? Fortunately, the answer is yes and that is by using ssh-agent.</p>
<p><strong>3. Using ssh-agent</strong></p>
<p>ssh-agent is part of the OpenSSH package to manage RSA and DSA keys. It is a long running daemon designed to cache your decrypted keys so that SSH can communicate with it and use the cached keys without prompting you for a passphrase every time you make a remote connection. To add an identity managed by an ssh-agent, you can use ssh-add.</p>
<p>There are many ways to use ssh-agent. For me, since I only use it in a single shell, I just use the following:</p>
<p> <code>[baggy@mycomp] ssh-agent /bin/bash    <br />[baggy@mycomp] ssh-add     <br />Enter passphrase for /home/baggy/.ssh/id_rsa: <font color="#ff0000">(enter passphrase here)</font>     <br />Identity added: /home/baggy/.ssh/id_rsa (/home/baggy/.ssh/id_rsa)     <br />[baggy@mycomp]</code>
<p>Within this shell, you can now remote login or run commands remotely without being prompted for a passphrase. </p>
]]></content:encoded>
			<wfw:commentRss>http://myguide.bagarinao.com/2008/08/19/using-ssh-for-passwordless-remote-login.htm/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Trying Shindig, an OpenSocial and Google Gadgets container</title>
		<link>http://myguide.bagarinao.com/2008/06/13/trying-shindig-an-opensocial-and-google-gadgets-container.htm</link>
		<comments>http://myguide.bagarinao.com/2008/06/13/trying-shindig-an-opensocial-and-google-gadgets-container.htm#comments</comments>
		<pubDate>Fri, 13 Jun 2008 05:21:05 +0000</pubDate>
		<dc:creator>baggy</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[google gadget]]></category>
		<category><![CDATA[opensocial]]></category>
		<category><![CDATA[shindig]]></category>

		<guid isPermaLink="false">http://myguide.bagarinao.com/2008/06/13/trying-shindig-an-opensocial-and-google-gadgets-container/</guid>
		<description><![CDATA[
Shindig is an open source reference implementation of Google&#8217;s OpenSocial and gadgets specifications. With Shindig, you will be able to host Google gadgets and OpenSocial applications in your own web site relatively quickly as it already contains code that you can easily plug into your server infrastructure to start hosting these applications.
Interested with OpenSocial, I [...]]]></description>
			<content:encoded><![CDATA[</p>
<p><a href="http://incubator.apache.org/shindig/">Shindig</a> is an open source reference implementation of Google&#8217;s <a href="http://code.google.com/apis/opensocial/">OpenSocial</a> and <a href="http://code.google.com/apis/gadgets/">gadgets</a> specifications. With Shindig, you will be able to host Google gadgets and OpenSocial applications in your own web site relatively quickly as it already contains code that you can easily plug into your server infrastructure to start hosting these applications.</p>
<p>Interested with OpenSocial, I tried installing Shindig in my home server. Currently, Shindig's PHP implementation is far from being complete, so my interest is just to have a feel on how it works. To install Shindig, check its web site and follow the instructions there. The project does not yet support automated build infrastructure so you need to get Shindig from its SVN repository. For this, you need an SVN client. Fortunately, I have <a href="http://www.cygwin.com/">Cygwin</a> installed in my Windows XP machine, so I only had to install subversion in Cygwin. This can be done by running the Cygwin installer, then locate the subversion package, select it, and install. After the installation, run a bash shell and you are ready to export Shindig.</p>
<p><span id="more-33"></span></p>
<p>In my setup, my web's root directory is located in c:/www. To export Shinding using Cygwin, just run the following command in a bash prompt:</p>
<blockquote><p><code>[bash] cd /cygdrive/c/www      <br />[bash] svn export \       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <a href="http://svn.apache.org/repos/asf/incubator/shindig/trunk/">http://svn.apache.org/repos/asf/incubator/shindig/trunk/</a>       <br />[bash] mv trunk shindig</code> </p></blockquote>
<p>After exporting the Shindig source code, the next thing to setup is a virtual host pointing to the PHP directory of Shindig. If you cannot setup a virtual host, it is still possible to run Shindig by changing some settings in the configuration file. I used the virtual host option to separate Shindig from the rest of my web installation. Here is my virtual host setting:</p>
<blockquote><p><code># shindig      <br />&lt;VirtualHost *:80&gt;&#160; <br />&#160;&#160;&#160; DocumentRoot &quot;C:/www/shindig/php&quot;&#160; <br />&#160;&#160;&#160; ServerName shindig.mshome.net       <br />&#160;&#160;&#160; ErrorLog &quot;logs/shindig.log&quot;&#160; <br />&#160;&#160;&#160; CustomLog &quot;logs/shindig-access.log&quot; common       <br />&#160;&#160;&#160; &lt;Directory &quot;C:/www/shindig/php&quot;&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Options FollowSymLinks       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; AllowOverride FileInfo       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Order Allow,Deny       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Allow from all       <br />&#160;&#160;&#160; &lt;/Directory&gt;       <br />&lt;/VirtualHost&gt;</code></p></blockquote>
<p>Make sure that mod_rewrite is also enabled in your web server. Check if you have the following line in the Apache's configuration file httpd.conf:</p>
<blockquote><p><code>LoadModule rewrite_module modules/mod_rewrite.so</code></p></blockquote>
<p>For the mod_rewrite to work, you also need to set AllowOverride in the virtual host's configuration to FileInfo or higher (All, for example). In my initial setup, I had this option set to None and wondered why mod_rewrite even if already installed didn't work.&#160; After changing httpd's configuration, restart httpd for the new configuration to take effect.</p>
<p>When everything is set, try to check if your installation works. Open a browser and enter the following URL:</p>
<blockquote><p><code>http://shindig.mshome.net/gadgets/ifr?url=http://www.labpixies.com/campaigns/todo/todo.xml</code></p></blockquote>
<p>Change shindig.mshome.net in the above URL to your own. This should display <a href="http://shindig.us.chabotc.com/gadgets/ifr?url=http://www.labpixies.com/campaigns/todo/todo.xml">labpixies note gadget</a>. Now you can start developing your own gadget or OpenSocial application in the convenience of your own server.</p>
]]></content:encoded>
			<wfw:commentRss>http://myguide.bagarinao.com/2008/06/13/trying-shindig-an-opensocial-and-google-gadgets-container.htm/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
