Tag Archives: binary file

Binary File Hex Viewers on Ubuntu 12.04

I tried command line beav and gnome Jeex

As these are both binaries I am looking for a binary viewer / hex viewer – I will try beav

sudo apt-get install beav

running beav on the binary from demo-words.sh based on the 1st billion bytes of wikipedia:

beav vectors.bin

reults in :

0: 37 31 32 39 30 20 32 30  30 0A 3C 2F 73 3E 20 07  71290 200.</s> .
10: F2 DE 3A 42 8B 9D 3A 0D  43 FC 3A E8 25 46 3A A3  ..:B..:.C.:.%F:.
20: 0E D9 BA C1 C0 02 BA 6F  1C D6 BA 0A 52 A3 B9 41  …….o….R..A

trying jeex hex-editor

sudo apt-get install jeex

Why early man didn’t develop Hex is beyond me after all we have 10 fingers that’s enough for signed 8 bit numbers with a carry bit much more useful than decimal.

Well much as I love the sight of Hex – flashback to 1970’s NASCOM Z80 Hex code ! This is impenetrable, no easily discernible patterns – so I need a text file and word2vec has a flag for that.

including JSON files & Javascript in HTML

JSON – Javascript Object Notation is convenient data format – based on javascript syntax.

How to read it into Javascript is another matter. From Wikipedia :

“The official MIME type for JSON text is “application/json“.[15] Although most modern implementations have adopted the official MIME type, many applications continue to provide legacy support for other MIME types. Many service providers, browsers, servers, web applications, libraries, frameworks, and APIs use, expect, or recognize the (unofficial) MIME type “text/json” or the content-type “text/javascript“.”

var my_JSON_object;
var http_request = new XMLHttpRequest();
http_request.open("GET", url, true);
http_request.onreadystatechange = function () {
    var done = 4, ok = 200;
    if (http_request.readyState == done && http_request.status == ok) {
        my_JSON_object = JSON.parse('''http_request.responseText''');
    }
};
http_request.send(null);

after tearing your hair out why not just use JSON-P – works everywhere instantly.