国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。
Ubuntu 16.04+、Debian 8+、CentOS 7+
创建或修改 /etc/docker/daemon.json:
| #!/bin/sh | |
| # | |
| # Check for ruby style errors | |
| red='\033[0;31m' | |
| green='\033[0;32m' | |
| yellow='\033[0;33m' | |
| NC='\033[0m' | |
| if git rev-parse --verify HEAD >/dev/null 2>&1 |
Milliseconds in your DateTimes or Timestamps.
We got 'em, you want 'em.
NOTE: only MySQL 5.6.4 and above supports DATETIME's with more precision than a second. For reference see MySQL 5.6.4 Changelog
Shit needs to be PRECISE
| { | |
| "keys": ["tab"], | |
| "command": "expand_abbreviation_by_tab", | |
| // put comma-separated syntax selectors for which | |
| // you want to expandEmmet abbreviations into "operand" key | |
| // instead of SCOPE_SELECTOR. | |
| // Examples: source.js, text.html - source | |
| "context": [ | |
| { |
Twelve Go Best Practices
Francesc Campoy Flores Gopher at Google @francesc http://campoy.cat/+
| #Golang Websocket Server | |
| server { | |
| listen 8080; | |
| server_name wss.morse.io; | |
| access_log /var/log/nginx/access_log.log; | |
| error_log /var/log/nginx/error.log; | |
| #ssl config | |
| ssl on; | |
| #Cert Info |
| package main | |
| import "fmt" | |
| /** | |
| * Ruby code below. How to do equivalent in Go? | |
| people = [ | |
| { | |
| first: "Nic", | |
| last: "Williams" |
| package main | |
| import ( | |
| "fmt" | |
| "labix.org/v2/mgo" | |
| "labix.org/v2/mgo/bson" | |
| "time" | |
| ) | |
| type Person struct { |