- Show status
curl 'localhost:9200/_cat/indices?v'
- Show indexes
curl -XGET localhost:9200/_alias?pretty
#!/usr/bin/env bash | |
# repository | |
cd /tmp | |
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
rpm -Uvh epel-release-6-8.noarch.rpm | |
# system update | |
yum -y update | |
yum -y groupinstall "Development Tools" | |
yum -y install libxslt-devel libyaml-devel libxml2-devel gdbm-devel libffi-devel zlib-devel openssl-devel libyaml-devel readline-devel curl-devel openssl-devel pcre-devel git memcached-devel valgrind-devel mysql-devel ImageMagick-devel ImageMagick |
curl 'localhost:9200/_cat/indices?v'
curl -XGET localhost:9200/_alias?pretty
aws ec2 describe-instances --output json --region ap-northeast-1 --instance-ids i-YYYYYY | \ | |
python -c " | |
import sys; | |
import json; | |
print(json.loads(sys.stdin.read())['Reservations'][0]['Instances'][0]['PrivateIpAddress']) | |
" |
dd if=/dev/zero of=/swapfile count=4096 bs=1MiB | |
mkswap /swapfile | |
swapon /swapfile | |
# vi /etc/fstab | |
/swapfile swap swap defaults 0 0 |
# from mov to mp4 | |
ffmpeg -i フラミンゴ.mov -s 1280x720 -b:v 4000k -vcodec libx264 -acodec aac -pix_fmt yuv420p flamingo.mp4 | |
## | |
yum groupinstall "Development tools" | |
## set system timezone | |
timedatectl set-timezone Asia/Tokyo | |
## date sync | |
yum install -y ntp | |
chkconfig ntpd on | |
ntpdate pool.ntp.org |
wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo | |
yum install devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c++ | |
ln -s /opt/rh/devtoolset-2/root/usr/bin/* /usr/local/bin/ | |
hash -r | |
gcc --version |
// you can paste this code into chrome console, then check the result. | |
const pageHeight = (function () { | |
return Math.max( | |
document.body.scrollHeight, | |
document.documentElement.scrollHeight, | |
document.body.offsetHeight, | |
document.documentElement.offsetHeight, | |
document.body.clientHeight, | |
document.documentElement.clientHeight | |
); |
FROM ubuntu:18.04
LABEL Maintainer="BoRu Su <[email protected]>"
RUN apt-get update \
&& apt-get install -y python3-pip python3-dev \
&& cd /usr/local/bin \
&& ln -s /usr/bin/python3 python \
&& pip3 install --upgrade pip
alias - http://www.linfo.org/alias.html
alias ls="ls -al"
awk / gawk - http://www.tutorialspoint.com/awk/