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
local _M = {} | |
function _M.content() { | |
ngx.say(cjson.encode({from = "a", file = "now"})) | |
} | |
return _M; |
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
// we determine the key buffer | |
var stringKey = "example"; | |
var cipherText = "........."; | |
// we compute the sha256 of the key | |
var hash = crypto.createHash("sha256"); | |
hash.update(stringKey, "utf8"); | |
var sha256key = hash.digest(); | |
var keyBuffer = new Buffer(sha256key); |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: redis-sentinel | |
# Required-Start: $syslog $remote_fs | |
# Required-Stop: $syslog $remote_fs | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: redis-sentinel - Persistent key-value db sentinel process |