- seconds is the time you need to collect samples (default is 30 seconds)
- http://localhost:8080 is your web server url
- localhost:8081 is the web report to view virtualization report
My personal blog about health, hobby, stock & investment, information technology, self improvement, tax and travel.
05 เมษายน 2567
Profiling golang gin with pprof
22 มิถุนายน 2565
Golang decrypt RC4 sample
Sample Golang code below is the RC4 decrypt function that accept key and encrypted hex inputs.
Sample Golang Code
Try to play and compare result with RC4 encrypt / decrypt online tool Link
Sample Input
02 กุมภาพันธ์ 2565
Fix error "Go version 1.12.XX is too old for this version of Delve (minimum supported version 1.16, suppress this error with --check-go-version=false)"
If you are using delve to debug your Golang program and found an error
Go version 1.12.XX is too old for this version of Delve (minimum supported version 1.16, suppress this error with --check-go-version=false)
The root cause is your Golang version is too old, to fix this problem you can simply upgrade your Golang or if you don't want to update your Golang, please follow these steps
1. Go to your dlv directory
$ git clone https://github.com/go-delve/delve.git
$ cd delve
2. Check out to older version
$ git checkout v1.2.0
3. Re-install dlv
$ make install
4. Verify dlv version
$ dlv version
If you debug golang using vscode and found error "unknown command dap for dlv", please add this json section to .vscode/settings.json file
21 พฤษภาคม 2563
Vulnerability in RabbitMQ : disable cleartext authentication mechanisms in the amqp configuration, Golang
Create self-signed certificate files
the easy way is cloning the repository https://github.com/michaelklishin/tls-gen then1. 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* 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 thissee related full Golang code at https://tinyurl.com/y6u9ack9
บทความที่ได้รับความนิยม
-
หมากฮอส เป็นกีฬาหมากกระดานประเภทหนึ่ง ประกอบด้วยผู้เล่น 2 ฝ่าย อุปกรณ์การเล่น ได้แก่ กระดานและตัวหมาก ...
-
ประเด็นทางเศรษฐกิจที่กำลังเริ่มพูดกันมากขึ้นในประเทศไทยก็คือ การที่เศรษฐกิจไทยติดหล่มเติบโตต่ำเรื้อรัง ในขณะที่เงินเฟ้อและอัตราดอกเบี้ยต่ำ...
-
แผนการลงทุนระยะยาวต่อจากนี้ไปของผมนั้นก็คือ การถือหุ้นเวียตนามประมาณ 30% บวกลบ หุ้นไทยประมาณ 30% บวกลบ และ “หุ้นโลก” ซึ่งในขั้นนี้ส่วนใหญ่...
-
ความก้าวหน้าของ AI ในการคิด วิเคราะห์ และประเมินมูลค่าพื้นฐานของตัวหุ้นหรือทรัพย์สินอย่างอื่นอีกมากมายในการลงทุนนั้น ไม่ต้องสงสัยว่ากำลังดี...
-
เรื่องเล่า..! บิล เกตส์ ไม่ยอมให้ลูกสาวแต่งกับคนจน มีคนเคยเล่าว่า ตอนเขาไปงานประชุมการ “ลงทุน” ในอเมริกา “บิล เกตส์” เป็นวิทยากร แล้วเขาก็ถ...
-
กระแส “AI” ของโลก ที่เกิดขึ้นพร้อมกับการเปิดตัว ChatGPT ในวันที่ 30 พฤศจิกายน 2022 ซึ่งทำให้หุ้นเทคโนโลยี “ทั่วโลก” โดยเฉพาะบริษัทเทคโนโลย...
-
วันที่ 19 เมษายน 1951 ดักลาส แม็คอาเธอร์ นายพล 5 ดาวและวีรบุรุษสงครามโลกครั้งที่ 2 ของสหรัฐอเมริกา ได้กล่าวสุนทรพจน์อำลาชีวิตทหารในสภาคองเ...
-
3 Ls (Liquor, ladies and leverage) ภัยร้ายที่ทำให้นักลงทุนล้มละลาย โดย ชาร์ลี มังเกอร์ หนึ่งในคำคมและคำเตือนสติที่คลาสสิกที่สุดในโลกการเงินแ...


