Skip to content

Duong's Blog

About technology stuff that piqued my interest

  • English
  • Vietnamese
  • About me

Author: duongnt.bk

  • Home
  • duongnt.bk

Cách viết custom command cho Amp

October 9, 2025 duongnt.bk1 Comment on Cách viết custom command cho Amp

Thay vì copy-past prompt, ta có thể biến chúng thành custom command. Cách này giúp ta tái sử dụng prompt mà không làm rối context.

AI Agent, Vietnamese ai-agent, amp, custom-command

How to create custom command for Amp

October 9, 2025October 9, 2025 duongnt.bkLeave a Comment on How to create custom command for Amp

Stop copy-pasting prompts. Turn them into Amp custom command that load on-demand, keep context clean, and never forget. Step-by-step guide inside.

AI Agent, English ai-agent, amp, custom-command

Dùng RedisTemplate để gửi byte tới Redis

September 15, 2024 duongnt.bkLeave a Comment on Dùng RedisTemplate để gửi byte tới Redis

Theo mặc định, RedisTemplate sẽ chuyển dữ liêu của ta sang dạng String trước khi thực hiện serialize. Trong một số trường hợp, ta có thể tiết kiệm bộ nhớ bằng cách gửi thẳng byte lên Redis.

Java/Kotlin, Vietnamese Kotlin, redis, RedisTemplate

Send raw bytes to Redis with RedisTemplate

September 15, 2024 duongnt.bk1 Comment on Send raw bytes to Redis with RedisTemplate

By default, RedisTemplate convert our data to String before sending it to Redis. In some case, sending raw bytes can help us save some memory.

English, Java/Kotlin Kotlin, redis, RedisTemplate

Fire and forget với coroutine trong Kotlin

August 24, 2024August 24, 2024 duongnt.bkLeave a Comment on Fire and forget với coroutine trong Kotlin

Một xử lý được gọi là fire and forget nếu như ta không cần đợi nó chạy xong và cũng không cần giá trị nó trả về. Vậy ta thực hiện điều này trong Kotlin như thế nào?

Java/Kotlin, Vietnamese coroutine, fire-and-forget, Kotlin

Fire and forget using coroutine in Kotlin

August 24, 2024 duongnt.bkLeave a Comment on Fire and forget using coroutine in Kotlin

Fire and forget means we start an action and don’t care when or how it finish. Let’s see how we can achieve this with Kotlin

English, Java/Kotlin coroutine, fire-and-forget, Kotlin

Tạo DSL với Kotlin để đọc dữ liệu từ Elasticsearch

August 6, 2023August 6, 2023 duongnt.bkLeave a Comment on Tạo DSL với Kotlin để đọc dữ liệu từ Elasticsearch

Kotlin cho phép ta tạo DSL một cách dễ dàng. Hôm nay, chúng ta sẽ cùng tạo một DSL đơn giản để đọc dữ liệu từ Elasticsearch.

Java/Kotlin, Vietnamese dsl, Elasticsearch, Kotlin

Kotlin DSL example with Elasticsearch

August 6, 2023August 6, 2023 duongnt.bk1 Comment on Kotlin DSL example with Elasticsearch

Implementing a DSL can’t be easier with Kotlin. Today, we will create a toy DSL to query data from Elasticsearch cluster.

English, Java/Kotlin dsl, Elasticsearch, Kotlin

Async search với Elasticsearch và Kotlin

July 17, 2023July 20, 2023 duongnt.bk1 Comment on Async search với Elasticsearch và Kotlin

Thời gian xử lý request của Elasticsearch có thể kéo dài. Lúc này, ta có thể gửi chúng một cách không đồng bộ hoặc dùng async search.

Java/Kotlin, Vietnamese async search, Elasticsearch, Elasticsearch API Client, Kotlin

Async search with Elasticsearch and Kotlin

July 16, 2023July 20, 2023 duongnt.bk1 Comment on Async search with Elasticsearch and Kotlin

Elasticsearch requests can take a long time. In such cases, we can send them in an asynchronous way, or use async search request.

English, Java/Kotlin async search, Elasticsearch, Elasticsearch API Client, Kotlin

Posts navigation

Older posts
Copyright © 2025 Duong's Blog All rights reserved. Theme: Flash by ThemeGrill. Powered by WordPress