Skip to content

Instantly share code, notes, and snippets.

@rnyrnyrny
rnyrnyrny / logger.go
Last active July 20, 2024 07:33
log using uber zap and lumberjack (zapcore.AddSync version)
// thanks to:
// https://github.com/uber-go/zap/blob/master/FAQ.md#does-zap-support-log-rotation
// https://studygolang.com/articles/17394
// https://stackoverflow.com/questions/54395407/zap-logging-with-1-customized-config-and-2-lumberjack
// Please test and debug it before putting it in production.
package logger
import (
"fmt"
"os"
@rnyrnyrny
rnyrnyrny / wezterm.lua
Last active May 29, 2023 08:25
a simple wezterm config that I use
-- I recently switched from alacritty to wezterm. Supports mouse scrolling, has builtin emoji and multi-tab support. So far so good.
-- The config is in lua that I don't know much about. But the official doc has an example config to start with.
-- Pull in the wezterm API
local wezterm = require 'wezterm'
-- This table will hold the configuration.
local config = {}
-- In newer versions of wezterm, use the config_builder which will