Cron Expression online tools
https://crontab.cronhub.io/ This is a web that I’d like to recommend when you need to deal with cron expression. It can describe the cron expression even as in second format. For example
เจอ error warning ไม่สามารถ git pull ได้อย่างที่เคย
บางครั้งอาจจะเคยเจอว่าเครื่องของเราไม่สามารถ git pull อะไรได้ ขึ้น warning บอกว่า .ssh/known_hosts อยู่แก้ เราสามารถดู line ที่ขึ้น error ได้ ดู host แล้วใช้คำสั่ง ssh-keygen -R <host> เพื่อลบสะ
How to pull all git repo in subfolders
คือเดี่ยวนี้มีโปรเจคย่อยเยอะแยะ เกือบๆสิบโปรเจคอยู่ใน folder เดียว เราอยากจะ run command เดียวแล้ว git pull โปรเจคทั้งหมดภายในคำสั่งเดียว ทำยังไง ก็ทำไงแบบนี้ไง จะรันผ่าน command line หรือใส่ sh file ก็ได้นะ
AWS SQS หยุดส่ง message ชั่วคราวด้วยการ delay queues
คือบางครั้งเราต้องการทีจะหยุด consume message จาก aws sqs แทนที่จะหยุด service หรือทำ toggle flag เราสามารถใช้ settting ของ AWS SQS คือ Delivery delay ซึ่ง default คือ 0 วินาที สูงสุดคือ 15 นาที การ Set Delivery delay จะทำให้ message ที่ถูกส่งเข้าใน SQS นี้จะยังไม่แสดงเข้ามาใน Queue จนกว่าจะครบกำหนดเวลาที่ตั้งไว้ที่ Delivery delay AWS Document https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-delay-queues.html
Upsert(Insert/Update) statement in PostgreSQL
Insert statement ON CONFLICT (columns) DO NOTHING; References
[ของดีบอกต่อ] Plant UML
วันก่อนต้องอธิบายงานเขียน document ให้ทีมอ่าน และต้องมีการวาด sequence diagram ก็จำได้ว่าเคยใช้ Plant UML มาแล้ว รู้สึกว่าใช้งานได้ง่าย เหมาะกับโปรแกรมเมอร์ เหมือนเขียนโค้ดออกมาแล้ว Generate ออกมาเป็น Diagram ออกมา และ export เป็น .png ได้ด้วย แถมมี plugin กับ IntelliJ
Git ผูกได้ก็แก้ได้ unset-upstream
ไปทำอีท่าไหนไม่รู้ ตอนpush code ขึ้น git แล้วขึ้น Error มาตามด้านล่าง current branch does not match the name of your current branch . เช็คดูดีๆ อ้าว feature branch ไปชี้ที่ master นี้..ไม่ใช่ละ โอเค…ปัญหานี้แก้ได้ ไม่ยาก แค่เราต้องปลด branch ที่ผูก แล้วผูกด้วย remote branch ที่ถูกต้อง โดยเริ่มทำการปลด upstream branch ก่อนตามคำสั่งนี้ คราวนี้ local branch เราก็จะไม่ผูกกับ remote แล้ว ต่อไปก็ทำการผูกกับ remote ลอง pull & push ก็จะได้ปกติ
How to generate a private/pubic key from mac command line
Open the terminal run command 3. There is a prompt to enter file name 4. After the key created, you can find in the .ssh folder in your home folder. There will be <your_file>, this is the private key, and <your_file>.pub which is the public key. 5. Share your public key to 3rd parties. Enjoy!!…