Skip to content

Instantly share code, notes, and snippets.

View amanbolat's full-sized avatar

Amanbolat amanbolat

View GitHub Profile
@amanbolat
amanbolat / prompt.txt
Created September 9, 2025 19:53
Image prompt for Manduguk (Korean Dumpling Soup)
"A photorealistic, highly appetizing food photograph of a steaming bowl of Haemul Mandu-guk (Seafood Dumpling Soup). The dish is presented in an elegant, deep ceramic bowl, possibly light grey or a natural stoneware hue, positioned slightly off-center for dynamic composition. The star of the dish, plump and perfectly formed seafood dumplings, float invitingly in a rich, crystal-clear, golden-amber broth. The dumpling skins exhibit a delicate, slightly translucent quality, hinting at the savory, aromatic seafood filling within. Wisps of steam gracefully rise from the hot broth, emphasizing its freshness and warmth. The Mandu-guk is professionally garnished to enhance both flavor and visual appeal: a vibrant scattering of finely chopped green scallions provides a fresh contrast, while thin julienned strands of red chili pepper (or gochu-garu) add a striking pop of color and a subtle warmth. A glistening, artful swirl of toasted sesame oil graces the broth's surface, contributing a nutty aroma and a touch of sop
@amanbolat
amanbolat / llmproofreader.lua
Last active March 2, 2025 14:54
Hammperspoon Spoon to proofread the selected text
--- === LLMProofreader ===
---
--- Proofread clipboard contents using Claude
---
--- Place this file in the ~/.hammerspoon directory with the following structure
--- ── Spoons
--- └── LLMProofreader.spoon
--- └── init.lua
---
--- To use, add the following lines to ~/.hammerspoon/init.lua:
@amanbolat
amanbolat / 01_Makefile_with_pinned_version_of_protoc.md
Last active March 4, 2024 21:06
Makefile with pinned version of protoc and protoc-gen-go

Makefile with pinned version of protoc

This gist includes two files, Makefile and the script.

Script downloads the protoc for a given os and arch, unzips the files to .bin directory. It won't download the zip file, if it was already downloaded.

Makefile provides gen-prot entry point that ensures that protoc exists and generates the code from given proto files.

This setup ensures that the protoc and plugins versions are pinned and there is no need to donwload those tools manually.

Microservice project structure

I suggest to use the following project structure for any microservice which usually is deployed using container image on kubernetes, exposes its core logic through HTTP or gRPC transport layers and interacts with other services using a message broker, such as kafka.

root/
├── cmd/
@amanbolat
amanbolat / 01_go_interview_question_#1.md
Last active March 4, 2024 21:09
Go Interview Question #1

Go Interview Question #1

  • Read the code and explain it.
  • Will it compile or not?
  • Find any possible issues.
  • Explain how would you refactor it and why.
@amanbolat
amanbolat / 01_go_simple_round_robin_example.md
Last active March 4, 2024 21:12
Load balancing in golang

Round robin example in Go

An example of a round robin algorithm in Go that can be used for load balancing.