Posts

Showing posts from September, 2016

How to create a KeyStore with certificate chain

https://support.adeptia.com/hc/en-us/articles/207878953-How-to-create-a-KeyStore-with-certificate-chain cat myserver.srt intermediate.crt root.crt > cert-chain.txt openssl pkcs12 -export -inkey server.key -in cert-chain.txt -out cert-chain.pkcs12 keytool -importkeystore -srckeystore cert-chain.pkcs12 -srcstoretype PKCS12 -destkeystore SSLKeystore.jks

"vagrant status" in IntelliJ terminal differs with command prompt

Problem When running  vagrant status  in IntelljJ terminal, the result is different with running it in command prompt. It shows  running  in command prompt, but it shows  poweroff  in IntelliJ terminal. Solution I was running IntelliJ as Administrator. After I removed the privileges, it fixed. It turns out the Vagrant requires same access level as the VirtualBox. Related articles https://www.vagrantup.com/docs/virtualbox/common-issues.html

Rhino 1.7R4 Support CommonJS

Here are some testing about whether Rhino 1.7R4 support CommonJS. The answer is YES! Tips: Two APIs provided by Rhino could load the JavaScript file, compileReader and evaluateReader. Differences: compileReader will load JavaScript file without executed and return a Script object. You have to executed the Script object before you get the result.                    evaluateReader will automatically execute JavaScript file after loading. library.js var require = (function() { var exportsObjects = {}; var require = function(name) { if (exportsObjects.hasOwnProperty(name)) { return exportsObjects[name]; } var exports = {}; exportsObjects[name] = exports; modules[name](require, exports); return exports; }; return require; })(); var run = function(name) { require(name); }; var modules = {}; math.js modules["math"] = function(require, exports) {    ...