sudo su -
ulimit -l unlimited; export ES_HEAP_SIZE=1g; /usr/local/elasticsearch/bin/elasticsearch&
see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup-configuration.html
sudo su -
ulimit -l unlimited; export ES_HEAP_SIZE=1g; /usr/local/elasticsearch/bin/elasticsearch&
see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup-configuration.html
maven でビルドできるようになった Luke (公式は最新版の Lucene に対応していない) https://github.com/DmitryKey/luke/
wget http://ftp.jaist.ac.jp/pub/apache/maven/maven-3/3.2.1/binaries/apache-maven-3.2.1-bin.tar.gz
#!env sh | |
## -- usage -- | |
## sh setup_python.sh /home/username/local/python34 | |
# sudo yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel | |
# sudo apt-get install libssl-dev openssl libsqlite3-dev | |
PYVER="3.4.2" | |
PYDIR=$1 |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, | |
# please see the online documentation at vagrantup.com. |
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
choco install dropbox
# install java | |
apt-get update | |
apt-get -y install openjdk-7-jre-headless | |
# install elasticsearch | |
VERSION="1.4.2" | |
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-$VERSION.tar.gz -O /tmp/elasticsearch-$VERSION.tar.gz | |
tar zxvf /tmp/elasticsearch-$VERSION.tar.gz -C /usr/local/ | |
ln -s /usr/local/elasticsearch-$VERSION /usr/local/elasticsearch | |
cd /usr/local/elasticsearch |
curl -XPUT localhost:9200/group -d '{ | |
"mappings": { | |
"person": { | |
"properties": { | |
"name": { | |
"type": "string" | |
} | |
} | |
} | |
} |
yum update -y | |
yum install wget -y | |
yum install bind-utils -y | |
yum install vim -y | |
yum install git -y | |
yum install gcc gcc-c++ -y |
def parse_args(input_args, accept_args): | |
""" | |
>>> parse_args(["main.py"], {'--hoge': (1, 1)}) | |
Traceback (most recent call last): | |
Exception: error: argument --hoge: expected 1 argument(s) | |
>>> parse_args(["main.py", "a", "b", "--hoge", "w", "x", "y", "z"], {"--hoge": (2, 2)}) | |
({'--hoge': ['w', 'x']}, ['main.py', 'a', 'b', 'y', 'z']) | |
>>> parse_args(["main.py", "a", "b", "--hoge", "w", "x", "y", "z"], {"--hoge": (0, 0)}) | |
({'--hoge': []}, ['main.py', 'a', 'b', 'w', 'x', 'y', 'z']) | |
>>> parse_args(["main.py"], {'--hoge': (1, 1, ["piyo"])}) |