23 ธันวาคม 2562

เดินทางจังหวัดภูเก็ตด้วย Airport Bus Phuket และ Phuket Smart Bus


Airport Bus Phuket (http://www.airportbusphuket.com/index.html) คือรถบัสที่วิ่งจากสนามบินภูเก็ตไปสิ้นสุดยัง Phuket Bus Terminal ตามรูป




Phuket Smart Bus (https://phuketsmartbus.com/) คือรถบัสที่วิ่งจากสนามบินภูเก็ต ไปสิ้นสุดยังหาดราไวย์ ตามเส้นทางดังรูป

14 ธันวาคม 2562

create event tracing on nodejs application using trace_events

A trace_events is included to standard library for nodejs v11 or later. And it allows us to create event tracing to measure the performance for each function call.

You can do it by these steps
  • click Load button and select file node_trace.1.log

ปัญญาประดิษฐ์ : มหามิตรหรือมหันตภัยของแรงงานไทย?

https://mgronline.com/daily/detail/9620000119214

17 พฤศจิกายน 2562

upgrade mongodb in docker from 3.x to 4.x

If you have MongoDB 3.x running on docker and you want to upgrade to version 4.x, you cannot re-use the old data volume.



Please follow these steps to achieve upgrading MongoDB=

1. I will assume that you want to upgrade MongoDB from version 3.2 to 4.2

2. You need to incremental upgrade from 3.2 to 3.4, 3.6, 4.0 and then finally 4.2

3. run the following command to upgrade from version 3.2 o 3.4

docker run --name mongo -p 27017:27017 -v /volume:/data/db -d mongo:3.4

4. run the following command to set feature compatibility

docker exec -it mongo bash -c 'mongo --eval "db.adminCommand( { setFeatureCompatibilityVersion: \"3.4\" } )"'

5. repeat steps 3 and 4 three times

- upgrade from 3.4 to 3.6
- upgrade from 3.6 to 4.0
- upgrade from 4.0 to 4.2

6. verify the MongoDB version by running

docker exec -it mongo bash -c 'mongo --version'

credit: https://forums.rocket.chat/t/solved-trying-to-update-mongodb-from-3-2-to-4-0-in-docker-but-errors/3200

15 พฤศจิกายน 2562

ดูดอกซากุระ ที่ Forest Park (โซล เกาหลีใต้)

ช่วงเวลาที่ชมดอกซากุระ

ช่วงเวลาที่ดูดอกซากุระ ประมาณวันที่ 5-12 เมษายน




การเดินทาง

นั่งรถไฟฟ้า Line Cheongnyangni (สีเหลือง) มาลงที่สถานี Seoul Forest ประ ตู Forest Park

















ดูดอกซากุระ ที่ มหาวิทยาลัยคยองฮี Kyung Hee University (โซล เกาหลีใต้)

ช่วงเวลาที่ชมดอกซากุระ

ช่วงเวลาที่ดูดอกซากุระ ประมาณวันที่ 5-12 เมษายน


การเดินทาง 

  • นั่งรถไฟฟ้า Line 1 (สีน้ำเงินเข้ม)  มาลงที่สถานี Hoegi (123) ประ ตู 1
  • ขึ้นรถบัสสีเขียว บริเวณประตู 1 นั่งตรงไปป้ายสุดท้าย รถบัสจะจอดข้างในมหาวิทยาลัยเลย
  • ขากลับขึ้นรถบัสจากตรงที่ลง มาลงที่สถานี Hoegi (123)









Android / iOS Mobile Application ที่ต้องมีตอนไปเที่ยวเกาหลีใต้ (โซล, ปูซาน)

1. Google Translate

เอาไว้ใช้พูดคุยสนทนากับคนต่างชาติ หรือแปลข้อความตามป้ายต่างๆ หรือเมนูร้านอาหาร






2. Subway

เอาไว้ดูข้อมูลการเดินทางด้วยรถไฟฟ้า คำนวณระยะเวลาและค่าเดินทาง




ระบบจะแสดงข้อมูลให้เราเลือกว่าจะเอาแบบเร็วสุด หรือถูกสุด และแสดงข้อมูลเส้นทาง ระยะเวลา จำนวนสถานี และค่าเดินทาง ดังรูป




นอกจากนี้ เรายังสามารถเลือกภาษา และพื้นที่ต่างๆ เช่น โซล หรือปูซานได้ ดังรูป





3. Naver Map

เอาไว้ดูแผนที่การเดินทาง ซึ่งระบบจะแสดงแผนการเดินทางให้ทุกรูปแบบ ไม่ว่าจะเป็น เดินทางด้วยรถไฟฟ้า รถเมล์ หรือเดินเท้า (คล้ายๆ Google Map)




ตัวอย่างการค้นหาวิธีการเดินทาง



ตัวอย่างการเดินทางด้วยเท้า








ดูดอกซากุระ ที่ สวนสาธารณะยออีโด Yeouido Park (โซล เกาหลีใต้)

ช่วงเวลาที่ชมดอกซากุระ 

ช่วงเวลาที่ดูดอกซากุระ ประมาณวันที่ 5-12 เมษายน



การเดินทาง 

นั่งรถไฟฟ้า Line 5 หรือ Line 9 มาลงที่สถานี Yeouido (526 / 915) Exit 3










17 ตุลาคม 2562

Install docker-ce and docker-compose on Linux Redhat 7 and Redhat 8

Install docker-ce on Linux Redhat 7 and Redhat 8

  1. Select rpm file that you want to install from https://download.docker.com/linux/centos/7/x86_64/stable/Packages/, e.g., I will install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-17.12.1.ce-1.el7.centos.x86_64.rpm
  2. Run the following command from your Linux Redhat to download rpm file => wget https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-17.12.1.ce-1.el7.centos.x86_64.rpm
  3. Run the following command to install docker from rpm file => yum install docker-ce-17.12.1.ce-1.el7.centos.x86_64.rpm
  4. Restart docker service by running => sudo systemctl restart docker
  5. Verify the status of docker service by running => sudo systemctl status docker
  6. Add the current user (e.g., user ec2-user to docker group by running => sudo usermod -aG docker ec2-user
  7. Verify docker command by running => docker --version



Install docker-compose on Linux Redhat 7 and Redhat 8

  1. Download and install docker-compose by running => sudo curl -L https://github.com/docker/compose/releases/download/1.18.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
  2. Verify docker-compose command by running => docker-compose --version

07 สิงหาคม 2562

npm vs yarn 2019 which javascript package manager is faster?

Test environment
  • device: MacBook Air 2017
  • node version: 12
  • yarn version: 1.17.3
  • npm version: 6.3.0
  • test datetime: 7 Aug 2019 00:30 A.M. Bangkok time


Internet speed https://speedtest.trueinternet.co.th)




Sample package.json

{
"name": "demo-app-react",
"version": "0.1.0",
"private": true,
"dependencies": {
"axios": "^0.19.0",
"node-sass": "^4.12.0",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-router-dom": "^5.0.1",
"react-scripts": "3.0.1"
}
}



Test yarn performance scenario
  1. remove node_modules
  2. remove yarn.lock
  3. measure yarn speed by running => start=$(date +'%s') && yarn && echo "It took $(($(date +'%s') - $start)) seconds"



Test npm performance scenario
  1. remove node_modules
  2. remove package-lock.json
  3. measure yarn speed by running => start=$(date +'%s') && npm i && echo "It took $(($(date +'%s') - $start)) seconds"



Result

Package manager / Speed (seconds) Round 1 Round 2 Round 3
npm 104 72 72
yarn 200 171 157


29 กรกฎาคม 2562

ตารางรถไฟชั้น 1 2 3 ไปกลับ หัวหิน กรุงเทพ

ตารางรถไฟจากกรุงเทพไปหัวหิน




ตารางรถไฟจากหัวหินไปกรุงเทพ




บรรยากาศสวยๆ บริเวณสถานีรถไฟหัวหิน





บรรยากาศชายหาดหัวหิน ซึ่งไม่ไกลจากสถานีรถไฟหัวหิน



บทความยอดนิยม (ล่าสุด)

บทความยอดนิยม (All Time)