Daily blurbs Sep. 2014

Plans

daily blurbs


24 Sep 2014 (Wed)

09:46:05 # Life Sending GCM send message from nodejs. I wanted to send a message from emacs, but it seemed to be relatively difficult to send HTTPS POST request from emacs, so I just decided to use handy nodejs. The attached 'data' is attached to intent as extra, so it can be extracted by intent.getExtras.getString("message") in IntentService#onHandleIntent()

var https = require('https');

message = {
    // Registration IDs come from application after registration.
    registration_ids: [
	// From XXX
	'xxxxx',
    ],
    data: {
	// This is the actual message
	message: 'hello world'
    }
}

var options = {
    hostname: 'android.googleapis.com',
    port: 443,
    path: '/gcm/send',
    method: 'POST',
    headers: {
	// Secret from dashboard.
	'Authorization': 'key=xxx',
	'Content-Type': 'application/json'}
};

req = https.request(options, function(res) {
  console.log("Got response: " + res.statusCode);

  res.on('data', function(d) {
    process.stdout.write(d);
  });

}).on('error', function(e) {
  console.log("Got error: " + e.message);
});

req.write(JSON.stringify(message));
req.end();
	

15 Sep 2014 (Mon)

20:51:03 # Life ARM assembly. I was reading up some docs on Unified Assembly Language (UAL). and confusions. I don't seem to be able to find a comprehensive doc about what works and what doesn't. Heh.

5 Sep 2014 (Fri)

06:18:36 # Life I wanted to file a bug but Debian BTS doesn't seem to receive my SMTP mail for some reason. Somewhere between the MTA and the server something is wrong.

06:19:28 # Life Bluetooth network error. I think it's a network-manager feature to be able to use bluetooth tethering. I think it's a network-manager bug that when bluetooth tethering fails due to some error, and does not report that error. Yesterday I finally figured out what was going wrong after staring at hcidump. It was obvious after I did. I've reset my tablet so bluetooth PIN was wrong. If only the GUI told me that.

> HCI Event: Auth Complete (0x06) plen 3
    status 0x06 handle 12
    Error: PIN or Key Missing

3 Sep 2014 (Wed)

17:04:39 # Life Can't link qemu with static. I was puzzled but this looks wrong that pkg-config libssh2 doesn't output -lgpg-error. gcrypt depends on gpg-error.

$ pkg-config libssh2 --libs --static
-lssh2 -lgcrypt 
	

1 Sep 2014 (Mon)

07:14:10 # Life I was staring at qemu source for a while last month. There's a lot of things that I don't understand about the codebase. There's a race but it's hard to tell why a SIGSEGV was received.


Junichi Uekawa

$Id: 201409.html.en,v 1.5 2014/09/24 01:08:43 dancer Exp $