บันทึกการทำ Line Chat Bot

จากที่ลองศึกษาดู น่าจะมีการทำ 2 แบบ Line Chat Bot – แบบง่าย ใช้ตัว Line Official Account (Line OA) – AI response messages (simple Q&A) ได้เลย ข้อดี Admin ดูได้ง่ายสะดวก และมี Template เตรียมไว้ให้แล้ว ข้อเสีย Customize ได้จำกัดอยู่ – แบบซับซ้อน ใช้ตัว Line Message API Channel + ใช้ที่ Line แนะนำ หรือไป Chat Bot Engine เก่งๆ อย่าง Dialogflow / Azure Bot Service ข้อดี มัน Customize ได้มากขึ้นกว่าแบบที่ใช้ Line OA ถ้าแบบง่ายๆ ใช้ Dialogflow + Google App Script หรือ Firebase ก็ได้ มี Blog ภาษาไทยเยอะด้วย เช่น LINE Developers Thailand – Medium ลอง Search & Learn กันได้เลยครับ ข้อเสีย มันต้องใช้คนที่รู้เรื่อง Coding เข้ามาช่วย สุดท้าย Line มีจุดแข็งของมันนะ Sticker และเมนูต่างๆใน Line เช่น Location Video Image map Flex message…

[PODMAN] java.security.KeyManagementException: FIPS mode: only SunJSSE TrustManagers may be used

วันนี้น่าจะวันซวย Run Image ขึ้นที่ Site ลูกค้า แล้วเจอ Error นี้ครับ Environment Host redhat 8.2 with FIPS mode enable podman 2.0.5 Container Image Base Image rockylinux:8.5.20220308 (Version 8.5.20220308) openjdk version “11.0.15” 2022-04-19 LTS Application Spring Boot 2.6.6 How to fix อ๋อ อย่าลืมตรวจสอบด้วย RedHat 8 กำหนด System-wide cryptographic policies เป็น FIPS mode หรือไม่ ด้วยคำสั่ง หลังจากลองมาหลายวิธี วิธีแรกลอง Config java.security ปรับ security.useSystemPropertiesFile=false แต่ไม่รอดครับ สุดท้ายตอนสร้าง docker image ได้เพิ่ม Parmeter -Dcom.redhat.fips=false ตอน Run Java เข้าไปแทน เนื่องจาก FIPS Mode ไม่สามารถปิดแบบ Global ได้ ต้อง Per Process เท่านั้น อ้างอิงจาก How to disable FIPS for java when FIPS is enabled on RHEL 8? – Red Hat Customer Portal สรุปที่แก้ไป ของเดิม ตัวคำสั่งที่ใช้…

[DB2] Restore แบบ WITHOUT ROLLING FORWARD; แล้ว Error SQL1035N 

IBM DB2

พอดีได้รับเคสไฟไหม้มาตรวจสอบ เนื่องจากลองทำ Take On Date (ตั้ง Database ใหม่) แล้วปรากฏว่าข้อมูลที่เตรียมมามันไม่สามารถ Restore ที่ Production ได้ครับ โดยเจอ Error SQL1035N The operation failed because the specified database cannot be connected to in the mode requested. SQLSTATE=57019 พอลองไปดู Step Backup พอจะเดาได้แล้วแหละ ว่ามาจากอะไร Backup Restore สาเหตุ + การแก้ไข ที่แน่ๆ QUIESCE แล้ว UNQUIESCE ต่อ มันไม่มีประโยชน์เลย ทำให้ระหว่างที่ทำ Operation Backup เกิดปัญหาว่ามี User ใช้งานระบบอยู่ครับ ทำให้มี Tx เกิดขึ้นเพิ่มระหว่าง Backup ได้ครับ ตอน Restore มีกำหนด Option WITHOUT ROLLING FORWARD ซึ่งปกติมันจะไม่ใช่กัน เพราะมันจะไม่เอา Tx Log มา Run เติมต่อให้ครับ ถ้ามีอะไรที่ตัว Database มันต้องการจริงๆ อย่างเคสนี้ ที่ QUIESCE แล้ว UNQUIESCE ทันทีระว่างนั้น อาจจะมี User เข้ามา Connect ได้ โดยตอนนี้หลังจากเอา Backup มาแล้ว เลยแก้ไขปัญหาเฉพาะหน้าด้วยคำสั่ง ดังนี้ Reference [DB2] QUIESCE คือ อะไร [DB2] SQL1035N The operation…

