ดูสรุปการบริจาคเงินปีอื่นๆได้ที่ Link
ข้อมูลด้านล่างเป็นการสรุปการบริจาคเงินปี 2020
My personal blog about health, hobby, stock & investment, information technology, self improvement, tax and travel.
เทใจดอทคอม (https://taejai.com/th/) คือเว็บไซต์บริจาคเงินที่มีความโปร่งใส่ สามารถตรวจสอบได้ น่าเชื่อถือ นอกจากนั้นทางเว็บยังเปิดโอกาสให้เราเสนอโครงการเพื่อสังคมต่างๆ เพื่อระดมเงินบริจาคได้อีกด้วย เช่น ถ้าใครอยากจะทำโครงการสร้างหรือปรับปรุงสวนสาธาณะเพื่อชาวบ้าน ก็สามารถเขียนโครงการเข้ามาระดมทุนได้
โดยทางเว็บจะหักเงิน 10% ของเงินบริจาคเพื่อเป็นการบำรุงรักษาระบบ ค่าทำธุรกรรมทางการเงิน และค่าติดตามตรวจสอบโครงการต่างๆ ให้ผู้ให้ทุกท่านมั่นใจว่าเงินบริจาคสนุนจะเกิดประโยชน์อย่างแท้จริง
นอกจากนั้น เงินที่เราบริจาคยังสามารถนำไปลดหย่อนภาษีได้อีกด้วย
OWASP Zed Attack Proxy (ZAP) is an open-source tool for security testing, penetration testing (pen tests) with many features like API scan, full web scan, baseline scan.
The example below will show steps to run API scan using the headless version (docker)
1. prepare your header configuration, e.g., authorization, access token by creating file "options.prop" with this content
replacer.full_list(0).description=access token
replacer.full_list(0).enabled=true
replacer.full_list(0).matchtype=REQ_HEADER
replacer.full_list(0).matchstr=access-token
replacer.full_list(0).regex=false
replacer.full_list(0).replacement=xxx
replacer.full_list(1).description=another header
replacer.full_list(1).enabled=true
replacer.full_list(1).matchtype=REQ_HEADER
replacer.full_list(1).matchstr=another-header
replacer.full_list(1).regex=false
replacer.full_list(1).replacement=yyy
The sample above assume that your APIs have these 2 headers
- key: access-token value: xxx
- key: another-header value: yyy
2. run this command to start API scan
docker run -t --rm \
-v $(pwd):/zap/wrk/:rw owasp/zap2docker-weekly zap-api-scan.py \
-t api.yaml -f openapi -r report.html \
-z "-configfile /zap/wrk/options.prop"
Note that
- api.yaml is your swagger file
- owasp/zap2docker-weekly is the docker image weekly build, you can change to stable or daily build version
- report.html is the reporting file after scanning success
You can file more details here.
ObjectId (_id) of MongoDB is an auto-generated primary key by MongoDB.
This field consists of 3 parts
1. a 4-byte timestamp value, representing the ObjectId’s creation, measured in seconds since the Unix epoch
2. a 5-byte random value
3. a 3-byte incrementing counter, initialized to a random value
e.g., 5fbb912a5eeb8beee934a5c4
1. timestamp value is 5fbb912a, we can get the creation time by using any computer language to perform basic calculation
2. random value is 5eeb8beee9
3. increasing counter value is 34a5c4
I tried to add more document and get these ObjectIds (_id) consecutively
5fbb91275eeb8beee934a5c0
5fbb91285eeb8beee934a5c1
5fbb91285eeb8beee934a5c2
5fbb91295eeb8beee934a5c3
You can see that the last part of each ObjectId (_id) is increment one by one.
Follow this tutorial if you want to use Google Managed Key on Google Cloud KMS.
But if you want to create your own key and upload it to Google Cloud KMS, please follow these steps
Generate key in der format
openssl genrsa -out key-pri.pem 3072
openssl pkcs8 -topk8 -nocrypt -inform PEM -outform DER \https://mxtoolbox.com/SuperTool.aspx
To issue and renew let's encrypt the SSL certificate using DNS (DNS-01) challenge is a good way for servers behind firewalls and servers that cannot connect to the internet.
To achieve this way, please follow the instruction from the link
More useful certbot commands
List certificates
> certbot certificates
Remove certificate
> certbot delete --cert-name [CERT_NAME]
Renew 1 certificate
> certbot renew --cert-name [CERT_NAME] --dry-run
ประกันออมทรัพย์นั้น เป็นสิ่งที่ค่อนข้างน่าสนใจเนื่องจาก
1. สามารถลดหย่อนภาษีได้ ยิ่งฐานภาษีสูง ยิ่งได้เงินคืนเยอะ ดูรูปตารางอัตราภาษีเงินได้บุคคลธรรมดาได้ด้านล่าง (รูปคัดลอกมาจาก https://tinyurl.com/y4wonyuu)
2. ได้ผลตอบแทนที่สูง เมื่อเทียบกับฝากธนาคาร
3. ความเสี่ยงต่ำ
และประกันออมทรัพย์ 10/1 นั้น ก็เป็นตัวเลือกที่น่าสนใจ เนื่องจากจ่ายเบี้ยแค่ครั้งเดียวจบ ทำให้ไม่เป็นภาระผูกพันนานหลายปี ไว้ปีหน้า ถ้าเรามีเงินเหลือก็ค่อยหาประกัน 10/1 ตัวใหม่ แต่ถ้าไม่มีเงินเหลือ ซึ่งอาจจะมีภาระผ่อนบ้าน ผ่อนรถเยอะ ก็งดซื้อประกันปีนั้นๆ ไป
IRR คือ อัตราผลตอบแทนที่เราได้จากการซื้อประกันออมทรัพย์ (บริษัทประกันมักจะไม่ค่อยบอกค่านี้ให้กับลูกค้า เราต้องมาคำนวณเอาเอง) ซึ่ง IRR ยิ่งสูง ยิ่งดี แสดงว่าผลตอบแทนสูง
วิธีการคำนวณ IRR
IRR นั้นคำนวณไม่ยาก เราสามารถใช้โปรแกรม excel หรือดาวน์โหลดแอพ Financial calculator จาก Google play store, Apple store มาคำนวณได้ง่ายๆ
จากตัวอย่าง สมมติมีประกัน 10/1 นึง ที่มีรายละเอียดดังนี้
- จ่ายเบี้ยครั้งเดียว 100,000 บาทปีแรก
- ได้รับเงินคืน ปีละ 2,000 บาททุกปี
- ปีที่ 10 ได้รับเงิน 102,000 บาท
ขั้นตอนการคำนวณ
1. สร้าง column ดังรูปด้านล่าง
2. ให้กรอกข้อมูลลงไป โดยเริ่มตั้งแต่ปีที่ 0 โดย ปีที่ 0 เราจะจ่ายค่าเบี้ย และไม่มีเงินคืน
3. เงินคืนจะเริ่มมาตอนปีที่ 1 - 10
4. Cash Flow คือ เอาเงินคืน ลบเบี้ย
5. IRR ให้ใช้สูตร irr ซึ่งตัวอย่างนี้ IRR = 2% ซึ่งเป็นผลตอบแทนที่ใช้ได้ และสูงกว่าฝากธนาคาร
ตัวอย่างการคำนวณอ้างอิงจาก ชาย อายุ 35 ปี และจะแสดงค่า IRR แยกตามฐานภาษี 0%, 10% และ 20%
1. ดี-เซฟวิ่ง 10/1
URL: http://www.southeastlife.com/products/saving-and-Investment/d-saving
6. เมืองไทย อีซี่ รีเทิร์น 11/1
URL: https://onlinesale.muangthai.co.th/benefit?product=64
จากประกันออมทรัพย์ 10/1 แต่ละเจ้าด้านบน สามารถสรุปเป็นตารางด้านล่างได้ ซึ่งจะพบว่า ถ้าเรามีฐานภาษี 20% เราสามารถได้ IRR สูงถึง 4-5%
*ดูรีวิว ประกันออมทรัพย์ 10/1 ปีล่าสุดได้ที่ Link
Resources:
- video: https://web.facebook.com/LINEDEVTH/videos/702090520519606/?v=702090520519606
- slide: https://tinyurl.com/y58mr4x6
LINE hackathon 2020:
e-learning (free):
- https://www.skooldio.com/courses/line-frontend-framework
development tool & extension for LINE API:
LIFF unit test, e2e test with cypress:
- react: https://github.com/bahmutov/cypress-react-unit-test
- angular: https://github.com/bahmutov/cypress-angular-unit-test
- vue: https://github.com/bahmutov/cypress-vue-unit-test
- facebook group: https://web.facebook.com/cypressiothailand/
LINE Pay:
- for merchant: https://pay.line.me/portal/th/main
- for a developer: https://pay.line.me/th/developers/main/main
iOS snapshot test:
- https://github.com/uber/ios-snapshot-test-case
online editor:
- auto expose https URL
- integrate with firebase
- URL: https://stackblitz.com/
LIFF npm:
- https://www.npmjs.com/package/@line/liff

MongoDB aggregate allows us to query and join multiple collections (like JOIN in SQL).
Sample Usage
Let say, we have 3 collections like this
We would like to see the last ticket of the merchant "Merchant One" of the customer name "Robert Tee".
We can use the following MongoDB query command




ผมเห็นบทความนี้จาก Link เห็นว่าเนื้อหาพูดได้ค่อนข้างตรงไปตรงมา และอ่านแล้วเราสามารถนำมาทบทวนตัวเอง นำมาปรับปรุงนิสัยที่ไม่ดีได้ครับ
.$ git clone git@bitbucket.org:repo/app.git
Cloning into 'app'...
The authenticity of host 'bitbucket.org (1.2.3.4)' can't be established.
RSA key fingerprint is SHA256:xxx.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'bitbucket.org,1.2.3.4' (RSA) to the list of known hosts.
git@bitbucket.org: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Host bitbucket.org
IdentityFile /Users/user/.ssh/id_rsa