Skip to content

Instantly share code, notes, and snippets.

View g10guang's full-sized avatar
🤑
Running On My Way

Liu XiGuang g10guang

🤑
Running On My Way
View GitHub Profile
@g10guang
g10guang / upsource.sh
Last active April 11, 2021 13:38
sync local code to remote server
set -ex
prepath=`dirname $PWD`
# make sure both mac & devbox satisfy, $GOPATH=$HOME/go
myhome="${HOME}/"
prepath=${prepath:${#myhome}}
# set your own devbox username, mine is liuxiguang
devboxusername="liuxiguang"
sshpass -p ${devboxusername} rsync -avr --delete --exclude=test.go --exclude=.idea --exclude=.vscode --exclude=output ${PWD} dev:/home/${devboxusername}/$prepath
echo $(date -u +"%Y-%m-%d %H:%M:%S%Z")
@g10guang
g10guang / cmd.md
Last active May 28, 2021 02:19
unix useful command

delete file exclude pattern:

find . ! -name '*.apk*' -delete

extract apk file

unzip xxxx.apk -d ${target_dir}
@g10guang
g10guang / config_linux.md
Last active March 20, 2022 03:21
config my new linux

ssh

config github/gitlab ssh key

ssh-keygen

ssh login with public key

@g10guang
g10guang / .ideavimrc
Last active March 26, 2022 09:59
.ideavimrc
set incsearch
set hls
set smartcase
set ignorecase
set visualbell
set noerrorbells
set easymotion
@g10guang
g10guang / remove_html_tag.go
Created January 18, 2020 12:33
golang remove html tag from string
package utils
import (
"regexp"
"sort"
"strings"
)
// match html tag and replace it with ""
func RemoveHtmlTag(in string) string {