This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var crypto = require("crypto"); | |
var EncryptionHelper = (function () { | |
function getKeyAndIV(key, callback) { | |
crypto.pseudoRandomBytes(16, function (err, ivBuffer) { | |
var keyBuffer = (key instanceof Buffer) ? key : new Buffer(key) ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GATEWAY_FLAGS := -I. -I/usr/local/include -I$(GOPATH)/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis -I/usr/local/include | |
GRPC_FLAGS := --python_out=. --grpc_python_out=. | |
code: | |
python -m grpc_tools.protoc $(GRPC_FLAGS) $(GATEWAY_FLAGS) *.proto | |
gw: | |
protoc $(GATEWAY_FLAGS) \ | |
--go_out=Mgoogle/api/annotations.proto=github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api,plugins=grpc:. \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// our simple example to play with | |
let island = [ | |
[1, 1, 0, 0, 0], | |
[0, 1, 0, 0, 1], | |
[1, 0, 0, 1, 1], | |
[0, 0, 0, 0, 0], | |
[1, 0, 1, 0, 1] | |
]; |