Monday, December 24, 2012

Hello World Boot Loader

This sample makes you know how to write your own boot loader.

At first, visit Hello World Boot Loader to learn how to write a boot loader, so you can copy and paste the source in it to your local file.

Secondly, use the following command to compile boot.asm:

nasm -f bin -o boot.bin boot.asm

Thirdly, we burn the boot.bin to image or iso file, and you will use mkisofs file, for windows user, you can download it from http://fy.chalmers.se/~appro/linux/DVD+RW/tools/win32/mkisofs.exeAnd then use the following command to create a bootable iso.


mkisofs -no-emul-boot -boot-load-size 4 -V 'gos' -input-charset iso8859-1 -o gos.iso -b boot.bin ./

Finally, you can use vmplayer or virtualbox to create a virtual machine using your iso to see how it work.

Saturday, September 8, 2012

Developing C/S Application Using JavaScript and CouchDB

Now I introduce how to use Javascript and CouchDB to develop traditional C/S application.

At first, we install couchdb and apache http server on computer. Because it uses cross-domain request, and the couchdb's http response header cannot be modified (I use couchbase and don't know where to modify http headers), I use apache http server to proxy couchdb.

Secondly, add the below code to httpd.conf.

<VirtualHost *:80>
    <Proxy http://localhost:5984>
        Order deny, allow
        Allow from all
    </Proxy> 
    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^OPTIONS
    Header set Access-Control-Allow-Origin "*"
    Header set Access-Control-Allow-Headers Content-Type
    Header set Access-Control-Allow-Methods "GET, POST, PUT, OPTIONS, DELETE"
    Header set Access-Control-Max-Age 3600
    
    ProxyRequests off
    ProxyPreserveHost Off
    AllowEncodeSlashes On
    KeepAlive Off

    ProxyPass / http://localhost:5984 nocanon
    ProxyPassReverse / http://localhost:5984
</VirtualHost>

Now start your httpd, and visit http://localhost/_utils to create a database named "test".

And third, create a test.html and import jquery script and add the below code to create a document in couchdb.

<script>
$.ajax({
    url: 'http://localhost/test',
    type: 'POST',
    contentType: 'application/json',
    data: '{"firstname": "hello", "lastname": "world"}'
});
</script>

And all are done. Open your test.html via file protocol with browser, and then see the created document in couchdb. If all are ok, you could write any ui applications and run it to access couchdb database directly without deploying your application on any web server.

Enjoy it.

Monday, September 3, 2012

WireframeSketcher as UI DSL

Many software development team have some tools to draw wireframes to describe its upcoming application how to interact with human-users. But this way just provides UI developers roughly feelings about application designed by designers, and it doesn't improve development speed.

In this blog, I will introduce a UI prototype code generation tool.

If you don't know what the DSL is, please visit Domain-specific language.

At first, we should get Wireframe Sketcher Studio. There is an example to demonstrate using wireframe sketcher to generate extjs4 UI prototype.
And use the the wsc (Wireframe Sketcher Compiler) to compile .screen file to generate extjs4 source code. This project will be put on github.com soon.

And the generated page is this below:

 That's all. This project is under development. And will support Dojo, JQuery.

Thursday, August 9, 2012

Reference to Crack MyEclipse 10.6

MyEclipse has released 10.6 on July 2012. If you use the past method to crack it, it can't succeed. Because the jar signature verification class was changed. But I find the classes to verify jar signature, let's make it out of work.

Make a new java file and write the code below:

<your any directory>/com/genuitec/eclipse/core/ui/preference/MECPListContentProvider.java

package com.genuitec.eclipse.core.ui.preference;

import org.eclipse.core.runtime.Status;

public class MECPListContentProvider {

 protected Status verifyJarSignatures(String thePluginId,
   String thePublicKeyHex) {
  return (Status)Status.OK_STATUS;
 }

 public Status verifyJarSignatures(String[] thePluginIdArray) {
  return (Status)Status.OK_STATUS;
 }

 public void verifyJarSignatures() {
  
 }
}
 
And compile it with <MYECLIPSE_HOME>/Common/plugins/org.eclipse.equinox.common_<version>.jar.
 
Put the generated .class file into <MYECLIPSE_HOME>/Common/plugins/com.genuitec.eclipse.core.common_<version>.jar 
and replace the old one.
 
And use the same way to compile and replace the other three classes:
 
com.genuitec.eclipse.product.ProductViewer in  
<MYECLIPSE_HOME>/Common/plugins/com.genuitec.myeclipse.product_<version>/myeclipse-product.jar
 
com.genuitec.eclipse.j2eedt.taglib.TagLibReader in 
<MYECLIPSE_HOME>/Common/plugins/com.genuitec.eclipse.j2eedt.core_<version>/j2eedtcore.jar
 
com.genuitec.eclipse.easie.core.ui.action.ServerValidateAction in 
<MYECLIPSE_HOME>/Common/plugins/com.genuitec.eclipse.easie.core_<version>/easiecore.jar
 
 
And now is ok, you can tamper anything in com.genuitec.eclipse.core_<version>.jar.
 
Or you follow the left steps like cracking 9.x, 10.1, 10.5 to complete it.
 
The link you should reference (Chinese and English):
 
Crack Old Version MyEclipse