Skip to content

Instantly share code, notes, and snippets.

View ohsawa0515's full-sized avatar

Shuichi Ohsawa ohsawa0515

View GitHub Profile
@ohsawa0515
ohsawa0515 / yum package list for installing php
Last active August 29, 2015 14:00
yum package list for installing for php
sudo yum install \
bzip2-devel \
curl curl-devel \
pcre pcre-devel \
freetype freetype-devel \
gcc gcc-c++ \
gdbm-devel \
gmp gmp-devel \
libicu libicu-devel \
libjpeg libjpeg-devel \
@ohsawa0515
ohsawa0515 / php configure option
Created April 30, 2014 05:27
PHP complie option
./configure \
--prefix=/usr/local/php-<version> \
--enable-bcmath \
--enable-calendar \
--enable-gd-jis-conv \
--enable-gd-native-ttf \
--enable-intl \
--enable-mbstring \
--enable-mbregex \
--enable-pcntl \
@ohsawa0515
ohsawa0515 / dash_shortcut.rb
Last active August 29, 2015 14:03
Dash cheatsheet of Dash shortcut
cheatsheet do
title 'Dash Shortcut'
docset_file_name 'dash_shortcut'
keyword 'dash'
category do
id 'ショートカット'
entry do
name '検索候補の選択'
@ohsawa0515
ohsawa0515 / git_cheatsheet.rb
Last active August 29, 2015 14:03
Dash cheatsheet of git command
cheatsheet do
title 'Git Command'
docset_file_name 'git_cheatsheet'
keyword 'gitc'
category do
id 'ツールの設定'
entry do
name '名前を設定する'
notes <<-'CODE'
@ohsawa0515
ohsawa0515 / elasticsearch-older-index-delete.sh
Last active June 2, 2021 02:47
Elasticsearchのlogstash形式の古いインデックスを削除するスクリプト
#!/bin/sh
# インデックスのプレフィックス
PREFIX="logstash-"
if [ $1 ]; then
PREFIX=$1
fi
# OLDER_THAN日以上経過したインデックスを削除する
OLDER_THAN=30
@ohsawa0515
ohsawa0515 / elasticseach_curator_install.sh
Created November 4, 2014 02:43
Elasticsearch&Curatorインストールメモ
## Elasticsearchのインストール(RPM)
root> yum install java-1.7.0-openjdk
root> wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.3.4.noarch.rpm
root> rpm -ivh elasticsearch-1.3.4.noarch.rpm
root> chkconfig --add elasticsearch && chkconfig elasticsearch on
root> service elasticsearch start
## Python, pipのインストール
root> yum install python python-devel
root> curl -kL https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python
@ohsawa0515
ohsawa0515 / elasticseach-curator-reinstall.sh
Last active August 29, 2015 14:08
Elasitcseach-Curator再インストールメモ
root> pip uninstall elasticsearch
root> pip uninstall elasticsearch-curator
root> pip install elasticsearch
root> pip install elasticsearch-curator
@ohsawa0515
ohsawa0515 / pip_lsit.sh
Created November 4, 2014 02:50
pip list
root> pip list
argparse (1.2.1)
awscli (1.5.4)
backports.ssl-match-hostname (3.4.0.2)
bcdoc (0.12.2)
boto (2.32.1)
botocore (0.68.0)
chardet (2.0.1)
Cheetah (2.4.1)
colorama (0.2.5)
root> pip uninstall elasticsearch
Uninstalling elasticsearch:
/usr/lib/python2.6/site-packages/elasticsearch-1.2.0.dist-info/DESCRIPTION.rst
/usr/lib/python2.6/site-packages/elasticsearch-1.2.0.dist-info/METADATA
/usr/lib/python2.6/site-packages/elasticsearch-1.2.0.dist-info/RECORD
/usr/lib/python2.6/site-packages/elasticsearch-1.2.0.dist-info/WHEEL
/usr/lib/python2.6/site-packages/elasticsearch-1.2.0.dist-info/metadata.json
/usr/lib/python2.6/site-packages/elasticsearch-1.2.0.dist-info/top_level.txt
/usr/lib/python2.6/site-packages/elasticsearch/__init__.py
/usr/lib/python2.6/site-packages/elasticsearch/__init__.pyc
#!/bin/sh
## Xcode command line tool
xcode-select --install
## Install Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
## Add homebrew repository
brew tap homebrew/dupes