ES Official Doc : http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/modules-jmx.html
#1.JMX support
jmx.create_connector: true
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 |
1. Dict包含以下: | |
二手 | |
小米 | |
手机 | |
小米手机 | |
2. elasticsearch.yml | |
index.analysis.analyzer : |
ES Official Doc : http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/modules-jmx.html
#1.JMX support
jmx.create_connector: true
{ | |
"index": { | |
"analysis": { | |
"analyzer": { | |
"pinyin_analyzer": { | |
"tokenizer": "my_pinyin", | |
"filter": [ | |
"standard", | |
"nGram" | |
] |
# 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..." |
<?php namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
use Symfony\Component\Console\Input\InputArgument; | |
class RunFile extends Command | |
{ | |
/** | |
* The console command name. |
# -*- 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: |
#! /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 |