Creating the NFS Volume:
$ docker volume create --driver local \
--opt type=nfs \
--opt o=addr=192.168.1.115,uid=1000,gid=1000,rw \
--opt device=:/mnt/volumes/mysql-test \
mysql-test-1| version: '2' | |
| services: | |
| agency: | |
| image: arangodb/arangodb | |
| environment: | |
| - ARANGO_ROOT_PASSWORD=openSesame | |
| command: --server.jwt-secret=openSesameJWT --database.password openSesame --server.endpoint tcp://0.0.0.0:5001 --agency.activate true --agency.size 1 --agency.supervision true | |
| coordinator: | |
| image: arangodb/arangodb |
| var amqp = require('amqplib/callback_api'); | |
| // if the connection is closed or fails to be established at all, we will reconnect | |
| var amqpConn = null; | |
| function start() { | |
| amqp.connect(process.env.CLOUDAMQP_URL + "?heartbeat=60", function(err, conn) { | |
| if (err) { | |
| console.error("[AMQP]", err.message); | |
| return setTimeout(start, 1000); | |
| } |
| http://www.dscripts.net/2010/06/09/how-to-lock-a-process-in-java-to-prevent-multiple-instance-at-the-same-time/ | |
| //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| // check if another process is running | |
| //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| package utils; | |
| import java.io.File; | |
| import java.io.IOException; |
| #!/usr/bin/env bash | |
| # | |
| # Author: Stefan Buck | |
| # License: MIT | |
| # https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447 | |
| # | |
| # | |
| # This script accepts the following parameters: | |
| # | |
| # * owner |
| 127.0.0.1 localhost | |
| 255.255.255.255 broadcasthost | |
| ::1 localhost | |
| fe80::1%lo0 localhost |
| var Promise = require('bluebird'); | |
| var crypto = Promise.promisifyAll(require("crypto")); | |
| // http://security.stackexchange.com/questions/110084/parameters-for-pbkdf2-for-password-hashing | |
| var config = { | |
| hashBytes : 64, // size of the generated hash (to be chosen accordint the the chosen algo) | |
| saltBytes : 16, // sise of the salt : larger salt means hashed passwords are more resistant to rainbow table | |
| iterations : 500000, // tune so that hashing the password takes about 1 second | |
| algo :'sha512', | |
| encoding : 'base64' // hex is readable but base64 is shorter |
Adds a set of fields with values to the specified stream. If MAXLEN items are exceeded, items are removed from the beginning of the stream to bring the length down to MAXLEN. The "*" field is to autogenerate an item ID, but can be overriden.
Return value
Simple string reply: epoch time (in milliseconds) followed by a .N (for differentiating multiple events on the same millisecond)
| var Redis = require('ioredis'); | |
| var redis = new Redis({ | |
| host: "foooo.wiftycloud.com", | |
| password: "5d4595050d541e2f1c37c731677a" | |
| }); | |
| async function main() { | |
| // write an event to stream 'events', setting 'key1' to 'value1' | |
| await redis.sendCommand( |
| # | |
| # CORS header support | |
| # | |
| # One way to use this is by placing it into a file called "cors_support" | |
| # under your Nginx configuration directory and placing the following | |
| # statement inside your **location** block(s): | |
| # | |
| # include cors_support; | |
| # | |
| # As of Nginx 1.7.5, add_header supports an "always" parameter which |