<?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>On Tech and Software &#187; General</title>
	<atom:link href="http://jmgtan.com/category/general/feed/" rel="self" type="application/rss+xml" />
	<link>http://jmgtan.com</link>
	<description>Random thoughts on technology, ventures, algorithms, frameworks, gadgets and THE MAN</description>
	<lastBuildDate>Fri, 02 Jul 2010 11:14:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>New Path</title>
		<link>http://jmgtan.com/2010/07/02/new-path/</link>
		<comments>http://jmgtan.com/2010/07/02/new-path/#comments</comments>
		<pubDate>Fri, 02 Jul 2010 11:14:11 +0000</pubDate>
		<dc:creator>Jan Michael Tan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[career]]></category>
		<category><![CDATA[goals]]></category>
		<category><![CDATA[management]]></category>

		<guid isPermaLink="false">http://jmgtan.com/?p=290</guid>
		<description><![CDATA[Its been ages since I last posted anything new here, ever since i&#8217;ve been promoted from a consultant to one of the company&#8217;s executives, its been a non stop stream of work. In a way its a very exhilarating experience, me trying to cope with the new role while trying to balance several different hats as [...]]]></description>
			<content:encoded><![CDATA[<p></p>
<p>Its been ages since I last posted anything new here, ever since i&#8217;ve been promoted from a consultant to one of the company&#8217;s executives, its been a non stop stream of work. In a way its a very exhilarating experience, me trying to cope with the new role while trying to balance several different hats as we attempt to plug holes in our team with increase hiring to complete all major talent deficiencies.</p>
<p>What turned out to be a very difficult decision to make (me deciding between taking this job or going to Singapore to join my girlfriend) was actually a pretty easy choice looking back. This is exactly the job that I have been searching for since I left my first fun job. A mix of something new and something that i&#8217;m damn good at (software architecture, design and actual coding). Working at my previous job has proven to be pretty boring and a sure career killer (since i&#8217;m sitting on my ass the entire day doing nothing). I&#8217;m pretty sure that once I hire more developers my coding task would diminish and to be honest I don&#8217;t know if that would be a good idea or just a sign of career progression, because lets face it, coding is super fun, especially when you&#8217;re working with awesome people!</p>
<p>Well that&#8217;s for another day to think about, right now, lesson one in management, learn to say no to people and learn how to delegate tasks more efficiently!</p>
<p></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fjmgtan.com%2F2010%2F07%2F02%2Fnew-path%2F&amp;linkname=New%20Path"><img src="http://jmgtan.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://jmgtan.com/2010/07/02/new-path/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rebuttal: 3 reasons to stay in a big company</title>
		<link>http://jmgtan.com/2010/01/16/rebuttal-3-reasons-to-stay-in-a-big-company/</link>
		<comments>http://jmgtan.com/2010/01/16/rebuttal-3-reasons-to-stay-in-a-big-company/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 16:05:46 +0000</pubDate>
		<dc:creator>Jan Michael Tan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[opinion]]></category>

		<guid isPermaLink="false">http://jmgtan.com/?p=276</guid>
		<description><![CDATA[Reading this blog post entitled, &#8220;3 reasons to stay in a big company&#8220;, I can&#8217;t help but comment about some of the points the author made. A brief background first, i&#8217;ve worked with some big companies in the past, but all have left a bad taste in my mouth for reasons I will point out [...]]]></description>
			<content:encoded><![CDATA[<p></p>
<p>Reading this blog post entitled, &#8220;<a href="http://vasilrem.com/blog/software-development/3-reasons-to-stay-in-a-big-company/" target="_blank">3 reasons to stay in a big company</a>&#8220;, I can&#8217;t help but comment about some of the points the author made. A brief background first, i&#8217;ve worked with some big companies in the past, but all have left a bad taste in my mouth for reasons I will point out later on. I will be talking about my experiences which led me to believe that big companies aren&#8217;t all its crack up to be.</p>
<p><span id="more-276"></span>Ok lets proceed with the author&#8217;s three points:</p>
<ol>
<li><strong>Working for a big company you learn to think big</strong>.<br />
This is definitely true, lots of integration work with numerous big systems, lots of users depending on these systems to be working day in and day out for them to do their jobs, but from my experience these are the systems that are usually slow, always experiencing down times, always have bad usability, and are usually so expensive for whatever reason.</p>
<p>Having a project laden with all the buzz word technology or design pattern doesn&#8217;t usually mean better performance, it just means you can sell it better to gullible clients thinking that you have a scalable solution because its supposedly &#8220;enterprise-grade&#8221;.  Now am not saying ALL enterprise softwares are like these, but not all teams are able to properly execute a big project. Now the next team/employees that comes in will be the ones responsible in keeping it running and trying to understand/fix the mess piling more crap.</li>
<li><strong>Big companies invest money in innovations and staff education.<br />
<span style="font-weight: normal;">In my personal opinion, staff education is useless. Except for conferences, classroom trainings are usually a waste of time for me. The pacing is way slow, usually the instructors don&#8217;t teach about the more important things especially when the subject is of a technical nature. Now it might work for some, but I much prefer self-improvement over classroom training any day. Although the biggest bonus in favor of big companies is that you get paid while you&#8217;re doing your self-improvement thing if you have the spare time to do it that is.</span></strong></li>
<li><strong>It&#8217;s easier to keep work/life balance.<br />
<span style="font-weight: normal;">Maybe if you&#8217;re just a grunt, but if you&#8217;re up the corporate ladder then you&#8217;re gonna be swamped with meetings. The worst part about it is, some of these meetings that you have to attend are in different timezones because you&#8217;re a multinational company. So you find yourself spending more time in the office because of this. Now if you&#8217;re waaaay up the corporate ladder, then chances are that you have a blackberry, generously provided by the company; now unless you&#8217;re an expert in work/life balance, you will find it really difficult to resists in answering that &#8220;one last email&#8221;.</span></strong></li>
</ol>
<p>A bit of a disclaimer though, i&#8217;m a freelancer right now, got burned out working for big companies and watching them make the same mistakes over and over again with big projects. I&#8217;m enjoying the freelance life tremendously, the projects may not be that big, but the headaches are not that big also. As with all things, there are pro&#8217;s and con&#8217;s to each side of the argument, the key is finding what is more important to you and what works better for you. Freelancing is not for everybody, and so is working for big companies.</p>
<p></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fjmgtan.com%2F2010%2F01%2F16%2Frebuttal-3-reasons-to-stay-in-a-big-company%2F&amp;linkname=Rebuttal%3A%203%20reasons%20to%20stay%20in%20a%20big%20company"><img src="http://jmgtan.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://jmgtan.com/2010/01/16/rebuttal-3-reasons-to-stay-in-a-big-company/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Redmine and the importance of backups</title>
		<link>http://jmgtan.com/2010/01/13/redmine-and-the-importance-of-backups/</link>
		<comments>http://jmgtan.com/2010/01/13/redmine-and-the-importance-of-backups/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 07:32:19 +0000</pubDate>
		<dc:creator>Jan Michael Tan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[backups]]></category>
		<category><![CDATA[hosting]]></category>

		<guid isPermaLink="false">http://jmgtan.com/?p=235</guid>
		<description><![CDATA[Been struggling to get Redmine working with Mongrel instead of using Apache + FastCGI (been using this setup for while till this defect kept on bugging me and my teammates: http://www.redmine.org/boards/2/topics/5864), when the cause was simply a bug with cpanel&#8217;s generated .htaccess file for the subdomain internal proxy redirect. Now before arriving to this conclusion [...]]]></description>
			<content:encoded><![CDATA[<p></p>
<p>Been struggling to get Redmine working with Mongrel instead of using Apache + FastCGI (been using this setup for while till this defect kept on bugging me and my teammates: <a href="http://www.redmine.org/boards/2/topics/5864" target="_blank">http://www.redmine.org/boards/2/topics/5864</a>), when the cause was simply a bug with cpanel&#8217;s generated .htaccess file for the subdomain internal proxy redirect.</p>
<p><span id="more-235"></span></p>
<p>Now before arriving to this conclusion I thought that wordpress&#8217; .htaccess file was conflicting with the subdomain&#8217;s .htaccess file since it redirects to the docroot folder albeit on a different port, now take note that this is the first time I tried using Mongrel and I have absolutely no Ruby on Rails experience, so being half-awake as I am during the morning I tried moving the wordpress&#8217; installation from the docroot folder to a subdomain when the ftp client I was using at that time decided that before moving the files it should delete the source file AND THEN paste it to the new location, naturally it would result in an error being that the source files were not found. Ok now you&#8217;re thinking why I haven&#8217;t noticed that it was deleting the files, I stepped out while it was starting to move the files. So having no backups whatsoever I started to look for backup features of my hosting package to no avail, until I discovered this little gem: <a href="http://www.a2hosting.com/blog/a2-hosting-releases-server-rewind-backup-technology/" target="_blank">http://www.a2hosting.com/blog/a2-hosting-releases-server-rewind-backup-technology/</a>. Suffice to say that it did the job, albeit a little slow, but better than nothing.</p>
<p>Lesson learned: <strong>always backup before doing anything</strong>.</p>
<p>On a side note, Redmine on Mongrel is just wicked fast!<br />
</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fjmgtan.com%2F2010%2F01%2F13%2Fredmine-and-the-importance-of-backups%2F&amp;linkname=Redmine%20and%20the%20importance%20of%20backups"><img src="http://jmgtan.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://jmgtan.com/2010/01/13/redmine-and-the-importance-of-backups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Syntax Highlighter</title>
		<link>http://jmgtan.com/2009/11/15/wordpress-syntax-highlighter/</link>
		<comments>http://jmgtan.com/2009/11/15/wordpress-syntax-highlighter/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 00:22:21 +0000</pubDate>
		<dc:creator>Jan Michael Tan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://jmgtan.com/?p=196</guid>
		<description><![CDATA[Can anybody recommend a good SyntaxHighlighter for WordPress? I&#8217;ve been using SyntaxHighlighter Plus for over 1year already, and its been always giving me headaches on character escaping with html/php codes. Now its been refusing to cooperate with indenting Java codes.]]></description>
			<content:encoded><![CDATA[<p></p>
<p>Can anybody recommend a good SyntaxHighlighter for WordPress? I&#8217;ve been using SyntaxHighlighter Plus for over 1year already, and its been always giving me headaches on character escaping with html/php codes. Now its been refusing to cooperate with indenting Java codes.</p>
<p></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fjmgtan.com%2F2009%2F11%2F15%2Fwordpress-syntax-highlighter%2F&amp;linkname=WordPress%20Syntax%20Highlighter"><img src="http://jmgtan.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://jmgtan.com/2009/11/15/wordpress-syntax-highlighter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nokia N97</title>
		<link>http://jmgtan.com/2009/09/15/nokia-n97/</link>
		<comments>http://jmgtan.com/2009/09/15/nokia-n97/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 11:16:22 +0000</pubDate>
		<dc:creator>Jan Michael Tan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[gadgets]]></category>
		<category><![CDATA[n97]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[opinion]]></category>
		<category><![CDATA[reviews]]></category>

		<guid isPermaLink="false">http://jmgtan.com/?p=177</guid>
		<description><![CDATA[Finally bought a smartphone, first time to have one actually. My former phone is a Sony Ericsson K810i, used it for around 2 years plus plus. Very sturdy phone but the mediocre support for connectivity is really hurting me since I need a good 3g connection for my mobile office. Initially was planning to buy [...]]]></description>
			<content:encoded><![CDATA[<p></p>
<p>Finally bought a smartphone, first time to have one actually. My former phone is a Sony Ericsson K810i, used it for around 2 years plus plus. Very sturdy phone but the mediocre support for connectivity is really hurting me since I need a good 3g connection for my mobile office. Initially was planning to buy an iphone 3gs but got really disappointed by the bad battery life, then decided to go for a blackberry bold, but my <a href="http://www.globe.com.ph" target="_blank">provider</a> screwed me on that one. So upon hearing about the <a href="http://www.nokia-asia.com/find-products/products/nokia-n97#/main/landing" target="_blank">Nokia N97</a> (especially the very cool 32gb of internal memory which is expandable upto 48gb), I decided to jump back to the Nokia bandwagon after being away for such a very long time. Credit goes to Sony Ericsson for not releasing any good smartphone (the xperia x1 sucks really bad).</p>
<p><span id="more-177"></span></p>
<p>So first things first, this phone is jam packed with features; ranging from all sorts of connectivity options to a built in fm transmitter for your car when listening to mp3s. I really love the cool form factor and the overall feel of the hardware; although for a phone that is pack with features, it only comes with 128mb of ram which rans out quite often especially when using the built in email client. The web browser uses the WebKit rendering engine (similar to Safari), and it has support for Flash (Lite)! Opening big sites can slow down the phone considerably, but most of the time you&#8217;ll default to the mobile version of the site (if they have one). One of the things I love is the homescreen widgets, basically it allows you to put widgets (sort of like a summarize version of an application) and allow the phone to periodically update them automatically, this can be emails, tweets, facebook, weather, or news sites. Basically any application that has support for widgets (maximum of 5 can be put into the homescreen). The usual applications for symbian also applies like adobe pdf, microsoft office, etc. Although the OVI store is really bad, you can still search the net for symbian apps and download it to your phone.</p>
<p>The real downside of this superb phone is the OS, Symbian S60 5th Edition, needless to say its downright slow and laggy, although according to some <a href="http://www.engadget.com/2009/09/07/nokia-n97-firmware-2-0-looks-to-squash-major-pain-points/" target="_blank">sources</a> new firmwares are gonna be released to address the numerous bugs of the phone. Firmwares, now there&#8217;s another issue, N97 updates are quite unpredictable, meaning that some users in a different region (sometimes same regions) get them, some don&#8217;t, now according to Nokia, each region or operator (telecom) usually has some customizations for that firmware that&#8217;s why they can&#8217;t roll them out all at once to everybody. This maybe true or not we won&#8217;t know for sure, but some users are reporting delays in weeks (sometimes in months) between updates. Like me for example, Nokia has already released v12 but i&#8217;m still at v11 and unable to update over the air or using their Nokia Software Updater. Its frustrating knowing that there is already a fix to speed up or fix stuff, but you can&#8217;t update because you have to wait for your region or operator to get it.</p>
<p>Ranting aside, if you can look past the lagginess of the UI and the use of a resistive touch screen (which means you have to press harder in order for the input to register), you&#8217;ll find a very solid phone in the current incarnation of Nokia&#8217;s flagship smartphone.</p>
<p></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fjmgtan.com%2F2009%2F09%2F15%2Fnokia-n97%2F&amp;linkname=Nokia%20N97"><img src="http://jmgtan.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://jmgtan.com/2009/09/15/nokia-n97/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Symfony Doctrine or Propel</title>
		<link>http://jmgtan.com/2009/09/10/symfony-doctrine-or-propel/</link>
		<comments>http://jmgtan.com/2009/09/10/symfony-doctrine-or-propel/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 12:22:08 +0000</pubDate>
		<dc:creator>Jan Michael Tan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[doctrine]]></category>
		<category><![CDATA[opinion]]></category>
		<category><![CDATA[propel]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://jmgtan.com/?p=173</guid>
		<description><![CDATA[Been giving this alot of thought lately. What to use for my next project. Ever since symfony 1.2&#8242;s move to Propel 1.3, the major argument of speed against Propel has been solved with its migration out of creole and into PDO. So speed is definitely at par with Doctrine, but the curious side of me [...]]]></description>
			<content:encoded><![CDATA[<p></p>
<p>Been giving this alot of thought lately. What to use for my next project. Ever since symfony 1.2&#8242;s move to Propel 1.3, the major argument of speed against Propel has been solved with its migration out of creole and into PDO. So speed is definitely at par with Doctrine, but the curious side of me wishes to delve into something new to mix things up a bit.</p>
<p>What to use? Doctrine or Propel?</p>
<p></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fjmgtan.com%2F2009%2F09%2F10%2Fsymfony-doctrine-or-propel%2F&amp;linkname=Symfony%20Doctrine%20or%20Propel"><img src="http://jmgtan.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://jmgtan.com/2009/09/10/symfony-doctrine-or-propel/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>JUnit and EasyMock</title>
		<link>http://jmgtan.com/2009/09/08/junit-and-easymock/</link>
		<comments>http://jmgtan.com/2009/09/08/junit-and-easymock/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 01:04:04 +0000</pubDate>
		<dc:creator>Jan Michael Tan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[easymock]]></category>
		<category><![CDATA[junit]]></category>
		<category><![CDATA[opinion]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://jmgtan.com/?p=170</guid>
		<description><![CDATA[Unit testing is tedious, but it has saved my bacon so many times already that even though it eats my time I still religiously create unit test cases for every important business logic use cases. I&#8217;ve been using Spring&#8217;s integration with JUnit and its very cool transaction support for test cases. Unfortunately with this approach, [...]]]></description>
			<content:encoded><![CDATA[<p></p>
<p>Unit testing is tedious, but it has saved my bacon so many times already that even though it eats my time I still religiously create unit test cases for every important business logic use cases. I&#8217;ve been using Spring&#8217;s integration with JUnit and its very cool transaction support for test cases. Unfortunately with this approach, I have to craft test data to test every single code path for complex business logics. Although the setup, tearDown and rollback upon completion of the test case is handy, I still have to carefully craft the data.</p>
<p>Enter EasyMock, I know i&#8217;m late in the game with mock objects, but in the quest to meet deadlines and still have close to 100% test coverage (well I try to anyway), I haven&#8217;t had the time to actually check out what&#8217;s new in the TDD world.</p>
<p>At its most basic level, it allows you to record and replay the expected method calls and return values for methods that are being used by the object/method that you are currently testing. Aside from mocking interface classes you can also partially mock concrete classes (meaning mock only selected methods) using EasyMock&#8217;s Class Extension. With this, you have fine grain control on how each and every test case will behave.</p>
<p>Check it out at <a href="http://www.easymock.org">http://www.easymock.org</a></p>
<p>I&#8217;ll post a tutorial in my next blog post. There&#8217;s so much stuff in there that I haven&#8217;t used that I&#8217;ll have to start a new tutorial series just to cover this very cool mock framework.</p>
<p></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fjmgtan.com%2F2009%2F09%2F08%2Fjunit-and-easymock%2F&amp;linkname=JUnit%20and%20EasyMock"><img src="http://jmgtan.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://jmgtan.com/2009/09/08/junit-and-easymock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>API to get screenshots of url</title>
		<link>http://jmgtan.com/2009/06/25/api-to-get-screenshots-of-url/</link>
		<comments>http://jmgtan.com/2009/06/25/api-to-get-screenshots-of-url/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 10:46:31 +0000</pubDate>
		<dc:creator>Jan Michael Tan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[api]]></category>

		<guid isPermaLink="false">http://jmgtan.com/?p=146</guid>
		<description><![CDATA[Just discovered a quick way to do a screenshot based on a url http://www.websnapr.com/ They even have a cool and easy to use api!]]></description>
			<content:encoded><![CDATA[<p></p>
<p>Just discovered a quick way to do a screenshot based on a url</p>
<p><a href="http://www.websnapr.com/">http://www.websnapr.com/</a></p>
<p>They even have a cool and easy to use api!</p>
<p></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fjmgtan.com%2F2009%2F06%2F25%2Fapi-to-get-screenshots-of-url%2F&amp;linkname=API%20to%20get%20screenshots%20of%20url"><img src="http://jmgtan.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://jmgtan.com/2009/06/25/api-to-get-screenshots-of-url/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache 2: Self-Signed Certificates</title>
		<link>http://jmgtan.com/2009/05/12/apache-2-self-signed-certificates/</link>
		<comments>http://jmgtan.com/2009/05/12/apache-2-self-signed-certificates/#comments</comments>
		<pubDate>Tue, 12 May 2009 08:30:50 +0000</pubDate>
		<dc:creator>Jan Michael Tan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://jmgtan.com/?p=129</guid>
		<description><![CDATA[Self-signed certificates are very useful when doing testing on your local machine. The following was tested using a unix based environment. Generate the Key and Certificate First we generate the private key openssl genrsa -des3 -out server.key 1024 Then we create a certificate signing request openssl req -new -key server.key -out server.csr We make sure [...]]]></description>
			<content:encoded><![CDATA[<p></p>
<p>Self-signed certificates are very useful when doing testing on your local machine. The following was tested using a unix based environment.</p>
<p><span id="more-129"></span></p>
<p><strong>Generate the Key and Certificate</strong></p>
<p><em>First we generate the private key</em></p>
<pre class="brush: bash;">

openssl genrsa -des3 -out server.key 1024
</pre>
<p><em>Then we create a certificate signing request</em></p>
<pre class="brush: bash;">

openssl req -new -key server.key -out server.csr
</pre>
<p><em>We make sure that everytime we start the apache server, we don&#8217;t have to type the passphrase</em></p>
<pre class="brush: bash;">

cp server.key server.key.org

openssl rsa -in server.key.org -out server.key
</pre>
<p><em>Lastly we self-sign the certificate</em></p>
<pre class="brush: bash;">

openssl x509 -req -days 365 -in server.csr -signkey server.key -out               server.crt
</pre>
<p><strong>Configure the Apache Server</strong></p>
<p>Edit your apache&#8217;s httpd.conf and uncomment the following lines (just search it in the file)</p>
<pre class="brush: bash;">

LoadModule ssl_module modules/mod_ssl.so

#PATH MAY DIFFER TO YOUR SETUP

Include conf/extra/httpd-ssl.conf
</pre>
<p>Next edit your apache&#8217;s httpd-ssl.conf, search for the following configuration item: SSLCertificateFile &amp; SSLCertificateKeyFile, change it to where your server.crt and server.key files are located respectively (absolute path!)</p>
<p>Finally if you&#8217;re using VirtualHost it is important to declare two NameVirtualHost (one for port 80 and port 443). Example:</p>
<pre class="brush: xml;">

NameVirtualHost 127.0.0.1:80

NameVirtualHost 127.0.0.1:443

&lt;VirtualHost 127.0.0.1:80&gt;

ServerName local.example.com

DocumentRoot /path/to/your/example.com/www

&lt;/VirtualHost&gt;

&lt;VirtualHost 127.0.0.1:443&gt;

ServerName local.example.com

DocumentRoot /path/to/your/example.com/www

SSLEngine on

SSLCertificateFile /path/to/your/server.crt

SSLCertificateKeyFile /path/to/your/server.key

&lt;/VirtualHost&gt;
</pre>
<p>Save and restart your Apache server!</p>
<p></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fjmgtan.com%2F2009%2F05%2F12%2Fapache-2-self-signed-certificates%2F&amp;linkname=Apache%202%3A%20Self-Signed%20Certificates"><img src="http://jmgtan.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://jmgtan.com/2009/05/12/apache-2-self-signed-certificates/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Bash script to backup mysql database</title>
		<link>http://jmgtan.com/2009/02/19/bash-script-to-backup-mysql-database/</link>
		<comments>http://jmgtan.com/2009/02/19/bash-script-to-backup-mysql-database/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 04:41:51 +0000</pubDate>
		<dc:creator>Jan Michael Tan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://jmgtan.com/?p=100</guid>
		<description><![CDATA[This is the first bash script I wrote, I used crontab to periodically backup and compress a mysqldb in a shared hosting environment #!/bin/sh user=testdbuser password=testdb dbname=testdb location=~/db_backups ts=$(date '+%Y%m%d-%H%M') mysqldump -u$user -p$password --opt $dbname &#62; $location/temp-$ts.sql cd $location tar -cvzf $dbname-db-$ts.tar.gz temp-$ts.sql rm -f temp-$ts.sql]]></description>
			<content:encoded><![CDATA[<p></p>
<p>This is the first bash script I wrote, I used crontab to periodically backup and compress a mysqldb in a shared hosting environment</p>
<pre class="brush: bash;">
#!/bin/sh
user=testdbuser
password=testdb
dbname=testdb
location=~/db_backups
ts=$(date '+%Y%m%d-%H%M')

mysqldump -u$user -p$password --opt $dbname &gt; $location/temp-$ts.sql
cd $location
tar -cvzf $dbname-db-$ts.tar.gz temp-$ts.sql
rm -f temp-$ts.sql
</pre>
<p></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fjmgtan.com%2F2009%2F02%2F19%2Fbash-script-to-backup-mysql-database%2F&amp;linkname=Bash%20script%20to%20backup%20mysql%20database"><img src="http://jmgtan.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://jmgtan.com/2009/02/19/bash-script-to-backup-mysql-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
