国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。
Ubuntu 16.04+、Debian 8+、CentOS 7+
创建或修改 /etc/docker/daemon.json
:
#! /usr/bin/env python | |
# coding: utf-8 | |
''' | |
auto switch keyboard between different applications | |
if you want to change the app list, modify the var 'ignore_list' | |
''' | |
from AppKit import NSWorkspace, NSWorkspaceDidActivateApplicationNotification, NSWorkspaceApplicationKey |
# -*- coding: utf-8 -*- | |
# | |
# Export Result Set As Excel Xlsx File | |
# | |
# Installation: | |
# 1. Install Python(2.7) Module "XlsxWriter", See http://xlsxwriter.readthedocs.org/getting_started.html | |
# 2. In MySQL Workbench | |
# Scripting => Install Plugin/Module... => <select this script> => <restart mysql workbench> | |
# | |
# Usage: |
<?php namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
use Symfony\Component\Console\Input\InputArgument; | |
class RunFile extends Command | |
{ | |
/** | |
* The console command name. |
# Set prefix key to Ctrl-a | |
unbind-key C-b | |
set-option -g prefix C-a | |
bind-key C-a last-window # 方便切换,个人习惯 | |
bind-key a send-prefix | |
# shell下的Ctrl+a切换到行首在此配置下失效,此处设置之后Ctrl+a再按a即可切换至shell行首 | |
# reload settings # 重新读取加载配置文件 | |
bind R source-file ~/.tmux.conf \; display-message "Config reloaded..." |
{ | |
"index": { | |
"analysis": { | |
"analyzer": { | |
"pinyin_analyzer": { | |
"tokenizer": "my_pinyin", | |
"filter": [ | |
"standard", | |
"nGram" | |
] |
ES Official Doc : http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/modules-jmx.html
#1.JMX support
jmx.create_connector: true
1. Dict包含以下: | |
二手 | |
小米 | |
手机 | |
小米手机 | |
2. elasticsearch.yml | |
index.analysis.analyzer : |
curl -XPUT 'http://localhost:9200/_template/logstash_default' -d @/<path>/xxxx.json | |
# template的mapping和普通mapping略有不同 | |
# 需要在settings前面增加一行 | |
# 非常适合logstash的场景,所以本例中以logstash做sample。 | |
# 相关文档: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-templates.html |