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
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
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
/** | |
* Simulate a key event. | |
* @param {Number} keyCode The keyCode of the key to simulate | |
* @param {String} type (optional) The type of event : down, up or press. The default is down | |
* @param {Object} modifiers (optional) An object which contains modifiers keys { ctrlKey: true, altKey: false, ...} | |
*/ | |
function simulateKey (keyCode, type, modifiers) { | |
var evtName = (typeof(type) === "string") ? "key" + type : "keydown"; | |
var modifier = (typeof(modifiers) === "object") ? modifier : {}; |