国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
2019-05-08 08:39:20,801 | INFO | Connector ws started | org.apache.activemq.broker.TransportConnector | main | |
2019-05-08 08:39:20,803 | INFO | Apache ActiveMQ 5.14.5 (localhost, ID:user-somehost-33725-1557301160364-0:1) started | | |
2019-05-08 08:39:21,288 | INFO | ActiveMQ WebConsole available at http://0.0.0.0:8161/ | org.apache.activemq.web.WebConsoleStarter | main | |
2019-05-08 08:39:21,289 | INFO | ActiveMQ Jolokia REST API available at http://0.0.0.0:8161/api/jolokia/ | org.apache.activemq.web.WebConsoleStarter | main | |
2019-05-08 08:39:21,335 | INFO | Initializing Spring FrameworkServlet 'dispatcher' | /admin | main | |
2019-05-08 08:39:21,525 | INFO | No Spring WebApplicationInitializer types detected on classpath | /api | main | |
2019-05-08 08:39:21,587 | INFO | jolokia-agent: Using policy access restrictor classpath:/jolokia-access.xml | /api | main | |
2019-05-08 08:53:46,777 | INFO | Connector vm://localhost started | org.apache.activemq.broker.TransportConnector | qtp593103894-60 |
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
package main | |
import ( | |
"encoding/gob" | |
"bytes" | |
) | |
func GetBytes(key interface{}) ([]byte, error) { | |
var buf bytes.Buffer | |
enc := gob.NewEncoder(&buf) |
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
) | |
func main() { | |
url := "https://api.ipify.org?format=text" // we are using a pulib IP API, we're using ipify here, below are some others | |
// https://www.ipify.org | |
// http://myexternalip.com |
package main | |
import ( | |
"fmt" | |
"go/ast" | |
"go/parser" | |
"go/printer" | |
"go/token" | |
"log" | |
"os" |
package main | |
import ( | |
"fmt" | |
"github.com/Shopify/sarama" | |
"os" | |
"os/signal" | |
"strings" | |
) |
package main | |
import ( | |
"fmt" | |
"go/ast" | |
"go/parser" | |
"go/token" | |
) | |
func main() { |
{ | |
"request_id": "2220913894196", | |
"errno": 0, | |
"error": "", | |
"data": { | |
"info": [ | |
{ | |
"city_id": 110000, | |
"city_name": "北京", | |
"subway_line": [ |
There are a mess of troubles in sending and receiving files from my macbook to dev server, since I had no permission to excute command scp on dev server. Here is a lightweight, quick, and convenience tools which related with ssh, called lrzsz. lrzsz is a unix communication package providing the XMODEM, YMODEM, ZMODEM file transefer protocol which usually has been already installed in most of servers.