Skip to content

Instantly share code, notes, and snippets.

View tsingakbar's full-sized avatar

Yu Qing tsingakbar

  • Tencent
  • Shenzhen, China
View GitHub Profile
@tsingakbar
tsingakbar / ssh_remote_forward.go
Last active September 8, 2023 16:05
golang implementation of `ssh -R`, which will be convenient for environments lacking ssh installation
package main
import (
"io"
"log"
"net"
"os"
"os/signal"
"syscall"
"time"
@tsingakbar
tsingakbar / bettertoml.go
Created October 14, 2021 02:27
customized toml config marshal/unmarshal utility
package goutils
import (
"bytes"
"fmt"
"github.com/BurntSushi/toml"
"reflect"
"strconv"
"strings"
"time"
@tsingakbar
tsingakbar / rotate.go
Created October 14, 2021 02:02
simple golang log rotator
package goutils
import (
"errors"
"fmt"
"io"
"os"
"path/filepath"
"strconv"
"time"