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
cat <<EOM | vault write dbs/config/mydb - | |
{ | |
"plugin_name": "postgresql-database-plugin", | |
"allowed_roles": "mydb-admin", | |
"connection_url": "postgresql://{{username}}:{{password}}@database:5432/mydb", | |
"username": "admin", | |
"password": "secret", | |
"verify_connection": false | |
} | |
EOM |
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
infix fun Int.toThePowerOf(exponent: Int): Int = Math.pow(this.toDouble(), exponent.toDouble()).toInt() | |
fun main(args: Array<String>) { | |
val sets = mutableListOf<Set<String>>() | |
sets.add(emptySet()) | |
for(setNumber in 1 until 2.toThePowerOf(args.size)) { | |
val set = mutableSetOf<String>() |
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
function reverseWord(word) { | |
return word.split(/(\w+)/) | |
.filter(s=>s.trim() != '') | |
.map(word=>word.split('').reverse().join('')) | |
.join(''); | |
} | |
function reverse(string) { | |
return string.split(' ') | |
.map(reverseWord) |
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
HTTP/1.1 200 OK | |
Connection: close | |
Server: meinheld/0.6.1 | |
Content-Type: application/json | |
Access-Control-Allow-Origin: * | |
Access-Control-Allow-Credentials: true | |
X-Powered-By: Flask | |
X-Processed-Time: 0.000699043273926 | |
Content-Length: 326 | |
Via: 1.1 vegur |
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/bash | |
trap 'kill -TERM $pid' TERM INT | |
source=$1 | |
shift | |
command=$* |