启动新会话:
tmux [new -s 会话名 -n 窗口名]
恢复会话:
tmux at [-t 会话名]
This is how to connect to another host with your docker client, without modifying your local Docker installation or when you don't have a local Docker installation.
First be sure to enable the Docker Remote API on the remote host.
This can easily be done with a container.
For HTTP connection use jarkt/docker-remote-api.
For HTTPS connection use whiledo/docker-remote-api-tls.
| import scala.slick.lifted.CanBeQueryCondition | |
| // optionally filter on a column with a supplied predicate | |
| case class MaybeFilter[X, Y](val query: scala.slick.lifted.Query[X, Y]) { | |
| def filter[T,R:CanBeQueryCondition](data: Option[T])(f: T => X => R) = { | |
| data.map(v => MaybeFilter(query.filter(f(v)))).getOrElse(this) | |
| } | |
| } | |
| // example use case | |
| import java.sql.Date |
| "use strict"; | |
| const oandaV20 = require('@oanda/v20/context'); | |
| const fs = require('fs'); | |
| var ctx = new oandaV20.Context('api-fxpractice.oanda.com', 443, true, "demo"); | |
| var key = fs.readFileSync('api.key', {encoding: 'utf8'}); | |
| //remove any bad chars (e.g. the trailing newline) | |
| key = key.replace(/[^0-9a-fA-F-]/g, ""); | |
| console.log(key); |