Jan 312013
 

I’ve done a mod_bcookie to setup browser cookie for Apache, now I’m working on same functionality for Nginx (should copy lots of codes from userid_module), after that I need to see how to do the same thing for Jetty, and with all containers have some sort of same architecture so that I don’t have to write one per container.

And after that I need to implement the same thing to IIS, again, wish I can do something for all .Net versions and for all languages (C# and VB.Net, at least).

I may be crazy, but this is a must since our clients are running all sort of HTTP servers, I wish there won’t be anything newย  – there should be nobody running lighttpd as I heard of, since most of them migrated to Nginx, and there should be nobody running Tomcat or Resin as they migrated to Jetty. I wish nobody is running node.js but if there is someone … sigh, then I still have to deal with them.

What about those wsgi/fastcgi servers? I don’t know so far, I wish they are not using a shared Nginx as load balancer, otherwise my life will be definitely doomed by writing all those extensions.

Will post result here later on.

Jan 252013
 

I was asked to find a solution to write customized Apache log entry (in Apache access log, not error log), other requirements include easy to use, which implicitly means “PHP friendly”, and flexible, which means “free format” and “may or may not have the value”.

Seriously, the first thing jumped into my mind was an Apache module (let’s hack mod_log!) or a PHP extension, but later on I found that … I don’t want to maintain another orphan project especially it will be orphan since nobody want to touch it after it’s up and running (I have one already, which does some cookie stuffs). So I move on to Google …

Then I found apache_note(), plus mod_log_config (search for %{Foobar}n), all that I need to do is tell PHP guys to call this function, and tell ops guys to setup Apache log properly, we are all set.

It’s good to see apache_note can change the note as many times as you want, whenever the request is finished on server side, the final data will be written to log.

Jan 182013
 

There was a e-waste recycling event close to my house and I successfully dumped these: an HP jet printer, an IBM ThinkPad (the very first Windows tablet, or in some other name), an HP desktop (Pentium 4!!!), some keyboards and mouses (actually this is some sort of illegal I guess? As they mentioned “anything with a plug” but anyway …), a DVD player (I’m pretty sure it stopped working for quite some time). There are some other stuffs I hesitated to recycle because of this or that – a 1 mega pixel digital camera, 2 random brand cell phones (feature phone with color screen), two iPods, one camcorder, 2 LCD displays.

It seems the time to upgrade – the main desktop @ home is not performing quite well after upgrade to Windows 8,ย I’mย thinking of replacing with a iMac, or a Windows 8 laptop … I don’t have enough machines to test cluster now and was thinking of virtual machine, but it seems better use some sort of mini PC so that I can test home automation as well (my dream … hard to come true without buying stuffs :D).

There may be more to come, let’s see.

Jan 172013
 
  1. You have to have a rooted Android installed
  2. Download the zip file from here, the version is 1.7 at time I’m working on that
  3. Install some sort of terminal emulator on MK802III
  4. Launch “ROM Flash Tool.exe” from the zip archive you downloaded in step #2, it will tell you “No Found PKAndroid rock usb” (What a horrible English!!!!)
  5. Launch the terminal emulator on MK802III, run “su” then “reboot book loader” while it is connecting to your computer (the micro USB port on MK802III side), the MK802III will get into boot loader mode and the “ROM Flash Tool.exe” should show “Found PKAndroid Loader Rock Usb”
  6. Just click the “Flash ROM” button, it will take 2~3 minutes, and after it’s done, MK802III will automatically reboot, now you have the new ROM running
Jan 172013
 

Refer to Recover a bricked MK802III for requirements, plus you need a micro SD to transfer the update file

  1. Download the zip file from here
  2. Unzip the zip file, you will see “update.zip”, copy it to micro SD
  3. Move the micro SD from your computer to MK802III, it will automatically recognize the update image.
  4. Follow instructions on the screen to finish the upgrade, this will take 3~5 minutes and the stick will reboot couple of times
Jan 172013
 

What you need:

  1. Macbook Pro + Virtual Box + Windows XP VM
    Alright, I’m kidding โ€ฆ you just need a Windows machine, I tried Windows 7 and Windows 8 (using Windows 7 drivers) are both working, but in case you just have a Mac like me, VM is the way to go. You’d better map all USB devices to the Windows VM since it changes name during regular boot+USB debugging, and recovery boot.
  2. Download the recovery kit from here, use the MK802III link, you will get a zip file. Unzip, launch RKBatchTool.exe and leave it running on your Windows machine.
  3. Unplug everything from MK802III, open the case of MK802III – nail is the best tool for me and it should work for you as well
  4. Follow the document (one in English and one in Chinese) to short circuit the two pins, and plug in the USB to your computer at the same time. I actually found there are two small dot beside the other side of the chip which is more easier if you have a flat metal piece instead of a tiny needle.
  5. If everything works smoothly, you will see one block in the RKBatchTool.exe interface changed to some other color (different color may have different meaning, but I really want to ignore it for now).
  6. Click the button with “โ€ฆ” on the top right corner of the RKBatchTool.exe interface, pick the img file from the zip archive (should be RKM802III_20121115Recovery.img), click “Upgrade” button (that’s the 2nd button from left, at the bottom of the interface), it will take 2~3 minutes.
  7. Power off/on the MK802III, you will get original official Android back running on the stick.
Jan 152013
 

Playing with this neat tiny computer and was trying to run Ubuntu on it but hit all sort of problem, and, at last, I think I bricked it. ๐Ÿ˜€

Now to take it back, I need a Windows machine (sigh…) to flush the ROM as I cannot find something similiar to RKAndroidTool.exe for Mac. I suspect it’s some sort of TFTP clients but just don’t want to dig in more.

Later on I found a Windows 8 machine running there but again I cannot play with MK802III as driver could not be found, search the Web … it was said Windows 7 driver should work, but you have to disable Windows 8’s driver signature enforcement. During the search I also found something pretty useful, to dig out unknown devices on Windows.

Will play with MK802III again tonight.

Jan 102013
 

50G free space – http://www.mediafire.com.

I wish it can have a client like Google Drive or SkyDrive, that simply sync up a folder on the laptop, and I also wish it can have a iPad App (or HD, whatever) so that I don’t have to run iPhone app on my iPad, I wish it does not set my uploads to public bu default, but …

after all, it is still a great product thinking of 50G free storage, and it’s a developer friendly service that even I can understand their protocol ๐Ÿ™‚ .

I’ve applied for a dev account and will try to build up either desktop app or ipad app for my own.

Jan 102013
 

I seldom talk about financial stuffs here, but I’d like to tell you that I have following stocks currently on my watch list: Comcast, AT&T, iRobot, TiVo, DirectTV, HomeDepot, Lowe’s.

So you got it – they are all more or less related to home automation, which I believe should be the trend of year 2013 (or even 2014).

Let’s see (by the end of this year) if I made the right judgement or not.

Jan 092013
 

I’m building app with PhoneGap/Cordova, it pretty much makes sense to share same html/cs/js across different forms, but this gave me quite some troublesome time …

It turned out Xcode does not follow relative symlink as mentioned here, you should move down to Rachel’s comment to see the finding.

I moved back to absolute symlink (start from /) and everything’s working now.