[SC-900] Short Note

Blog นี้เป็นสรุปใส่ Keyword จาก Exam SC-900: Microsoft Docs และ Resource ต่างๆที่เพื่อนๆ Share กันในกลุ่ม Microsoft Cloud Squad ครับ Compliance management capabilities at Microsoft Security and compliance concepts Azure – identity concepts – Services and identity types of Azure AD – Identity protection and governance capabilities of Azure AD – Basic security capabilities in Azure – Security management capabilities of Azure – Security capabilities of Microsoft Sentinel (เดิม Azure Sentinel) – Describe resource governance capabilities in Azure Microsoft 365 – Microsoft 365 Defender services – Compliance management capabilities in Microsoft 365 – Information protection and governance capabilities of Microsoft 365 >> know…

[CR] Starbucks Iced Sunset

สำหรับเมนูนี้จะเป็นเมนูเฉพาะของ Starbucks Reserve Chao Phraya Riverfront @ ICONSIAM โดยเมนูนี้ Sunset ตามธีมของสาขาที่เป็นจุดชมวิวริมน้ำ โดยเมนูนี้เป็นนำชาฮิบิสคัส (ชาดอกชบา), น้ำส้ม, ส้ม, และโซดา ทานแล้ว Refresh ดีครับ ราคา Iced Sunset 170 บาท ถ้าเพิ่ม Espresso Shot 20 บาท / 1 Shot (ถ้าที่ Starbucks Reserve Chao Phraya Riverfront จะมี Muan JAI Shot ด้วยครับ รสชาติ รู้สึกแปลกลิ้นนิดหน่อย อาจจะเป็นเพราะว่าผมได้เคยทานชา + น้ำส้มด้วยแหละ รสชาติออกเป็นเปรี้ยวนิด หวาน ผสมซ่าหน่อยๆ ทานแล้ว Refresh ดีครับ จิบแก้ Code ยามบ่ายๆแก่ได้ดีเลยครับ และลองมาชิม Muan JAI Shot มันนุ่มกว่า Espresso Shot นะ รสมันไม่ได้กินแล้วจิ๊ดขมอะไรแนวนั้น ถ้าคนแบบจะจิบแล้วตื่นเลย มันจะไม่ใช่แนวครับ พลังงาน – Reference (พลังงานของแต่ละเมนู) เดี๋ยวถ้ามีข้อมูล จะมา Update ครับ

ขนาดแก้วสตาร์บัคส์ มีกี่แบบ

Blog นี้เขียนมาเพราะ ความสงสัยของตัวเองล้วนๆ เพราะ Line Official Starbucks แจ้งว่า โปรโมชันพิเศษ Double Star สำหรับการสั่งเครื่องดื่มขนาด 12 ออนซ์ คู่กับเค้ก หรือแซนวิช แต่ปกติคงไม่มีใครเข้าร้านไปสั่ง ขอชา chai ขนาด 12 ออนซ์ครับ …. วนกลับมาว่าขนาดแก้วสตาร์บัคส์ และแต่ละแก้วขนาดเท่าไหร่ครับ ขนาดแก้วสตาร์บัคส์ Short (ช็อต) : ขนาด 8 ออนซ์ หรือ 237 มิลลิลิตร (มีเฉพาะเครื่องดื่มร้อน พวกกาแฟ ชาร้อนไม่เกี่ยว) Tall (ทอล) : ขนาด 12 ออนซ์ หรือ 355 มิลลิลิตร Grande (แกรนเด) : ขนาด 16 ออนซ์ หรือ 473 มิลลิลิตร Venti (เวนติ) : ขนาด 20 ออนซ์ หรือ 591 มิลลิลิตร แล้ว Grande / Venti ภาษาแปลกๆ มันมาจากอะไร ? จริงๆแล้วเป็นคำในภาษาอิตาลีครับ มองว่าเป็นกลยุทธ์ทางการตลาดด้วยครับ เพราะ ชื่อดูหรู แปลกตา นอกจากภาษาแปลกๆแล้ว ยังเพิ่มยอดขายด้วยนะ เพราะ ปกติมีแต่ Short / Tall หลายคนอาจจะแบบกลัวจะเยอะไป สั่ง Short แต่คราวนี้ เพิ่ม Grande / Venti มา ถ้าเอาตาม Logic เดิมที่สั่ง Short จะขยับมา Grande แบบงงๆไป

[AZ-204] Instrument solutions to support monitoring and logging

azure

สำหรับ Tool ที่มี – Azure Monitor What data does Azure Monitor collect? Application monitoring data Guest OS monitoring data Azure resource monitoring data Azure subscription monitoring data Azure tenant monitoring data Monitoring data platform Metric Log Insights and curated visualizations Application Insights (App Service) Container Insights VM Insights – Application Insights Application Insights monitors Request rates, response times, and failure rates Dependency rates, response times, and failure rates Exceptions Page views and load performance AJAX calls from web pages – rates, response times, and failure rates. User and session counts. Performance counters from your Windows or Linux server machines, such…

GSP-327: Engineer Data in Google Cloud Note

Blog อันนี้เป็นบันทึกจาก Challenge จาก หนีจาก Azure มาลองเรียน Google Cloud โดยก่อนจะลองทำ challenge แนะนำว่าควรดูก่อนครับ Predict Visitor Purchases with a Classification Model in BQML | Google Cloud Skills Boost Task 1: Clean your training data อันนี้ใช้ Data Prep ก็ได้นะ ทำ Recipe เอา แต่บทล่าสุดใช้ BigQuery ML ยาวมา เลยลอง BigQuery ML Data Cleaning Tasks: Ensure trip_distance is greater than Number . Remove rows were fare_amount is very small (less than Value for example). Ensure that the latitudes and longitudes are reasonable for the use case. Ensure passenger_count is greater than Number . Be sure to add tolls_amount and fare_amount to Fare amount as the target variable since total_amount includes tips. Because the source dataset is large (>1 Billion rows), sample the dataset to…

[AZ-204]: Implement secure cloud solutions

azure

Implement Azure Key Vault Knowledge check – Implement Azure Key Vault(Knowledge check) Implement managed identities – Acquire an access token (DEV NOTE) Knowledge check – Implement managed identities (Knowledge check) Implement Azure App Configuration มี Manage Identity > ขอ Access Token เข้าใจ Azure Key Vault แล้ว รอบนี้มาลองปรับ App ตัว Code ให้รองรับด้วยครับ – Azure App Configuration service – ส่วนประกอบของ App Configuration เป็น Key & Value – Manage application features Feature Flag เอาไว้คุม Feature มีส่วนประกอบ 3 ส่วน – Secure app configuration data Knowledge check – Implement Azure App Configuration (Knowledge check) Reference

[CR] Starbucks Valencia Orange Juice

น้ำส้ม Valencia ราคา 90 บาท ถ้าเพิ่ม espresso shot ราคา 20 บาท / shot ถ้าเพิ่ม raspberry syrup ราคา 20 บาท (มีเฉพาะบางสาขานะ) ถ้าชอบหวานแนะนำเลย รสชาติ น้ำส้ม Valencia น้ำส้มคั้นสด มีเนื้อส้ม ให้เคี้ยวด้วยครับ เน้นไปออกทางหวานๆ espresso shot ขมเข้ม ผสมกันแล้วเข้ากันได้ดี ตื่นตัวตลอดวันครับ ทานคู่กับขนมปัง แซนวิช ของผมจะทานคู่กับ Jumbo Sausage Bite พลังงาน 90 แคลลอรี่ / 16 oz Reference (พลังงานของแต่ละเมนู) Calories in Starbucks Valencia Orange Refresher (Grande) and Nutrition Facts (fatsecret.com) Calories in Starbucks Valencia Orange Refresher (Venti) and Nutrition Facts (fatsecret.com)