Showing posts with label Tutorial. Show all posts
Showing posts with label Tutorial. Show all posts

27 October 2012

Eclipse Github Setup

Download and install GIT for Windows (http://git-scm.com/downloads)

Set up system environment variables GIT_SSH pointing to ssh binaries (usually  C:\Program Files\Git\bin\ssh.exe) and user account environment variables HOME = %USERPROFILE%

In Eclipse, install EGit and GitHub Mylyn Connector.

In Eclipse, create new ssh key (Windows->Preferences->SSH2) and upload public key (*.pub) to Github. Make sure the Eclipse variable ssh2 home is set to where you save the created key. Usually found in Windows->Preferences->SSH2.

In Eclipse, create new project. Right click project and choose Team->Share->Git. Then Team->Add index. Then Team->Commit. This will save it in your local git repository.

In Github create repository and note its HTTP and/or SSH URL. Usually its https://github.com/[username]/[reponame].git or ssh://git@github.com:[username]/[reponame].git

In Eclipse, right click project and select Team->Remote->Push. When SSH is use, username=git password is emtpy. When HTTPS is use, enter your Githug username and password and select "Store in Secure Store"

10 April 2012

Eclipse SVN Setup

Requirements

  • Eclipse IDE for Java EE developers
    • with Subversive plugin
  • Tomcat 6 binary distribution (or what's on production)
  • Java 1.6 (or what's on production)

Environment Setup

  • Setup eclipse
    • Setup the Installed JREs
      • Window > Preferences > Java > Installed JREs. Select Add if a JRE is not yet configured.
      • Select Standard VM in the JRE Type window and click Next.
      • Populate the JRE Home field with the location of your Java installation.
    • Setup Server Runtime Environment.
      • Window > Preferences > Server > Runtime Environments. Select Add if a Tomcat Server is not yet configured.
      • Select Apache > Apache Tomcat v.6.0 in New Service Runtime Environment. Click Next.
      • Set the Tomcat installation directory to the location of the Tomcat binary distribution folder.
      • Select the right JRE.
  • Check out the customer project
    • Open the SVN Repository Exploring Perspective (Window > Open Perspective > SVN Repository Exploring)
    • Right click on the SVN Repositories view > New > Repository Location...
    • Enter https://svn.... in the URL field and enter in Authentication info.
    • A new repository location should appear in the SVN Repositories view. Right click the repository and select Check Out.
      • This action will checkout the project into your workspace.
    • Once done, return to the Java EE perspective and ensure a new project named "customer-portal" is in your Package Explorer (or Project Explorer) view.
  • Exclude Eclipse resource files (.settings folder, .project file, .classpath file) and /build folders from SVN to prevent from being checked in (especially the /build folder).
    • First, determine if you can see the resource files by expanding the customer-portal project. If you can see them, skip the next step.
    • If you cannot see the resource files, in the Package Explorer view, click on the View Menu button (it's a white arrow pointing down, next to the package explorer's Collapse All, Link with Editor, Minimize, Maximize controls), and select Resources...
      • Deselect .*resources from the Select the elements to exclude from the view box.
      • Click OK. The resources files should now appear in the package explorer view
    • Select the three resource files (.settings folder, .project file, .classpath file) and right click > Team > Add to svn:ignore...
    • Select OK.
    • Do the same for the /build folder (if it does not exist yet, create the folder "build" in the root of the customer-portal project).
      • A question mark should appear in the folder indicating that it's not version controlled.
      • Right click the folder > Team > Add to svn:ignore. Click OK.
  • Load the project's build file
    • Open the Ant view by selecting Window > Show View > Ant
    • Expand the customer-portal project and locate build.xml file
    • Drag and drop the build file onto the Ant view.
    • The build file should now appear in the view, which once expanded shows a list of all tasks in the build file.
  • Confirm the environment is setup correctly by running sandbox-war or production-war, and that the war files appear under /build (a refresh F5 might be needed to show the folders).

17 June 2009

The Day I Got My Driver's License


Today, I finally got my Philippine driver's license. It took me exactly 9 hrs and 7 minutes of waiting in queues, daydreaming on Neverland and actualyl sleeping on squeaky benches. Heres what happened:

5:00 AM: Arrived at LTO Office. The morning was dark, the gates closed, the building quiet and deserted.

5:26 AM: The second applicant arrived. Now the place is a little less creepy.

5:34 AM: Our Help arrived. She asked me to follow her and fill out two identical forms. This used to simultaneously queue me to both medical check-up and drug testing.

The Help helped us at the actual processing. What I did was paying the Help a little extra to speed up the processing of my papers. It is tantamount to an express processing of papers; you pay a little more to get want you want faster (oh, and one less step). Lets just say its an unofficial and unspecified type of LTO service.

Before continuing, it is necessary to tell you that technically the first step in getting a Philippine Driver's License is being given the application form. However, in actuality, in order to get one, the applicant needs a completed medical check-up as well as a drug test. I'd like to point out I have neither. Moving on...

6:04 AM: Exactly 8 applicants on queue to get their application form. The sun is up at last.

6:17 AM: 20 applicants.

Now I'm indicating the number of applicants because for the written part of the exam, they will only take 30 for each batch, and on a normal day, the first batch usually get their license before lunch.

6:34 AM: Medical check-up. For Php 100.00, the doctor took my height and weight and asked me to read a series of letters approx. 1 cm big about 5 feet away. Reading the letters; totally nailed it!

7:XX AM: (I didn't got the exact time :P) The queue for receiving the application form started to move and I still haven't finish drug testing. So me being the first applicant was all for naught.

8:14 AM: Finally finished my drug test. For Php 300.00, I filled up a form, peed on a cup, digitally took my fingerprints and sign. Being sleepy and all, I kinda missed on the cup a few times. Not a big splash, more of a sprinkle on my fingers. The thing is, the sink is outside the rest room so all people who did their drug test there most probably have turn the door knob using their urine enriched hands.

8:21 AM: Finally got my application form.

Now, the next step is another queue. This time a guard will give you a number. This will be for the written exam. Lucky for me, because of the Help, I was automatically give a number...14.

Now I don't know if I'm just unlucky but LTO's network was offline. Therefore, all processing was stopped we had to wait, indefinitely, until the internet connection is fixed. Damn PLDT!

9:22 AM: Finally online! The pain continues...

9:22 - 10:XX AM: A series of step. On Window 1 (I forgot what is this for) I gave my application form, on Window 3(Photosig), they took my picture and digital signature, and on Window 11(Cashier), paid Php 167.63. I don't know what was that for but I'm pretty sure it has something to do with the written test.

10:2X AM: LTO Lecture. Now there wasn't any lecture. The person simply gave us reviewers and specifically told us to review traffic signs. But if you look around, road signs literally glued on the wall.

10:4X AM: Started the test. The exam is a multiple choice, 40 item test. The first 30 are about road knowledge while the last 10 are about traffic signs. Everything is in Tagalog. The questions are easy. Even if I didn't study I would have passed the test. Each item has 3 choices and an average person get eliminate at least on wrong choice. For instance, if you were asked "How should you look at your side mirrors", the choice "Whenever I want" is clearly wrong. However when I took mine, the questionnaire, although newly printed has some weird, light, pencil checks on one of the choice for each number. What do you think was that for? *wink*.

10:5X AM: Finished the test.

Now there is supposed to be another step here, the practical driving test but because of the Help, I skipped it. Hooray for the Help. Now just to be fair, I know how to drive an automatic car, but their test vehicles are manual.

11:06 AM: Waiting in front of Window 11 (Cashier) to pay for my license.

11:41 AM: Still no name call. Worrying that I might have to wait through their lunch break.

11:59 AM: Lunch break. Crap! Crap!! Crap!!!

12:47 PM: They resumed their work. Now I was amazed that they didn't milked their 1hr lunch break.

Around 1:XX, my application is now on Window 11 (Cashier). Since the payment the Help received includes the actual license fee, they didn't even call my name. They processed my papers first and finally...

2:07 PM: My name was called on Window 12 (Releasing). And I got my shiny license.

27 April 2009

Using Eclipse with Subversion

I finally decided to set-up my previously-configured-solely-for-thesis laptop to include any software application projects that I may undertake. The first thing I did was to configure my favorite Java IDE, Eclipse, to work with a familiar version control system, Subversion. These are the steps I took.

1. Download Eclipse IDE: www.eclipse.org/downloads. In my case, I downloaded Eclipse Ganymede. The downloaded application is in zip file. All I did was to extract the contents on my desired location.

2. I also decided to set-up a local repository for my future projects. I chose Subversion (for more info, visit www.subversion.tigris.org). I downloaded and installed Subversion 1.4.5 into my laptop.

3. Once Subversion was installed, I created a new repository location.


4. I made sure that I have Subclipse plug-in. This is a plug-in for Eclipse that will enable it to use Subversion. It can be installed in two ways, first is by automatically downloading the plug-in using Eclipse’s Software Update (Help->Software Update) and searching through the database. Another method is to manually download the necessary Executable Jar Files and putting it on the plugins folder under eclipse. Luckily, after searching through my old files, I was able to retrieve the .jar files I needed. After doing any of the two methods, Eclipse needs to be restarted.

4b. For SpringSource Tool Suit (STS), Open STS Dashboard > Go to Extensions > Look for Subeclipse, check the checkbox and click install (If you don't see it, it implies it is already installed)


5. On Eclipse, I opened the SVN Repository Exploring Perspective(Window->Open Perspective->Other)


6. Two tabbed windows appeared(SVN Repository and SVN Annotate). On SVN Repository, right click->New->Repository Location-> typed file:///e:/svn/eclipse_backup on the text box->click Finish.


7. If done correctly, the SVN Repository will have a new entry as seen below.


 9. Right click on the new repo location and select "Checkout". This will give you a local copy that you can then commit to the repo.