Diep's Blog
  • Home
Subscribe
go

Go common pitfall #1: slice appending

Go's slice is simple to use, but there are some easy to make mistakes if you are not aware of its internals. For example, with following program: package main import "fmt" func main() { healthyFoods := []string{"orange", "apple", "lettuce"} myFoods := healthyFoods[0:2] myFoods = append(myFoods, "bacon") fmt.Println(healthyFoods) } You

  • Diep Pham
Diep Pham Sep 25, 2022 • 1 min read
vim

Update your vimrc to Vim9 script

Vim 9 has been released, and one of the new features is Vim9 script. The purpose of Vim9 script, beside improve performance, is making Vimscript feels less weird, compare to other commonly used programming languages. In this blog post, we will learn how to convert existing vimrc file to use

  • Diep Pham
Diep Pham Jun 30, 2022 • 2 min read
fly.io

Host a Ghost blog on Fly.io for free

On this post, I’ll show you how to host a Ghost instance on Fly.io for free. If you don’t know yet, Fly.io is an application distribution platform that makes it super easy to deploy and scaling your application on multiple regions. Their free plan includes 3

  • Diep Pham
Diep Pham Feb 28, 2022 • 2 min read
docker

Dockerfile COPY vs. ADD

What is the difference between COPY and ADD in Dockerfile and when to use either of them.

  • Diep Pham
Diep Pham Feb 25, 2022 • 1 min read
Diep's Blog © 2023
  • Data & privacy
  • Contact
  • Contribute →
Powered by Ghost