Mar 132014

As you probably know, Oracle stopped development of Glassfish’s commercial version and in doing so, prompted others to move. News of Glassfish being dead is greatly exaggerated according to some but myself being one who was already not happy with Glassfish’s Open Source version, steps were taken to move to WildFly. So far, the move has been well received in the team except for web based GUI administration panel which isn’t complete. Reliability of the admin panel is higher than Glassfish’s counterpart though and what WildFly’s web admin panel lacks, it’s CLI and Swing based GUI admin panel make up for allowing script writers (such as myself) to come up with automated ways to get things done.

A while back we discussed how you could use JNDI custom resources on Glassfish to set environment variables. Migration for our team meant information setup as environment variables need to be setup again.

Continue reading »

Mar 112014

The Atlassian suite of tools are a good way to have your organization’s workflow administered. If you’re using Atlassian Stash to manage your source code and are attempting to get Atlassian Bamboo to download code off Stash’s copy of git, the answer isn’t quite straight forward.

Having experience with Atlassian’s tools for over a year, one gets used to excellent integration wrapped up with beautiful UI but when it comes to setting up flawless CI with Bamboo, you’re let down (either that or my integration is non-standard; don’t see how). Continue reading »

Dec 032013

If you’re trying to create a Custom Project in Eclipse, you’ll eventually come to read a beautiful blog post over at Hidden Clause that documents quite well how to overlay your icon over Eclipse’s default folder icon to get the icon of your choice.

If you’re default project is an extension of an already existing project (I, for example, wanted a custom Java Project type so I extended Eclipse’s New Java project wizard to get desired effect), the default nature added is that of Java meaning Eclipse adds it’s icon and not the icon you’ve set up. The issue isn’t even in the step you’ve just followed to add the icon. The issue was inadvertenly induced in the last step while adding your custom project nature with code which looks something like this (reference code from Hidden Clause)

private static void addNature(IProject project) throws CoreException {
    if (!project.hasNature(ProjectNature.NATURE_ID)) {
        IProjectDescription description = project.getDescription();
        String[] prevNatures = description.getNatureIds();
        String[] newNatures = new String[prevNatures.length + 1];
        System.arraycopy(prevNatures, 0, newNatures, 0, prevNatures.length);
        newNatures[prevNatures.length] = ProjectNature.NATURE_ID;

        IProgressMonitor monitor = null;
        project.setDescription(description, monitor);

This can be remedied easily by ensuring your nature ID is added before that of your predecessors. Eclipse only applies the icon from one nature, not multiple ones. Here’s the code I ended up with

final IProjectDescription description = project.getDescription();
final List natures = new ArrayList<>(Arrays.asList(description.getNatureIds()));
natures.add(0, Database.NATURE_ID);
final String[] newNatures = natures.toArray(new String[natures.size()]);
final IStatus status = ResourcesPlugin.getWorkspace().validateNatureSet(newNatures);

// check the status and decide what to do
if (status.getCode() == IStatus.OK) {
    project.setDescription(description, null);
} else {
    // raise a user error

Next up, now to make the icon be used completely and not as a simple overlay..

Oct 082013

As a developer, I like to look at the source code for the libraries I use in order to understand if what I am doing is the best way to implement it or not. Though Eclipse, by default, comes with features to develop plugins, it doesn’t come with the source code for this. Getting the source is a simple, 3 step process!

  • Help > Install new Software
  • Work with ‘The Eclipse Project Updates’ (not the main site!)
  • Install the following items
    • Eclipse RCP Plug-in Developer Resources
    • Eclipse PDE Plug-in Developer Resources
    • Eclipse Platform Plug-in Developer Resources
    • Equinox p2 Core Function Source
    • Eclipse JDT Plug-in Developer Resources

Welcome to the source, Neo!

Updated (29/11/2013): More source projects added! Seems there is a nice StackOverflow question on the same (which doesn’t have an answer which meets my satisfaction). I’ll keep my post in sync with my answer on StackOverflow.

Oct 062011

This is a really old trick for Universal Flash Drives (UFDs) and I’ve been using it for years. I just thought I should document the steps so it’s available as quick reference for me :)

  1. Insert your UFD and make sure all your data is backed up because we’re going to format it.
  2. Run command prompt
  3. Open diskpart (will ask for elevation)
  4. Type “list disk”
  5. find what disk is your USB based on the size. Mine is number 3.
  6. type “select disk 3″ (where 3 is the number that the system associates with my flash drive)
  7. type “clean”
  8. type “create partition primary”
  9. type “select partition 1″
  10. type “active”
  11. type “format fs=ntfs”. Might take some time based on the size of your drive
  12. type “assign”. This gives your drive a letter on the system.
  13. type “exit”. Closes diskpart.
For step 11, you might get away with “format fs=ntfs quick” as well since full format takes forever. Now your UFD is ready for installing Windows, Linux or anything else you want. You can now even boot an operating system off it ;)
Aug 162011

I had this infamous issue where I was stuck with my phone unable to boot for 2 days. I documented everything I learnt so others might find it helpful and as usual, it’s on XDA for all nicey goodness :)

You would want to read this post either because you have already seen this issue and want a fix or haven’t seen the issue yet and want to avoid it. This tutorial has information on how to fix the bootloader Security Warning issue and how to avoid it.

Aug 162011

I was helping a friend fix his hacked site when I had to disable ESET to check where his injected code was (because the website ran an img iframe hack to download a trojan on the user’s machines). I found the issue and told him what to do but had my own machine infected in the mean while :(

Chrome kept redirecting me to his website when I opened a new tab (which thankfully Chrome kept warning me was a malicious page). If I kept a tab open with his site, it wouldn’t redirect me again. The problem was localized to Chrome only so it was a browser based problem.

Simple fix, clear cache and clear old plug-in data. Voila! ;)

Aug 152011

AlphaRevX totally revolutionized the S-Off scene for HTCs everywhere a few months back. I wrote a bunch of posts on XDA-Dev which showed people how to use it. But AlphaRevX doesn’t work on all software versions. One such version was 2.30.x which I was stuck on. I can now confirm that Revolutionary (formed by team unrevoked and team AlphaRev) does work on this version too. Really simple to use.

  1. Go to and download revolutionary for your OS (Windows/Linux)
  2. Enter the details they request for to get your beta key. It’s pretty straight forward. You should know your phone version. Your HBoot version is available by you switching off your phone > turning it on with vol down pressed. Your Serial number is on your phone box/behind the battery.
  3. Turn off fastboot for your phone
  4. Turn on developer mode for your phone
  5. Make sure you have HTC Sync drivers but no HTC Sync i.e. install HTC Sync and then uninstall the software leaving the drivers on your system
  6. Connect your phone to your PC and run revolutionary.exe on your phone
  7. Enter your beta key and enjoy ;)
The reason why AlphaRevX didn’t work for some versions was because HTC patched GingerBreak which is what AlphaRevX used to get temp root then run it’s magic before giving you S-Off.
Take that HTC!