Skip to content

Instantly share code, notes, and snippets.

View latavin243's full-sized avatar
⛏️
code sixteen tons

latavin latavin243

⛏️
code sixteen tons
View GitHub Profile
package main
import (
"crypto/sha256"
"fmt"
"math/rand"
"strconv"
)
func main() {
@latavin243
latavin243 / string_format_benchmark.go
Created January 25, 2024 04:05
go test -bench=. string_test.go
package string_test
import (
"bytes"
"fmt"
"strconv"
"strings"
"testing"
)
package main
/*
Prerequisites:
go get -v github.com/pingcap/parser@3a18f1e
go get -v github.com/pingcap/tidb/types/parser_driver@328b6d0
*/
import (
"fmt"
@latavin243
latavin243 / .profile
Last active January 25, 2024 03:59
Server environment, .zshrc with zplug, tmux config, etc. Follow the step.sh.
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
@latavin243
latavin243 / .ideavimrc
Last active January 25, 2024 02:36
Vim config file example for Jetbrains IDEs. Put .ideavimrc under $HOME dir.
set scrolloff=5
set showmode
set history=1000
" set rnu
" for default search
set ignorecase
set hlsearch
set smartcase
set incsearch