發表文章

目前顯示的是 4月, 2018的文章

[CentOS] 更改主機時區

Ref:  nixCraft CentOS 6 # 備份原本的時區資訊 cp /etc/localtime /root/old.timezone rm /etc/localtime ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime # 驗證 date ls -l /etc/localtime CentOS 7 timedatectl list-timezones ##*** Grep possible Asian timezones ***## timedatectl list-timezones | grep Asia timedatectl set-timezone time_zone timedatectl set-timezone America/Chicago date ls -l /etc/localtime

[Linux] CentOS update kernel from 2.x to 4.x

圖片
Ref1:  https://blog.csdn.net/zy_281870667/article/details/78004010 Ref2:  http://elrepo.org/tiki/tiki-index.php rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org # 詳細可看 http://elrepo.org/tiki/tiki-index.php rpm -Uvh http://www.elrepo.org/elrepo-release-6-8.el6.elrepo.noarch.rpm yum --enablerepo=elrepo-kernel install -y kernel-lt vi /etc/grub.conf # grub.conf generated by anaconda # default=0 #一般最新安装的内核在第一个位置,将其修改为 0 timeout=5 splashimage=(hd0,0)/boot/grub/splash.xpm.gz hiddenmenu (第一次更新remote kernel覺得緊張)

[Javascript] break nested loop

Ref:  https://stackoverflow.com/questions/1564818/how-to-break-nested-loops-in-javascript outer_loop: for(i=0;i

aws cli 安裝

# 只在這個user底下裝awscli的工具 pip install awscli --upgrade --user # 因為會安裝在~/.local/bin, 所以將這個路徑放在$PATH中 export PATH=~/.local/bin:$PATH source ~/.bash_profile (or .bashrc) 快速設定 $ aws configure AWS Access Key ID [None]: xxx AWS Secret Access Key [None]: xxx Default region name [None]: us-west-2 Default output format [None]: json 或著是在 ~/.aws/credentials 放 Access key 與 Secret [default] aws_access_key_id = xxxxx aws_secret_access_key = xxxxx