"Life is all about sharing. If we are good at something, pass it on." - Mary Berry

Man on fire - trained or untrained?

2023-03-20

Hôm trước vừa biên một bài về Nhiều giờ bay và có phản hổi, thì hôm nay ChatGPT lại đưa tôi đến đây:

 1You:
 2  Top 10 kidnapping movies (with release year)
 3
 4ChatGPT:
 5  Here are the top 10 Kidnapping movies with their release year:
 6
 7  1. "Taken" (2008)
 8  2. "Ransom" (1996)
 9  3. "Man on Fire" (2004)
10  4. "Prisoners" (2013)
11  5. "Gone Girl" (2014)
12  6. "Misery" (1990)
13  7. "The Vanishing" (1988)
14  8. "Room" (2015)
15  9. "The Call" (2013)
16  10. "The Lovely Bones" (2009)

Read More...


Nhiều giờ bay và có phản hồi

2023-03-14

Tặng D.

https://fb.watch/jfvYJS82XK/

Nam Định, 1992.

Mặc dù còn nhiều khó khăn nhưng chú vẫn được bố mẹ cho đi học bóng bàn. Bọn trẻ hồi đó dùng… bảng đen để chơi bóng ở nhà. Chú được chú H hàng xóm cho một cái vợt mà quý như vàng.

Nhà hát nhân dân (nằm cạnh Chùa Vọng Cung) có khoảng chục bàn. Thầy dạy từ những động tác cơ bản nhất: đôi công. Góc này có H (5 tuổi) cao ngang mặt bàn.

Read More...


gocloud - writing data to a bucket: 403

2022-12-23

Problem

We are writing some integration test using Go CDK. After writing some data to a bucket:

1	writer, err := buckOut.NewWriter(ctx, fileDst, nil)
2	if err != nil {
3		logger.Errorf("failed to write to fileDst: %v", err)
4		return err
5	}
6	defer writer.Close()

we got an error when reading:

1(code=NotFound): storage: object doesn't exist

By reading the documentation, I pay attention to this:

Closing the writer commits the write to the provider, flushing any buffers, and releases any resources used while writing, so you must always check the error of Close.

Read More...


Terraform failed to acquire state lock: 403: Access denied., forbidden

2022-11-17

Problem

We stored Terraform state in gcs. For some reasons, we got this error randomly when running on BitBucket pipelines:

 1 2│ Error: Error acquiring the state lock
 3 4│ Error message: 2 errors occurred:
 5* writing
 6"gs://bucket/path/to/default.tflock"
 7│ failed: googleapi: Error 403: Access denied., forbidden
 8* storage: object doesn't exist
 9101112│ Terraform acquires a state lock to protect the state from being written
13│ by multiple users at the same time. Please resolve the issue above and try
14│ again. For most commands, you can disable locking with the "-lock=false"
15│ flag, but this is not recommended.
16

Read More...


The King of Vietnamese language game show

2022-11-04

My family likes to watch “The King of Vietnamese language” game show together. I want to encourage our son to love Vietnamese. At the end of the game, the player has to find 7 complex words from the letters, for e.g,

đ / ă / n / g / c / a / y

One evening a few weeks ago, while we were watching the final round, my wife suddenly came up with an idea: this game could be programmed.

Read More...


How to send an HTTP request without using curl?

2022-05-22

Problem

We are using JWT validation. For some reasons, when testing on staging, we got 401 error:

1[GIN] 2022/05/20 - 14:20:57 | 401 |    2.588128ms |       127.0.0.1 | POST     "/v1/endpoint"

Troubleshooting

After looking at the source code, we need to set the operation_debug to true to see what caused that error:

12022/05/20 08:31:26 KRAKEND ERROR: [ENDPOINT: /v1/endpoint][JWTValidator] Unable to validate the token: should have a JSON content type for JWKS endpoint

Read More...


Adele - Million years ago

2022-02-10

Vừa lên xe thì nghe được đoạn guitar hay quá, vội lấy điện thoại ra ghi âm lại (sợ về nhà không Gúc ra bài gì). 25 tuổi mà bạn ấy viết lời hay thật đấy!

Adele - Million Years Ago (Acoustic Cover by Emir Taha)

I only wanted to have fun
Learning to fly, learning to run
I let my heart decide the way
When I was young

Deep down, I must have always known
That this would be inevitable

Read More...


Mùi Tết

2022-02-06

Chung cake Bánh Chưng rán… nước lọc.

Sáng 29

Những năm chưa covid, về sớm. Lang thang chợ hoa để chọn một cây quất: gốc ba chạc, quả xanh, quả chín, một ít lá non trên ngọn và nhất định phải có một vài nụ hoa. Đến mùng một, mùng hai nở là vừa đẹp.

Có năm còn nhờ U đi chợ mua một ít hạt kê, về ngâm nước ấm rồi đem rải ở dưới gốc. Chúng nảy mầm, mọc cao khoảng 1, 2 cm nhìn như cỏ thật.

Read More...


Kat

2021-11-30

Kat


SICP Exercise 2.43: Eight queens: interchange the order of the nested mappings

2021-11-02

Exercise 2.43: Louis Reasoner is having a terrible time doing exercise 2.42. His queens procedure seems to work, but it runs extremely slowly. (Louis never does manage to wait long enough for it to solve even the 6× 6 case.) When Louis asks Eva Lu Ator for help, she points out that he has interchanged the order of the nested mappings in the flatmap, writing it as

Read More...