Skip to content

Instantly share code, notes, and snippets.

View HuangFJ's full-sized avatar

Jon Huang HuangFJ

  • ❤️☠️🤖
  • X @HFJ
View GitHub Profile
@HuangFJ
HuangFJ / analysis.yaml
Created January 19, 2015 18:17 — forked from igor-kupczynski/analysis.yaml
How to implement good search on product name in Elasticsearch. http://igor.kupczynski.info/2014/10/22/search-for-product-name.html
analyzer:
generic_name_analyzer:
type: "custom"
tokenizer: "icu_tokenizer"
filter: ["word_split", "icu_folding", "english_stop"]
trigram_name_analyzer:
type: "custom"
tokenizer: "icu_tokenizer"
filter: ["icu_folding", "english_stop", "trigram_filter"]
@HuangFJ
HuangFJ / install_opencv2.4.9.sh
Last active November 11, 2021 14:08 — forked from mitmul/install_opencv2.4.8.sh
centos 6.5 + opencv 2.4.9 + ffmpeg 0.10.11 + python 2.7.7 自动安装脚本
#! /bin/bash
sudo yum install -y gcc g++ gtk+-devel libjpeg-devel libtiff-devel jasper-devel libpng-devel zlib-devel cmake unzip sqlite-devel readline-devel bzip2-devel openssl-devel ncurses-devel
sudo yum install -y yum-priorities
sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo yum install -y eigen3-devel --enablerepo=epel
su -c 'yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/el/updates/6/i386/rpmfusion-free-release-6-1.noarch.rpm http://download1.rpmfusion.org/nonfree/el/updates/6/i386/rpmfusion-nonfree-release-6-1.noarch.rpm'
sudo yum install -y ffmpeg-devel
export PYTHON_PREFIX=/usr/local/python-2.7.7
@HuangFJ
HuangFJ / graphite
Created January 11, 2014 17:52 — forked from drawks/graphite
#This is the "site config" for nginx
upstream django {
# Distribute requests to servers based on client IP. This keeps load
# balancing fair but consistent per-client. In this instance we're
# only using one uWGSI worker anyway.
ip_hash;
server unix:/tmp/uwsgi.sock;
}
server {