Skip to content

Instantly share code, notes, and snippets.

@xiocode
xiocode / pkg.md
Last active December 8, 2016 13:53
自定义Go Get路径

安装dhparam

openssl dhparam -out /etc/nginx/dhparam.pem 2048

/path/to/nginx/site-enabled/xxx.xxx.com.conf

server {
  listen 443 ssl;
@xiocode
xiocode / gist:42811591ce5aa6a34f7d
Last active September 17, 2016 18:20
Elasticsearch Optimization Checklist

Elasticsearch Optimization Checklist

假设

  • hardware 假设
  • index/query rate假设
  • elasticsearch用户运行elasticsearch

hardware Level

见 [Elasticsearch Hardware Recommendation][9]。

######################################
#每个目录使用独立的历史纪录{{{
cd() {
builtin cd "$@" # do actual cd
fc -W # write current history file
local HISTDIR="$HOME/.zsh_history$PWD" # use nested folders for history
if [ ! -d "$HISTDIR" ] ; then # create folder if needed
mkdir -p "$HISTDIR"
fi
fix error pkg_resources.DistributionNotFound: pip==1.5.6
python -m pip install --upgrade --force pip
####### Innodb ######
innodb_buffer_pool_instances=4
innodb_buffer_pool_size=8G
innodb_log_file_size=128M
innodb_log_buffer_size=16M
innodb_flush_method=O_DIRECT
innodb_io_capacity=2048
innodb_io_capacity_max=6000
innodb_lru_scan_depth=2048
innodb_read_io_threads=12
#!/bin/bash
#--------------------------------------------
# 功能:多渠道打包
# 作者:xielei
#--------------------------------------------
# ipa-build Weico.ipa Weico.app
sourceipaname=$1 #定义变量ipa名称
#!/bin/sh
#
# Upload ipa file to fir.im
#
# Syntax: upload_fir.sh application.xx
#
APPLICATION=$1
APP_ID=$2
PLATFORM=$3
deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
@xiocode
xiocode / gist:3e8dd801e50fe25a00c2
Created August 28, 2014 04:12
Python 數據處理相關
http://matplotlib.org
http://mpld3.github.io
http://stanford.edu/~mwaskom/software/seaborn/
http://olgabot.github.io/prettyplotlib/
http://pandas.pydata.org/
http://bamboo.io
http://databrewery.org
http://camdavidsonpilon.github.io/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/
https://github.com/wrobstory/folium
http://lifelines.readthedocs.org/en/latest/