Skip to content

Instantly share code, notes, and snippets.

View bastengao's full-sized avatar
🏠
Working from home

Basten Gao bastengao

🏠
Working from home
View GitHub Profile
@bastengao
bastengao / Passengerfile.json
Last active November 1, 2019 00:45
passenger standalone systemd service
{
"environment": "production",
"port": 3000,
"daemonize": true,
"pid_file": "tmp/pids/passenger.pid",
"log_file": "log/passenger.log"
}
@bastengao
bastengao / slice_benchmark.go
Created November 10, 2021 03:05
Go slice performance benchmark
package main
import "testing"
func BenchmarkInitLen(b *testing.B) {
n := b.N
for i := 0; i < n; i++ {
a := make([]int64, n)
for j := 0; j < n; j++ {
a[j] = int64(j)