28 พฤษภาคม 2563

adding custom CSS to blogger

Blogger allows you to add custom CSS, such as a table with zebra style. 

You can do it by going to Blogger Theme Designer plage, select Advance > Add CSS, and then put your own custom CSS here.

After that, click "Apply to Blog" button.





On your creating blog page, you can switch to HTML and write html table with your custom class from the CSS above like this.



After publishing your post, the table will be rendered from your CSS like this.





รายละเอียด SSFX, SSF, RMF ล่าสุด


ที่มา Link

26 พฤษภาคม 2563

แหล่งบริจาคเงินผ่าน Mobile App โปร่งใส่ น่าเชื่อถือ

การบริจาคเงินออนไลน์นั้นทำได้สะดวก รวดเร็ว และง่ายมากๆ ซึ่งข้อดีต่างๆ เหล่านี้ทำให้เกิดกลุ่มมิจฉาชีพมากมายเข้ามาหาผลประโยชน์ ซึ่งการตรวจสอบความถูกต้องของข้อมูล และการติดตามข้อมูลนั้นทำได้ยากมาก

ขจกท ขออนุญาตแนะนำช่องทางการบริจาคเงินผ่าน Mobile App ที่โปร่งใสและน่าเชื่อถือ เพื่อให้เงินทุกบาทของผู้บริจาคนั้นถูกนำไปใช้ประโยชน์ได้จริงๆ ถึงผู้ที่เดือดร้อนจริงๆ และนอกจากนั้น ผู้บริจาคยังสามารถนำหลักฐานการบริจาคไปลดหย่อนภาษีได้อีกด้วย


  1. เทใจ: https://taejai.com
  2. Kplus: https://www.kasikornbank.com/th/promotion/pages/e-donation.aspx
  3. Airpay: https://airpay.in.th/app/faq/donation.html
  4. Truemoney: https://www.truemoney.com/donation/
  5. SCBEasy: https://www.scb.co.th/th/personal-banking/digital-banking/scb-easy/how-to/donation.html





25 พฤษภาคม 2563

MongoDB playground

If you want to test your MongoDB query logic and try something without installing MongoDB database. You can use Mongo Playground online


Just go to the website and play.

21 พฤษภาคม 2563

Vulnerability in RabbitMQ : disable cleartext authentication mechanisms in the amqp configuration, Golang

To fix the vulnerability in RabbitMQ : disable cleartext authentication mechanisms in the amqp configuration, follow these steps

Create self-signed certificate files

the easy way is cloning the repository https://github.com/michaelklishin/tls-gen  then

1. go to the cloned repository and goto basic directory

2. run make PASSWORD={your_password} CN={your_domain}, see image below


3. ca, server and client certificate files will be created, see image below



Configure RabbitMQ configuration file

your rabbitmq.conf should be configured like this

loopback_users.guest = false
listeners.ssl.default = 5671
ssl_options.cacertfile = path_to_ca_certificate.pem
ssl_options.certfile = path_to_server_certificate.pem
ssl_options.keyfile = path_to_server_key.pem
ssl_options.password = XXXXX
default_pass = XXXXX
default_user = XXXXX

* Note
listeners.tcp.default = 5672 must be removed
- ssl_options.password must match the certificate password from the step above
- a related document is available at https://www.rabbitmq.com/ssl.html

Configure the client

your client code (Golang) should be written like this

cfg := new(tls.Config)
cfg.InsecureSkipVerify = true
cfg.RootCAs = x509.NewCertPool()
ca, err := ioutil.ReadFile("path_to_ca_certificate.pem")

if err == nil {
cfg.RootCAs.AppendCertsFromPEM(ca)
} else {
return nil, err
}

cert, err := tls.LoadX509KeyPair(
"path_to_client_certificate.pem",
"path_to_client_key.pem",
)
if err == nil {
cfg.Certificates = append(cfg.Certificates, cert)
} else {
return nil, err
}

url := fmt.Sprintf(
"amqps://%s:%s@%s:%d",
"rabbit_user",
"rabbit_password",
"rabbit_host",
5671,
)
con, err := amqp.DialTLS(url, cfg)
if err != nil {
return nil, err
}

see related full Golang code at https://tinyurl.com/y6u9ack9

05 พฤษภาคม 2563

mongodb calculate active user x days using aggregate

sample code below is calculating 7 days active users

duration = 7; // active user 7 days

dateTo = new Date();
dateTo.setHours(0, 0, 0);

dateFrom = new Date();
dateFrom.setDate(dateTo.getDate() - duration);
dateFrom.setHours(0, 0, 0);

db.getCollection("users").aggregate( // collection users
[
{
$match: { // filter by "created"
created: { $gte: dateFrom, $lt: dateTo }
}
},
$group: {
_id: "id", // group by "id"
uniqId: { $addToSet: "$id" }, // get uniq "id" only
},
]
);

01 พฤษภาคม 2563

มนุษย์เงินเดือน พนักงานบริษัทเอกชน หลังเกษียณหรือตกงาน จะมีรายได้จากไหนบ้าง


 

มนุษย์เงินเดือน พนักงานบริษัทเอกชน หลังเกษียณหรือตกงาน จะมีรายได้จากไหนบ้าง


รายได้ที่เราได้แน่นอน

1. เบี้ยยังชีพผู้สูงอายุ

    • เดือนละ 500 - 1,000 บาท ตามช่วงอายุ
    • ต้องมีอายุ 60 ปีขึ้นไป



2. เงินบำนาญชราภาพ ประกันสังคม
    • ได้ตอนอายุ 55 ปี และสิ้นสุดความเป็นผู้ประกันตน
    • เริ่มต้นเดือนละ 3,000 บาท (ขึ้นกับระยะเวลาส่งเงินสมทบ ยิ่งส่งเยอะ ยิ่งได้บำนาญเยอะ สามารถดูรายละเอียดเพิ่มเติมได้ที่ Link)




เงินได้อื่นๆ 

ถ้าระหว่างที่เราทำงาน เรามีการออมเพิ่มเติม เช่น
  1. กองทุนรวม SSF, RMF
  2. ประกันชีวิตแบบออมทรัพย์
  3. ประกันชีวิตแบบบำนาญ
  4. หุ้น อสังหาริมทรัพย์
  5. กองทุนสำรองเลี้ยงชีพ Provident Fund


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

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