Home

Quick config vim

My vim config some config files Basic https://github.com/amix/vimrc/blob/master/vimrcs/basic.vim quick install: curl https://raw.githubusercontent.com/amix/vimrc/master/vimrcs/basic.vim -o ~/.vimrc Advanced https://github.com/amix/vimrc https://github.com/spf13/spf13-vim

Read more

My windows terminal config

added: add git bash profile profiles refer https://github.com/microsoft/terminal/blob/master/doc/cascadia/SettingsSchema.md profiles.json: // To view the default settings, hold "alt" while clicking on the "Settings" button. // For documentation on these settings, see: https://aka.ms/terminal-documentation { "$schema": "https:/...

Read more

download docker by proxy on win10

使用命令行代理方式下载docker安装包 配置 为了方便开启代理,添加一点bash脚本: vim ~/.bashrc 添加如下内容: ## ## proxy setting ## function proxy_off(){ unset http_proxy unset https_proxy echo -e "proxy closed" } function proxy_on() { export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com" export http_proxy="http://127.0.0.1:10809" export http...

Read more

在shell脚本里简单快速的使用颜色

在shell脚本里简单快速的使用颜色的代码实现 脚本代码 #!/usr/bin/env bash # # some common functions # file: scripts/common-func.sh # Usage: # user_confirm # user_confirm "custom question" function user_confirm() { local yes=0 local msg="Confirm continue" # override default message [[ "$1" != "" ]] && msg=$1 # read user input read -p...

Read more

Use jekyll theme TeXt

jekyll theme kitian616/jekyll-TeXt-theme init my project: git clone https://github.com/kitian616/jekyll-TeXt-theme.git copy some assets to my project(_data, _includes, _layouts, docs, assets …); add docs supports(refer kitian616/jekyll-TeXt-theme/.travis.yml): cp -rfv docs/_includes . jekyll docs: jekyll-cn

Read more

给http.Handler包装中间件

给http.Handler包装中间件 package main import "net/http" func main() { handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Write([]byte("-O-")) }) mdl1 := func(h http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Write([]byte("a")) ...

Read more

重写 os.Stdout 输出

有时候我们想捕获,或者丢弃通过fmt.Print系列方法打印到Stdout的数据 丢弃输出 package main import ( "os" "fmt" ) var oldStdout *os.File func main() { discardStdout() fmt.Println("Hello, playground") restoreStdout() fmt.Println("Hello, playground 2") // Output: // Hello, playground 2 } // usage: // discardStdout() // fmt.Println("Hello, pl...

Read more

Welcome

If you see this page, that means you have setup your site. enjoy! :ghost: :ghost: :ghost: You may want to config the site or writing a post next. Please feel free to create an issue or send me email if you have any questions.

Read more