16 มิถุนายน 2566

Google Cloud command to build image to GCP Container Registry and deploy to GCP Cloud Run

Steps to build image to GCP Container Registry and deploy to GCP Cloud Run

  • Goto your project containing Dockerfile
  • Build image to GCP Container Registry using command 
gcloud builds submit --tag gcr.io/$PROJECT_ID/hello:0.1 

  • Deploy your application to GCP Cloud Run using command

gcloud run deploy hello-app \ --image gcr.io/$PROJECT_ID/hello:0.1 \ --region us-central1 \ --allow-unauthenticated

15 มิถุนายน 2566

Magic Images that we can't trust our own eyes



 



โทรศัพท์หาย มีแอปฯ ธนาคารอยู่ในเครื่อง ทำยังไงดี ?

1. แจ้งระงับซิม

อันดับแรกให้แจ้งระงับการใช้ซิมกับผู้ให้บริการเครือข่ายโทรศัพท์มือถือก่อนเลย เพราะถ้าหากซิมที่อยู่ในโทรศัพท์ไม่สามารถใช้งานได้แล้วจะส่งผลให้แอปฯ ธนาคารรวมทั้งอีกหลาย ๆ แอปฯ ไม่สามารถใช้งานได้ไปด้วย โดยสามารถติดต่อ Call Center ของแต่ละเครือข่ายได้ที่เบอร์ดังนี้
  • AIS โทร. 1175
  • DTAC โทร. 1678
  • TrueMoveH โทร. 1242


2. แจ้งระงับบริการออนไลน์กับธนาคาร

ให้แจ้งธนาคารของทุกบัญชีที่เราได้ผูกไว้กับแอปฯ ในโทรศัพท์ว่าทำโทรศัพท์หาย ต้องการระงับบริการออนไลน์หรือ Mobile Banking ทั้งหมด โดยที่ยังคงสามารถทำธุรกรรมที่ธนาคาร ตู้ ATM หรือใช้จ่ายผ่านบัตรเดบิต/บัตรเครดิต ได้เหมือนเดิม โดยสามารถติดต่อ Call Center ของแต่ละธนาคารได้ที่เบอร์ดังนี้
  • ธนาคารกรุงเทพ โทร. 1333
  • ธนาคารกรุงไทย โทร. 0-2111-1111
  • ธนาคารกรุงศรีอยุธยา โทร. 1572
  • ธนาคารกสิกรไทย โทร. 0-2888-8888
  • ธนาคารเกียรตินาคินภัทร โทร. 0-2165-5555
  • ธนาคารซีไอเอ็มบี ไทย โทร. 0-2626-7777
  • ธนาคารทหารไทยธนชาต โทร. 1428
  • ธนาคารทิสโก้ โทร. 0-2633-6000
  • ธนาคารไทยพาณิชย์ โทร. 0-2777-7777
  • ธนาคารยูโอบี โทร. 0-2285-1555
  • ธนาคารแลนด์ แอนด์ เฮ้าส์ โทร. 1327
  • ธนาคารสแตนดาร์ดชาร์เตอร์ด โทร. 0-2724-4000
  • ธนาคารไอซีบีซี โทร. 0-2629-5588
  • ธนาคารไทยเครดิต 0-2697-5454
  • ธนาคารซิตี้แบงก์ โทร. 1588
  • ธนาคารพัฒนาวิสาหกิจขนาดกลางและขนาดย่อมแห่งประเทศไทย โทร. 1357
  • ธนาคารเพื่อการเกษตรและสหกรณ์การเกษตร โทร. 0-2555-0555
  • ธนาคารเพื่อการส่งออกและนำเข้าแห่งประเทศไทย โทร. 0-2169-9999
  • ธนาคารออมสิน โทร. 1115
  • ธนาคารอาคารสงเคราะห์ โทร. 0-2645-9000
  • ธนาคารอิสลามแห่งประเทศไทย โทร. 1302


3. ตามหาโทรศัพท์ที่หายไป

ลองใช้ฟีเจอร์ Find My Device หรือ Find My iPhone เพื่อเช็กตำแหน่งบนแผนที่ดูว่าโทรศัพท์ของเราอยู่ที่ไหน รวมทั้งพยายามหาทางติดต่อผู้ที่เก็บโทรศัพท์ได้ โดยสามารถดูข้อมูลเพิ่มเติมได้ที่ : วิธีตามหาโทรศัพท์หาย ทุกรุ่น ทุกยี่ห้อ ทำยังไงมาดู



4. เปิดใช้งานในโทรศัพท์เครื่องใหม่

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



ที่มา https://money.kapook.com/view255596.html

11 มิถุนายน 2566

terraform import existing GCP resources to terraform module

If you want to import your existing resources, e.g., existing GCP compute engine instance, to your terraform module. Try steps below.


Your terraform code structure will look like this

main.tf

module "instances" {
source = "./modules/instances"
}


modules/instances.tf

resource "google_compute_instance" "tf-instance-1" {
name = "tf-instance-1"
machine_type = "n1-standard-1"
boot_disk {
initialize_params {
image = "debian-10-buster-v20230510"
}
}
network_interface {
network = "default"

access_config {
}
}
metadata_startup_script = <<-EOT
#!/bin/bash
EOT
allow_stopping_for_update = true
# other config
}


You can use this command to import your existing GCP compute engine instance to your terraform module

terraform import module.instances.google_compute_instance.tf-instance-1 tf-instance-1

01 มิถุนายน 2566

OpenSSL commands to check and verify your SSL certificate, key and CSR

Check a certificate:

Check a certificate and return information about it (signing authority, expiration date, etc.)
openssl x509 -in server.crt -text -noout

Check a key:

Check the SSL key and verify the consistency
openssl rsa -in server.key -check


Check a CSR:

Verify the CSR and print CSR data filled in when generating the CSR
openssl req -text -noout -verify -in server.csr


Verify a certificate and key matches

These two commands print out md5 checksums of the certificate and key; the checksums can be compared to verify that the certificate and key match.

openssl x509 -noout -modulus -in server.crt | openssl md5 

openssl rsa -noout -modulus -in server.key | openssl md5





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

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