tag:blogger.com,1999:blog-81609083229201335102024-02-19T19:33:49.664+07:00secondlightThe first one give you hope in the darkness, while the second is sign of perseveranceBhttp://www.blogger.com/profile/08097573690296403442noreply@blogger.comBlogger202125tag:blogger.com,1999:blog-8160908322920133510.post-17885085716915939742012-02-26T00:34:00.002+07:002012-02-26T00:34:40.920+07:00Where do ?Where do people go when they want to listen to sound of their mind ? <br />
<br />
Where do people go when they want to listen to their minds ?Bhttp://www.blogger.com/profile/08097573690296403442noreply@blogger.com0tag:blogger.com,1999:blog-8160908322920133510.post-64363751161449017132012-02-16T18:23:00.000+07:002012-02-16T18:23:43.741+07:00I think you were thereI think you were there <br />
in everyone of my dream<br />
holding, hugging and kissing <br />
from the back of my foggy brain<br />
<br />
And wake up in the morning<br />
with a silly grin on my face<br />
but you were gone<br />
nothing to remember<br />
just a silly figment of my meta dream<br />
but you were there<br />
<br />
So if i saw you in the corner<br />
or in a coffe shop when i'm on a train<br />
would it really be you <br />
or am i in one of my dream<br />
<br />
...<br />
<br />
*Now, if only i could find a tune for this lyrics*Bhttp://www.blogger.com/profile/08097573690296403442noreply@blogger.com0tag:blogger.com,1999:blog-8160908322920133510.post-15704849135931283972011-11-10T13:11:00.000+07:002011-11-10T13:11:58.464+07:00D daythis is IT !<br />
the day !<br />
so bring your A game<br />
the innocent yet charming looks<br />
the witty but not hurtful response<br />
the smart and also caring way to talk<br />
<br />
this is MY DAY.Bhttp://www.blogger.com/profile/08097573690296403442noreply@blogger.com0tag:blogger.com,1999:blog-8160908322920133510.post-87951476747178249802011-08-22T06:02:00.000+07:002011-08-22T06:02:18.244+07:00Great IndonesiaI think there are 4 things that needs to be achieved before "This" country could become great. <br />
<br />
1. Find a good leader. Someone that doesn't have a debt on a political party, or even a pawn. Someone that doesn't consider how much he's being payed or how much he'll retired with. Someone who doesn't concern about putting his relatives on the government to make sure he stays in power. Simply someone who's interested in making changes in the 5 years he's running. <br />
<br />
2. Spread your culture if you want to dominate the world. <br />
<br />
3. Educate your people ! Not by superstitious things. But by leveraging their interest in science and knowledge<br />
<br />
4. Find a way to make people of religion, science and politics live in harmony. Bhttp://www.blogger.com/profile/08097573690296403442noreply@blogger.com0tag:blogger.com,1999:blog-8160908322920133510.post-51517374337224049222011-07-11T14:50:00.000+07:002011-07-11T14:50:08.875+07:00Cleaning up my GMail AccountOnce i thought my Gmail account is impossible to fill, but after a few years, couple of mailing list, couple of crazy mailing list, now i often need to clean up my email to make sure no email is lost because my inbox is full. This is what i usually do <br />
<br />
<b>Find email that has an attachment</b><br />
This is usually the quickest way to free same space. You can use <br />
<code> has:attachment </code> to query the mail that contains attachment in the search box. Or if you want, you can even specify the type of file by using <code> filename: .doc </code> adding "label:" to the query can give more refined search. Too bad we can't sort it by the attachment size<br />
<br />
<b>Using date</b><br />
We can also use date to delete our old email. This can be done by using the "before:" and "after:" query. For example : <br />
<code><br />
label:notification before:2011/01/01 after:2010/01/01<br />
</code><br />
<br />
Again, using label like the above example, can help to refine your search. And to lessen the impact if you search and then delete the wrong query :) <br />
<br />
<b>Starred mail </b><br />
While using the query above is very useful but often the queries return hundred or even thousand of emails. GMail will page the result, dependent on your settings it can give 25, 50 or even 100 in each page. But still a tedious task to do. GMail can help you even more, by selecting all of the email in that page, another option will come out in the top, that will let you select all of the email in this query. And then delete it. <br />
<br />
But this approach is a "scorched earth" approach. You will delete all of the email, but sometimes there are important email included in this search, the one that we usually mark with a star. Logically, we want another parameter in our query. Looking for a starred email can be done by adding <code> is:starred </code> parameter to our query. But what we need is a "not starred" parameter. This can be achieved by negating the previous parameter to : <br />
<code> -is:starred </code>. But the problem is, even there's only one email in the thread that isn't starred. The thread would still be selected. <br />
<br />
Thus why i create my own method to handle this. first i create a temporary label named "my_starred" then i go to each label and query <br />
<code><br />
label:notification before:2011/01/01 after:2010/01/01 is:starred<br />
</code><br />
<br />
selecting all, and add my_starred label. And then remove the notification label. After that you an select the notification label again with the date range, and then delete all the email. The last step is to go to the my_starred label, and change it back to the notification label. Repeat this for every other label that you want to clean up.Bhttp://www.blogger.com/profile/08097573690296403442noreply@blogger.com0tag:blogger.com,1999:blog-8160908322920133510.post-76416393125521883462011-07-11T13:06:00.001+07:002011-07-11T13:19:59.536+07:00HeavenSometimes people have to go through a series of unfortunate event. To understand, that their values didn't belong in this world. To Let go will give you a better understanding and the opportunity to rise again from the ashes, just like a phoenix soaring up to the sky. <br />
<br />
Heaven is DeadBhttp://www.blogger.com/profile/08097573690296403442noreply@blogger.com0tag:blogger.com,1999:blog-8160908322920133510.post-27426840905515674912011-07-11T05:55:00.001+07:002011-07-11T05:56:05.922+07:00Wild beastThe thing that we bear for others<br />
The things that we must do. <br />
what we mustn't do<br />
in the name of society, norm and values.<br />
<br />
But sometimes, it is necessary to be savages.<br />
To give in, to let your anger explode<br />
Becoming the wild beast that is full of lust and hatred<br />
Becoming the purest kind of human<br />
that will survive <br />
above everything<br />
<br />
Because after all of that has passed,<br />
you will find true calm and peaceBhttp://www.blogger.com/profile/08097573690296403442noreply@blogger.com0tag:blogger.com,1999:blog-8160908322920133510.post-66358780858199314812011-05-04T21:13:00.002+07:002011-05-04T21:13:21.257+07:00Debugging HTC Hero in UbuntuSo, when I'm not on my PC. I'm using ubuntu in my laptop. Turn out, developing on the device is not as a simple as in windows. You need to follow the link below to make it work.<br />
<br />
http://forum.xda-developers.com/showthread.php?t=823956Bhttp://www.blogger.com/profile/08097573690296403442noreply@blogger.com0tag:blogger.com,1999:blog-8160908322920133510.post-80596649780444355262011-04-02T02:52:00.069+07:002011-06-02T12:41:05.963+07:00Its time to have some bug tracking tools - Installing TracWe're in the stage where simple notes.txt isn't enough to track our project. I think we need a better bug/feature tracking tools. So, I'm going hunting for a few of the common bug tracking tools that's available on the market.<br />
<br />
I narrow down my choice into two, Jira and Trac. I've used Bugzilla before, but it never clicked with me. And also Bugzilla and Mantis have their own horror story. Jira actually caught my attention with the <a href="http://www.atlassian.com/software/jira/pricing.jsp">$10 starter pack</a>. But the next packet, 25 user for $1,200 is way out of my league.<br />
<br />
So finally my decision goes to Trac. It was simple enough. People won't be distracted or hinder by the many fields they need to fill to submit a bug. Both Jira and Trac support mercurial. Just perfect. And although simple and minimalistic Trac have two very cool feature :<br />
<ul><li><b>Timeline</b> – shows current and past project events in order</li>
<li><b>Roadmap</b> – shows the upcoming milestones to be achieved in the project</li>
</ul><br />
The only drawback in Trac is the interface, it has its way to annoy you when you look at it too long :P<br />
<h1>Installation</h1>I wont be installing this from scratch. I will be installing this at the last state of my <a href="http://secondlight.blogspot.com/search/label/infrastructure">infastructure post</a>.<br />
<br />
You can install Trac with mercurial support using this three simple steps : <br />
<div class="code">sudo apt-get install python-setuptools<br />
sudo apt-get install python-genshi<br />
sudo apt-get install trac-mercurial</div><br />
But when i write this blog post the trac version in ubuntu repository is 0.11.7. Since i want to use trac 0.12, I'll be doing some of the things manually. <br />
<br />
First I installed the setup tools using apt-get. <br />
<div class="code">sudo apt-get install python-setuptools</div><br />
Then I'm using setuptools easy_install to install Genshi and Trac <br />
<div class="code">sudo easy_install Genshi<br />
sudo easy_install Trac</div><br />
And for the trac-mercurial plugin, you need to check out and build it manually. But first you need to install subversion.<br />
<br />
<div class="code">sudo apt-get install subversion</div><br />
check out the code, build the egg, and install it<br />
<div class="code">mkdir trac-plugin<br />
cd trac-plugin <br />
svn co http://svn.edgewall.com/repos/trac/plugins/0.12/mercurial-plugin<br />
cd mercurial-plugin<br />
python setup.py bdist_egg<br />
sudo easy_install dist/TracMercurial-0.12.0.28dev_r10657-py2.6.egg</div><br />
After finished installing Trac, lets do some test. But first you need to create a database for Trac in mysql. Using mysql root user :<br />
<div class="code">-- It is better to set the innodb as the default storage engine<br />
mysql> create database trac;<br />
mysql> grant all privileges on trac.* to 'trac'@localhost identified by 'mypassword';<br />
mysql> flush privileges</div><br />
Trying logging out and then loggin in using the new account.<br />
<br />
Next, you need to install python library for connecting to mysql from python.<br />
<div class="code">sudo apt-get install python-mysqldb</div><br />
And the basic setup is complete.<br />
<br />
<h1>Create A Trac Project</h1>Now we need to create a trac project. Since i want it to be integrated with my mercurial server. I've created the project in my hguser account.<br />
<div class="code">sudo su - hguser</div><br />
create the directory for your project<br />
<div class="code">mkdir -p ~/trac/myproject</div><br />
init the project<br />
<div class="code">trac-admin ~/trac/myproject initenv</div><br />
If you're having a problem with trac-admin not in your path, try logging out and then relogin to your system.<br />
<br />
The initenv command will ask some question. On the database connection string input this :<br />
<div class="code">mysql://username:password@hostname:port/databasename</div><br />
After finish with the environment, we need to modify the configuration file to support mercurial. <br />
<div class="code">vi /home/hguser/trac/myproject/conf/trac.ini</div><br />
modify the file with the line below : <br />
<br />
<div class="code">[components]<br />
tracext.hg.* = enabled[repositories]<br />
<br />
[trac]<br />
repository_dir = path_to_default_repository<br />
repository_type = hg</div><br />
<br />
You can start trac server and see the result by accessing http://yourserver:8000/myproject<br />
<br />
<div class="code">tracd --port 8000 ~/trac/myproject</div><br />
<h1>Integrating with apache</h1>Mod_python is dead, so I'm choosing mod_wsgi to integrate trac with my apache server. First you need to install mod wsgi and restart the apache2 server <br />
<div class="code">sudo apt-get install libapache2-mod-wsgi<br />
sudo service apache2 restart</div><br />
sudo to the hguser and create egg-cache directory under ~/trac/myproject <br />
<br />
to create the wsgi file you can create it manually, or use the trac-admin deploy method like below : <br />
<div class="code">trac-admin trac/myproject deploy /tmp/deploy</div><br />
it will create the .cgi .fcgi .wsgi file under the cgi-bin directory. Then you can copy the file to the real cgi-bin directory <br />
<div class="code">sudo mkdir /usr/lib/cgi-bin/trac<br />
sudo cp /tmp/deploy/cgi-bin/trac.wsgi /usr/lib/cgi-bin/trac/myproject.wsgi<br />
sudo chmod +x /usr/lib/cgi-bin/trac/myproject.wsgi</div><br />
now you need to add the new location to your apache configuration file. Usually it's under site-enabled/000-default-file . I'm using port 8008 for this purpose but later will create a subdomain for trac :<br />
<br />
<div class="code"><virtualhost *:8008=""><br />
ServerAdmin webmaster@localhost<br />
DocumentRoot /var/www<br />
<br />
#WSGI scrip for trac<br />
WSGIScriptAlias /trac/myproject /usr/lib/cgi-bin/trac/myproject.wsgi<br />
<br />
<Directory /home/hguser/trac/myproject><br />
WSGIApplicationGroup %{GLOBAL}<br />
Order deny,allow<br />
Allow from all<br />
</Directory><br />
</virtualhost></div><br />
After restarting apache, you should be able to access your trac installation in http://yourlocalhost:8008/trac/myproject<br />
<br />
While trying to integrate trac with apache, I keep stumbling to an error that said : <br />
<br />
TimeoutError: Unable to get database connection within 0 seconds. (TracError: Database "/usr/www/trac/db/trac.db" not found.)<br />
<br />
I'm using mysql so trac shouldn't need to create the embedded db. It seems that trac couldn't read the content of my trac.ini files. It turn out that I've stumble to <a href="http://trac.edgewall.org/ticket/10044">this bug</a>. As a work around I added group read-write permission ,<br />
<div class="code">sudo chmod g+rw ~/trac/myproject/conf/trac.ini</div>but i wonder, will this create a security problem. Since the trac.ini contains the db access URL ?<br />
<br />
<h2>Configuring Authentication</h2>To add authentication method, I just added my mercurial hgusers file<br />
<br />
<div class="code"> <location /trac/myproject/login><br />
AuthType Basic<br />
AuthName "Trac"<br />
AuthUserFile /home/hguser/hgusers<br />
AuthGroupFile /home/hguser/hggroups<br />
Require group myproject<br />
</Location><br />
<br />
</div>To be able to use the admin web page you need to add admin privileges to your user<br />
<div class="code">trac-admin ~/trac/myproject permission add frodo TRAC_ADMIN</div><br />
it is recomended to install the <a href="http://trac-hacks.org/wiki/AccountManagerPlugin">AccountManager </a>plugin. To install it run<br />
<br />
<div class="code">sudo easy_install https://trac-hacks.org/svn/accountmanagerplugin/trunk<br />
</div><br />
and then go to the admin tab > plugin , and enable the features<br />
<br />
<h2>Removing anonymous user access</h2>You can disallow anonymous user access by <br />
<br />
<br />
<div class="code">trac-admin ~trac/myproject permission remove anonymous '*'<br />
</div>Bhttp://www.blogger.com/profile/08097573690296403442noreply@blogger.com0tag:blogger.com,1999:blog-8160908322920133510.post-197685889431890532011-03-17T16:27:00.001+07:002011-04-01T15:16:49.116+07:00Mercurial : Separating two groupsIn my mercurial setup a new requirement has come up. I need to separate two groups of user, lets call the first group <b>research </b>and the second one <b>project</b>. A user can belong to one of the groups or both. My mercurial server is setup like <a href="http://secondlight.blogspot.com/2010/10/setting-your-own-private-mercurial.html">this</a>, and then I modified it a little to enable the virtual server name right <a href="http://secondlight.blogspot.com/2010/12/setting-new-dedicated-server_26.html">here</a>. To implement this requirement I'm following the <a href="http://mercurial.selenic.com/wiki/PublishingRepositories#Configuring_Apache">public and private repositories</a> and modified it a little.<br />
<br />
<b><span class="Apple-style-span" style="font-size: large;">Configuration</span></b><br />
<br />
First, what i do is i log-in as the hgusers (user I've setup specially for mercurial, see the first blog post). At the hgusers home directory I've <b>created</b> a new folder called <b>project</b>. And then I move hgusers and hgweb.config from the hg folder to the hgusers main folder.<br />
<br />
We need to create a different set of file for our repositories. So copy each of the config files :<br />
<div class="code">$> cp hgweb.config hgweb_project.config</div><br />
and then modify hgweb_project.config content so it will point to the new project folder. The file content should look like this :<br />
<br />
<div class="code">[collections]<br />
/home/hguser/project/ = /home/hguser/project/</div><br />
now go to our hgweb.cgi directory and copy the file<br />
<div class="code">$> cd /usr/lib/cgi-bin/hg/<br />
$> cp hgweb.cgi hgweb_project.cgi</div><br />
modify the config variable to point to the project repo folder<br />
<br />
<div class="code">config = "/home/hguser/hgweb_project.config"</div><br />
and finally modify the apache settings <br />
<div class="code">vi /etc/apache2/sites-enabled/000-default</div><br />
copy the previous ScriptAlias and Location div, and modify it to point to the project location. Another that you need to do is to add the AuthGroupFile, and change The Require line. I will go into detail about this in the next section. The file should look like this : <br />
<br />
<div class="code">ScriptAlias /project /usr/lib/cgi-bin/hg/hgweb_project.cgi<br />
<br />
<location project=""><br />
AuthType Basic<br />
AuthName "Mercurial repositories"<br />
AuthUserFile /home/hguser/hgusers<br />
AuthGroupFile /home/hguser/hggroups<br />
Require group project<br />
</location><br />
<br />
ScriptAlias /repo /usr/lib/cgi-bin/hg/hgweb.cgi<br />
<br />
<location repo=""><br />
AuthType Basic<br />
AuthName "Mercurial repositories"<br />
AuthUserFile /home/hguser/hgusers<br />
AuthGroupFile /home/hguser/hggroups<br />
Require group research<br />
</location></div><br />
<b><span class="Apple-style-span" style="font-size: large;">Creating Group</span></b><br />
I already have user sam and frodo from my previous settings. Now i'm adding two more user using htpasswd command. The users are golum and sauron. <br />
<br />
Now we need to create the group for these users. To do this go to the hguser home directory and create a new file called hggroups. You can use VI or your favorite text editor to create it. The file content should look like this : <br />
<br />
<div class="code">research: frodo sam golumn<br />
project: golumn sauron</div><br />
the word before the colon is the group name, like the one you specify on the Require group line. And the words after that is the users that belong to the group. In my setup sauron would only able to see the project repository (limiting his access). And so does frodo and sam, they can only see the research repository. While golumn would be able see both repo. Just what i wanted to.<br />
<br />
If you wanted to have a lot of user that can access both group, you could create a new group and than add that group to the Require lineBhttp://www.blogger.com/profile/08097573690296403442noreply@blogger.com0tag:blogger.com,1999:blog-8160908322920133510.post-59068815670301587962011-03-13T02:41:00.001+07:002011-03-13T02:41:26.023+07:00II love non self centered people. And my number 1 list, is to witness a miracle, from me.Bhttp://www.blogger.com/profile/08097573690296403442noreply@blogger.com0tag:blogger.com,1999:blog-8160908322920133510.post-88352511254088290022011-02-24T12:11:00.001+07:002011-03-17T12:08:26.726+07:00Saving youtube video from google chromeIf you remember my post about <a href="http://secondlight.blogspot.com/2010/01/firefox-flv-cache.html">youtube flv cache files</a>, I've been saving my youtube video's manually. I like this approach because it allowed me to watch the video first, if I found it interesting then I will save the video. While some firefox plugin allow you to save youtube videos, it often force you to re-download the video from the beginning. And if you just download the video without watching it first, some time after one hour of waiting you just end up with a complete garbage !<br />
<br />
These days I'm using Google Chrome as my main browser. So I'm faced with the same problem in a different environment. Unlike firefox, Chrome uses the windows temp to store its temporary files. Including the FLV files. But it's very defensive. You can't copy the cache while chrome uses it, and if you close the tab that shows the video, Chrome will immediately delete the file. Giving you no time to copy it. Damn you google guys :P<br />
<br />
After some goggling i finally found a solution. Hobocopy to the rescue ! Hobocopy is an open source utility that can copy copy-protected file in windows. You can download hobo copy from <a href="https://github.com/candera/hobocopy/downloads">here</a>. Using this approach I can copy the protected files. The flv cache files can be identified easily by their name and size. Usually it will start with fla and end up with .tmp extension. So using Hobocopy i can copy the file i want as simple as :<br />
<br />
<div class="code">C:\HoboCopy.exe C:\temp F:\MyVideos\ fla18E.tmp<br />
</div><br />
But you must be aware, since Hobocopy is not actually a file copy utility, the Syntax is a bit different.<br />
<br />
Another thing that I've found out is about the firefox case. Remember when firefox only cache a part of my video but I can still play the full video in my browser. It turn out you can get the full FLV video's from Windows temp directory using this same exact method.<br />
<br />
Now i can view my Youtube video's without worry about rebuffer and wasted a lot of bandwidth :DBhttp://www.blogger.com/profile/08097573690296403442noreply@blogger.com0tag:blogger.com,1999:blog-8160908322920133510.post-31632688273557543442011-02-10T12:21:00.001+07:002011-02-24T11:22:12.615+07:00Screen Scrapping Guide for JavaI created and app about one year a go. The application need to screen scrap a website because it didn't give an API to access the data. When i started, I was confused by so many choice that available for screen scrapping in java. And at that time I've decided to go with NekoHTML, its very powerful but also complicated and a bit of nightmare to maintain. So today i decided to look for better alternative. It turn out, after one year I easily confused by the so many java library out there that i can use. So i decided to create this guide.<br />
<div><br />
</div><div><b>Regex</b></div><div>The simplest and probably the fastest way to do screen scrapping in Java. The regex class is already included in the standard java library. So you don't need to add another library and learn how they work.</div><div><br />
</div><div>The problem is, regex is very prone to error. There are many reason for the error. It could be because the html doesn't comply to standards, bad implementation, or even non matching tags. And also a simple change on the website could break the whole regex rule and you need to start from zero. </div><div><br />
</div><div>To use regex, you need to be very diligent about white space character, or it's only a matter of time before it bites you.</div><div><br />
</div><div><b>NekoHTML</b></div><div>This is one of the best parser that i know. It often used on other framework such as HTMLUnit as the default html parser. It creates the DOM representation of the page, and then you can traverse through the DOM tree getting each node content. Since it such a low level access, its a bit of pain to maintain. And also you still need to traverse throug the node that isn't important for you. Such as empty text, series of newline, break tag, etc. </div><div>To overcome this you can add a custom filter to remove the unnecessary tag, and uses XPath to query the tag that you are interested in. </div><div><br />
</div><div><b>HTMLUnit</b></div><div>Beside as a framework for testing, you can use html Unit for screen scrapping. It can be used for screen scrapping. You just create a webclient and then you can access the tag that you are interested in using the getHtmlElementById or you can also uses XPath. Then you can access the data as an XML or Text. </div><div><br />
</div><div>It gives a higher abstraction, you don't need to traverse the DOM tree manually. And it also gives build in cookie management, proxy access, JavaScript, CSS and Ajax Support. Everything that you ever need from a headless browsers.</div><div><br />
The funny thing is, after looking for something new, i decided to stick with NekoHTML. Its fast, and implementing custom filter helps me a lot. And it also doesn't come with the unnecessary bagage such as Javascript, CSS and Ajax Support. I don't need it for the moment. And of course using XPath has become very valuable. It cuts my previous code to 1/3 even 1/4 in some case. No more manually navigating through the dome, and it's more intuitive. I think i finally found the right tool :)<br />
<br />
<br />
</div><div><br />
</div><div>Hope that helps , I'll re-write the rant some other time to give better explanation. :)<br />
<br />
<br />
<div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div></div><div></div></div>Bhttp://www.blogger.com/profile/08097573690296403442noreply@blogger.com0tag:blogger.com,1999:blog-8160908322920133510.post-91253994997415023952011-01-29T14:46:00.002+07:002011-01-29T14:46:29.175+07:00CrazyI'm going crazy. There's only so much that one people can handle. Got to do something, or i will break down and crumble.Bhttp://www.blogger.com/profile/08097573690296403442noreply@blogger.com0tag:blogger.com,1999:blog-8160908322920133510.post-14646294576369596532011-01-12T21:33:00.000+07:002011-01-12T21:33:20.678+07:00Unanswered prayerIf only someone know what I'm going through.Bhttp://www.blogger.com/profile/08097573690296403442noreply@blogger.com0tag:blogger.com,1999:blog-8160908322920133510.post-13359690324833235462011-01-11T01:42:00.001+07:002011-01-11T01:43:34.796+07:00Be brave !You know, there's many way that people choose how to live their lives.<br />
There are the ignorants, the bastard, and there is the wanderer, the one that always wonder what to do and what would their live would have been.<br />
But for most people, their live is govern by fears.<br />
<br />
Fear of dying, fear of breaking the law, fear of god, fear of the uncertain future.<br />
Fear of their position, fear of their place in the society, and the end fear for live it self.<br />
Must've been sucks to live like that.<br />
What ever the action, whatever the luckyness that some how happened to them,<br />
they can never enjoy the things to the fullest.<br />
Always worry what would happened next.<br />
<br />
It's a choice, and maybe the one that is closest to the right answer is the ignorants. They don't seem to care about the future, the society, and maybe live it self. The only problem is, they don't care about anything. Because it takes a whole lot of courage to really care about something.<br />
<br />
So...<br />
Make a choice, don't be afraid.<br />
Just live your life to the fullest.<br />
Day by day, minute after minute.<br />
Don't be afraid,<br />
maybe society will treat you bad when you broke their rule,<br />
and maybe , you're wrong. It just the way live is, everybody make mistake<br />
so don't let anything stop you.<br />
Just remember one rule, don't ever, ever ! Let your action based on the intention of hurting someone else.<br />
<br />
In other word, be brave ! And don't give a fuck about what the world thinks !<br />
And in the end, life will find you a path !Bhttp://www.blogger.com/profile/08097573690296403442noreply@blogger.com0tag:blogger.com,1999:blog-8160908322920133510.post-1116515758139752452011-01-09T12:01:00.000+07:002011-01-09T12:01:23.180+07:00POM 2- I treat my Friends like Family, and I treat my Family like my Enemy<br />
<br />
- Politician, people that came when ever an opportunity arises, and leave in the wake of destruction. (AFF 2010)<br />
<br />
- If we should lose, we should lose gracefully (AFF 2010)Bhttp://www.blogger.com/profile/08097573690296403442noreply@blogger.com0tag:blogger.com,1999:blog-8160908322920133510.post-12846686688568523652011-01-05T14:54:00.000+07:002011-01-05T14:54:07.094+07:00Who we are<div style="text-align: center;">We work to satisfy our souls.</div><div style="text-align: center;">Money is important, but it should never be our first priority. </div><div style="text-align: center;">It should be the means to keep us going.</div><div style="text-align: center;">Doing what we do, Doing what we loved.</div><div style="text-align: center;"><br />
</div><div style="text-align: center;">Because what matter to us,</div><div style="text-align: center;">Is not how to get rich fast.</div><div style="text-align: center;">But to see the the joy, and appreciation.</div><div style="text-align: center;">When what we make, have a direct positive impact to the people that use it.</div><div style="text-align: center;"><br />
</div><div style="text-align: center;">Its like sailing against the wind,</div><div style="text-align: center;">with barely enough, and torn out sail.</div><div style="text-align: center;">And for that, we need a lot of help,</div><div style="text-align: center;">and Friends.</div><div style="text-align: center;"><br />
</div><div style="text-align: center;">But we are sure,</div><div style="text-align: center;">one day we'll make it. </div><div style="text-align: center;">To be able to sail against the wind.</div><div style="text-align: center;">And when that time comes, </div><div style="text-align: center;">please joins us with your spirit and courage.</div><div style="text-align: center;">Because after that, we can only go faster !</div>Bhttp://www.blogger.com/profile/08097573690296403442noreply@blogger.com0tag:blogger.com,1999:blog-8160908322920133510.post-8917958959837374022011-01-05T10:47:00.000+07:002011-01-05T10:47:08.449+07:00YouI just realize why she couldn't ever say yes.<br />
<br />
It's because somehow it would make an end isn't it ? Your world would stop turning. Everything that is you, somehow would change. The problem is, whether you would like the change or not. I guess your action is the answer that you've found. Probably you're scared, very-very scared, that why you weren't able to believe. And I think you're probably right :) <br />
<br />
It's such a shame that we weren't meant for each other :)Bhttp://www.blogger.com/profile/08097573690296403442noreply@blogger.com0tag:blogger.com,1999:blog-8160908322920133510.post-21225501801061995542010-12-30T18:58:00.002+07:002011-01-05T10:47:59.115+07:00POM- He lives in black and white world, there is no room for grey area-<br />
<br />
- Money will always come and go, no use of saving it or hold on to it too tightly. You just have to spend it wisely-Bhttp://www.blogger.com/profile/08097573690296403442noreply@blogger.com0tag:blogger.com,1999:blog-8160908322920133510.post-39229497016207718182010-12-26T01:46:00.019+07:002011-04-01T15:17:19.085+07:00Setting new dedicated serverI'm migrating my VPS server to a new dedicated server. So i need to repeat the same proses I've done for the old server to this one. For future reference , I'm going to document my steps :)<br />
<br />
<br />
<b>Setting swappiness</b><br />
<br />
To set the vm.swappiness permanently you need to edit the /etc/sysctl.conf file and add the line<br />
<br />
<div class="code">vm.swappiness=10</div><br />
The default number usually 60. The smaller the number means that your system is unlikely to swap process from memory to the swap space. To see the change, use :<br />
<br />
<div class="code">cat /proc/sys/vm/swappiness</div><br />
<br />
<b>Installing Sun JDK package</b><br />
<br />
I'm still very fond to use the JDK from SUN, to do that in ubuntu you need to follow this steps.<br />
<br />
You can add the repository manually by editing /etc/apt/sources.list<br />
or installing the package python-software-properties and run<br />
<br />
sudo apt-get install mysql-server-5.1<br />
<br />
<div class="code">sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"</div><br />
Then, update the repository information and install the jdk<br />
<br />
<div class="code">sudo apt-get update<br />
sudo apt-get install sun-java6-jdk</div><br />
<b>Installing MySQL</b><br />
<div class="code">sudo apt-get install mysql-server-5.1<br />
vi /etc/mysql/my.cnf #change the default port</div><br />
<br />
<b>Installing glassfish</b><br />
<div class="code">wget -b -c -i http://download.java.net/glassfish/3.0.1/release/glassfish-3.0.1.zip -o log.out<br />
sudo apt-get install unzip<br />
unzip glassfish-3.0.1.zip</div><br />
Start glassfish<br />
<div class="code">./glassfish/bin/asadmin start-domain domain1</div><br />
Connect to the admin console and change the admin password<br />
<div class="code">http://yourip.net:4848/<br />
enterprise server > administrator password<br />
logout and re-login</div><br />
If you want a more secure and thorough set-up you can follow this <a href="http://www.nabisoft.com/tutorials/glassfish/installing-glassfish-301-on-ubuntu">guide</a>. I usually just change the port in the admin console to 80.<br />
<br />
<b>Installing Apache</b><br />
<div class="code">sudo apt-get install apache2</div><br />
enable reverse proxy<br />
<div class="code">sudo a2enmod proxy<br />
sudo a2enmod proxy_http<br />
sudo /etc/init.d/apache2 restart</div><br />
add reverse proxy context<br />
<div class="code">sudo vi /etc/apache2/sites-enabled/000-default<br />
ProxyPass /itsme/ http://www.mysite.net:8080/itsme/<br />
ProxyPassReverse /itsme/ http://www.mysite.net:8080/itsme/</div><br />
if you have a problem "client denied by server configuration proxy" you need to modify the proxy.conf to allow access to your site. So far the only solution i know is by adding allow all or commenting deny all in the proxy.conf file. To edit the conf file, use this command : <br />
<div class="code">sudo vi /etc/apache2/mods-enabled/proxy.conf </div><br />
if you wan't to pass the original ip through your proxy server follow this <a href="http://www.xinotes.org/notes/note/770/">link</a>. <br />
<br />
<b>Setting mercurial server</b><br />
To set the mercurial server you can see my previous <a href="http://secondlight.blogspot.com/2010/10/setting-your-own-private-mercurial.html">post</a>.<br />
<br />
<b>Using subdomain for mercurial server</b><br />
To do this you need to add a CNAME entry to your DNS Server. For example I ask my hosting support to add CNAME entry for hg.myserver.net. <br />
<br />
After that, you just need to copy the virtual host from the 000-default files and add<br />
<br />
<div class="code">ServerName hg.myserver.net</div><br />
And you should be able to access your hg server using http://hg.myserver.net/hg<br />
<br />
I've edited the location and path for this virtual server so i can access it using http://hg.myserver.net/repo. Better than the redundant hg for the url :)<br />
<br />
<b>Start glassfish at reboot time</b><br />
Create a glassfish.sh file at your home directory, copy the code below as the content<br />
<div class="code"><br />
#!/bin/sh<br />
#<br />
### BEGIN INIT INFO<br />
# Provides: scriptname<br />
# Required-Start: $remote_fs $syslog<br />
# Required-Stop: $remote_fs $syslog<br />
# Default-Start: 3 4 5<br />
# Default-Stop: 0 1 2 6<br />
# Short-Description: Start daemon at boot time<br />
# Description: Enable service provided by daemon.<br />
### END INIT INFO<br />
<br />
GLASSFISH_HOME="/home/mreunion/glassfish/"<br />
<br />
case "$1" in<br />
start)<br />
$GLASSFISH_HOME/bin/asadmin start-domain<br />
;;<br />
stop)<br />
$GLASSFISH_HOME/bin/asadmin stop-domain<br />
;;<br />
restart)<br />
$GLASSFISH_HOME/bin/asadmin restart-domain<br />
;;<br />
force-reload)<br />
$GLASSFISH_HOME/bin/asadmin restart-domain<br />
;;<br />
*)<br />
echo "usage: $0 (start|stop|restart|help)"<br />
esac</div><br />
<div class="code">sudo cp glassfish.sh /etc/init.d/ <br />
sudo chmod +x glassfish.sh<br />
sudo update-rc.d glassfish.sh defaults</div>Bhttp://www.blogger.com/profile/08097573690296403442noreply@blogger.com0tag:blogger.com,1999:blog-8160908322920133510.post-10507087434400460402010-12-14T05:01:00.000+07:002010-12-14T05:01:26.708+07:00Wireless setupSo i've got this Linksys WAP54G in my home, and try to set it up. I'm having trouble with the automatic setup, so reading <a href="http://seoroot.com/blog/networking/how-to-configure-a-linksys-wap54g-access-point.html">this</a> helps a lot.<br />
<br />
Now i can ping and connect to my access point, I'm facing another problem. I didn't have any dhcp server. That's why my ubuntu laptop keep turning off the wifi connection. Setting the auto wireless to have a static ip address fix the problem.<br />
<br />
Last but not least, i try connecting through my htc hero. Found the same problem , <a href="http://www.thisandroidlife.com/2009/09/setting-static-ip-address-for-wi-fi/">this</a> article help me set the static ip address.<br />
<br />
The funny thing i setup all this, because I'm having a problem adding a third gmail account on my htc hero.It keep saying it need reliable network. Trying to clear the application data didn't work. So as a worked around i delete my second gmail account, and login to youtube using my third gmail account. And it worked.<br />
<br />
Well at least after all this now i have a Wifi Access point in my home now :)Bhttp://www.blogger.com/profile/08097573690296403442noreply@blogger.com0tag:blogger.com,1999:blog-8160908322920133510.post-15063235301889502822010-11-26T20:02:00.000+07:002010-11-26T20:02:28.378+07:00The wordSo, what is life ? <div>If a single living organism live and died so soon,</div><div>Do heaven ? or Hell ? l is filled with them ? </div><div>In that short time living, does it meant anything ? </div><div>Or do they got a second chance, </div><div>to be reborn with the same soul every time ? </div><div><br />
</div><div>And if we see the universe, </div><div>that's so wide a cross , space and time. </div><div>Do we.. that look smaller than amoeba for them, </div><div>matter ? </div><div><br />
</div><div>Do our story will ever be heard, </div><div>one hundred thousand year from now ? </div><div>our tiny spark of light in history. </div><div><br />
</div><div>And what do these rules that we hold on so tightly,</div><div>to obey, to follow, and to pass on. </div><div>Would they matter to life ? </div><div><br />
</div><div>Sometimes, a simple happiness is enough. </div><div>Why does it so hard to get ? </div><div>And when someone finally get it, </div><div>then why do so many people want to take it away ? </div><div><br />
</div><div>Life is cruel, life is random, life is not ordinary. </div><div>Then Why ..... </div><div><br />
</div><div>Do we even bothered.</div><div><br />
</div><div><br />
</div>Bhttp://www.blogger.com/profile/08097573690296403442noreply@blogger.com0tag:blogger.com,1999:blog-8160908322920133510.post-85064649905856007982010-11-23T21:48:00.002+07:002010-11-23T21:48:33.627+07:00wayMore Lost Than A Child<br />
Angry with the world<br />
For though I'll be sorry for what i'll do<br />
Neither of this is a concern of you<br />
<br />
Cause I am who I am<br />
I've become what I've dream I become<br />
A dream where no angel, only shadow and despair<br />
<br />
For those of you citizens of this world<br />
My apologies<br />
But life .....<br />
Is not merely all about humanBhttp://www.blogger.com/profile/08097573690296403442noreply@blogger.com0tag:blogger.com,1999:blog-8160908322920133510.post-7739432122247319782010-11-23T20:33:00.000+07:002010-11-23T20:33:13.772+07:00The times ...There are times when you feel like, live isn't worth living anymore.<br />
<br />
And today I've wondered. What my limit would be.Bhttp://www.blogger.com/profile/08097573690296403442noreply@blogger.com0