Easy DNS Names for Virtual Hosts in Mac OS X

I got tired of manually inserting lines into my /etc/hosts file and decided to look for other solutions. The DD-WRT router has a DNSMAsq feature in which I list domains that are supposed to be internal domains to be resolved to its local IP. I still have to insert lines but now it’s more organized and better than seeing mumbo jumbo in your hosts file.

Here are my steps:
Error when loading gists from http://gist.github.com/.

OAUTHnesia for Windows 8 Metro Apps C#

The last few days at Bandung was spent hacking a “proof of concept” application for Windows 8 Metro without using Urbanesia’s OAUTHnesia library. Now the library is done but still needs a few tweaks. All updates of the codes will be live in its Github Gist.

Without further ado, here’s the gist:
Error when loading gists from http://gist.github.com/.

Microsoft Windows 8 Bootcamp Bandung

Urbanesia was invited to Microsoft Window 8′s Bootcamp in Bandung last weekend. Me, Arieditya and Aditya went there to see and experience ourselves the technical depth provided by the Windows 8 team. To cut things short, the experience was reinvigorating! After a bunch of process of liking, hating, yeah right-ing, hating, liking and now loving, I felt Microsoft’s attention to developers is an example to follow for other big names.

Boot Champ

Boot Champ

I don’t know how the ecosystem is pre Windows 8 but now, Microsoft is implementing (copying) best practices & ideas that are there in the Open Source community for years before and optimize them at the kernel level. This is a very bold move, exactly the same like the kind of UI/UX they’re offering with Windows 8, reimagined.

Reimagined!

Reimagined!

For much of the days in Bandung, we were all coding and trainers were there to help us along the way. The trainers doesn’t actually have hands on Windows 8 experience but their in depth knowledge about the technology behind Microsoft is incredibly helpful. Always ready to answer any question we might have and even code a few lines. This helped the Urbanesia team a lot, we even discovered some of our API outputs are giving Windows based developers headaches, we fixed it.

To tell you the truth, after going into some of these technical events in Indonesia and abroad, Windows 8 Bootcamp is the most useful for developers. So a big applause for the Windows 8 team and the trainers, you guys rock!

Windows 8 Team & Trainers

Windows 8 Team & Trainers

Android Ice Cream Sandwich on Galaxy Tab 7

After a long break, I thought I wanna write about Android. This time it’s Ice Cream Sandwich on a Galaxy Tab P1000. As always, for smartphone hacks, everyone should first go to XDA-Developers.com and have a look if one of your gadgets has sub-forums. There’s a specific thread for Galaxy Tab 7 First generation and ICS love is there.

This blog post is a confirmation that ICS works beautifully and incredibly fast and snappy on a Galaxy Tab P1000. It is as if you are having a multi-core Android device. Have look at [ROM][ICS] AOKP (Android Open Kang Project) for P1000/L/N here. Follow the installation routines and you’re good to go.

Here are the steps I took to get ICS working:

  1. I reflashed the Tab with a Gingerbread ROM and ClockworkMod Recovery using ODIN
  2. Downloaded Milestone #4 ROM for P1000 which is listed on the thread
  3. Downloaded Gapps from the link on the thread
  4. Downloaded a ClockworkMod flashable kernel for P1000 from the link on the thread
  5. Went into ClockworkMod Recovery (Power + Volume Down)
  6. Mounted USB Storage and copied ROM, Gapps and Kernel packages
  7. Unmounted USB Storage and flashed ROM, Kernel and Gapps last
  8. Wiped Cache, Data and Dalvik Cache
  9. Rebooted the system
  10. I got an incredibly smooth ICS working on the Galaxy Tab
  11. The ROM’s performance was the best of any ROM I tried but the kernel kept nullifying the RIL stack, I downloaded HumberOS P1000 Kernel here and the problem disappeared
  12. A HAPPY GUY

Performance throughout the whole experience immediately alleviated by the ROM, not only the slick UI/UX had a welcomed boost but the Tab’s performance itself is just amazing. I was on a rooted Stock Gingebread version previously and this update made my day!

Graphics & 3D performance are amazing, everything is GPU Accelerated so it is a very smooth experience indeed. Gmail for ICS is also very relaxing!

ICS SettingsGmail for ICS

Simple Naive Bayes Classifier for PHP

Recently Hacker News is flooded with numerous articles discussing or at least mentioning Naive Bayes Classifier algorithm. It’s a basic algorithm to classify a set of words into a certain category (set) based on prior learning of words and its probabilities. It sounds simple enough but without actual technical guide book, it’s quite trivial since most of the information out there regarding it is too messy for newbies like myself.

Just today, there was an article by Alexandru Nedelcu about Naive Bayes Classifier here which is exactly what I am looking for. It’s simple, to the point and most importantly outlines the benefit of using the algorithm with practical examples. The codes are in Ruby but I think the article is finely written, you don’t have to look at the source code.

So I somewhat forked and ported the idea into PHP and voila, the PHP counterpart is available at https://github.com/tistaharahap/Simple-Naive-Bayes-Classifier-for-PHP. It’s still very basic, just a prove of concept with MySQL as its persistent storage. The Store is abstracted so you can write your own Store with any database you’d like.

My focus is creating codes that will scale for big documents, and yes MySQL won’t be a definite winner here for scalability but I’m using it now to make learning easier. I’m planning on creating a HandlerSocket Store as well as a MongoDB Store.

The codes at the repository for now is not ready for prime time, however, feel free to fork, port or anything you feel right with the codes. Have a great time ;)

Augmented Reality Browser in 10 minutes with Wikitude API

This blog post is a simple tutorial to demonstrate how easy it is to set up a full fledge Augmented Reality browser with Wikitude API. It will only take 10 minutes of your time in its most simplest form, ready to be customized with your own needs. It should be easy enough to let you innovate on your own.

For this to happen, I assume you already have these items ready with your setup:

  • Eclipse (Preferably Indigo)
  • Android Developer Tools for Eclipse here
  • Android SDK here
  • Wikitude SDK here

The project is live at Github: https://github.com/tistaharahap/ARBrowser

I believe codes will speak louder than words ;)

Code Hinting & Autocompletion for CodeIgniter in PHPStorm

Finally, moving back and forth between models, views and controllers is just too distracting and time consuming. I had to find another way to navigate my way between codes. I tweeted asking about alternative IDEs in Mac OS X to achieve this. Turns out there is a way!

I got a tip from @LuisFAlonso (THANK YOU!) to check out instructions from a blog here. I followed the instructions and restarted PHPStorm afterwards. Sadly, it didn’t work :(

I did a Google search and was happy to read a blog post here. But it didn’t work (again). The instructions was to copy paste lines of comments directly to the system/core/Controller.php and system/core/Model.php. The thing is, my system folder is outside the public folder. So I copy pasted the Controller part to application/core/MY_Controller.php. It WORKED!

Now I’m happy with a new IDE and Code hinting + Autocompletion!


photo of Batista Batista R Harahap batista@bango29.com
Jl. Bango II/29C, Pondok Labu
Cilandak , DKI Jakarta , 12450 Indonesia
62817847023

This hCard created with the hCard creator.