kuri-su / kblog Goto Github PK
View Code? Open in Web Editor NEW@Kuri-su's Blog
Home Page: https://kuricat.com
License: Other
@Kuri-su's Blog
Home Page: https://kuricat.com
License: Other
hello, 有留意到你有follow我的github, 感謝一下
我看到 https://github.com/Kuri-su/KBlog/blob/master/articles/origin/docker-image-crop-note.md 不禁想吐個槽, 我有印象golang可以static compile成一個binary, 那麼docker image可以from scratch只丟binary進去... 想要再瘦一點可以這麼試試看
不過要同時跑多個docker image這樣未必好了, 因為背後的library可以用同一個image share...
[Call Trace]
./stack.sh:723:git_clone
/opt/stack/devstack/functions-common:537:git_timed
/opt/stack/devstack/functions-common:604:die
[ERROR] /opt/stack/devstack/functions-common:604 git call failed: [git clone git://git.openstack.org/openstack/requirements.git /opt/stack/requirements]
Error on exit
World dumping... see /opt/stack/logs/worlddump-2022-04-23-030042.txt for details
ebtables v1.8.7 (nf_tables): table `broute' is incompatible, use 'nft' tool.
报错提示,已经全局代理socks5,为什么还是git有问题呢
import (
"bufio"
"fmt"
"io"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"strconv"
"strings"
)
var utilsPath string
func main() {
dir, _ := filepath.Abs(filepath.Dir(os.Args[0]))
cmdParms := os.Args
utilsPath = dir + "/cwebp"
projectPath := cmdParms[1]
isReplace, _ := strconv.ParseBool(cmdParms[2])
parms := make([]string, 0)
for i := 3; i < len(cmdParms); i++ {
parms = append(parms, cmdParms[i])
}
parms = append(parms, "-o")
readDir(projectPath, isReplace, parms)
}
func readDir(path string, isReplace bool, parms []string) {
if infos, e := ioutil.ReadDir(path); e == nil {
for _, temp := range infos {
dir := temp.IsDir()
name := temp.Name()
if dir && !strings.Contains(name, "assets") {
readDir(path+"/"+name, false, parms)
} else if strings.HasSuffix(name, ".JPG") || strings.HasSuffix(name, ".JPEG") ||
strings.HasSuffix(name, ".jpg") || strings.HasSuffix(name, ".jpeg") ||
strings.HasSuffix(name, ".png") || strings.HasSuffix(name, ".PNG") {
split := strings.Split(name, ".")
dispFile(path+"/"+name, path, split[0], parms)
if !isReplace {
os.Remove(path + "/" + name)
}
}
}
}
}
func dispFile(path, dirPath, name string, parms []string) {
parms = append(parms, dirPath+"/"+name+".webp")
parms = append(parms, path)
execCmd(utilsPath, parms)
}
func execCmd(shell string, raw []string) (int, error) {
fmt.Println(shell, raw)
cmd := exec.Command(shell, raw...)
stdout, err := cmd.StdoutPipe()
if err != nil {
fmt.Println(err)
return 0, nil
}
stderr, err := cmd.StderrPipe()
if err != nil {
fmt.Println(err)
return 0, nil
}
if err := cmd.Start(); err != nil {
fmt.Println(err)
return 0, nil
}
s := bufio.NewScanner(io.MultiReader(stdout, stderr))
for s.Scan() {
text := s.Text()
fmt.Println(text)
}
if err := cmd.Wait(); err != nil {
fmt.Println(err)
}
return 0, nil
}
请问这些alias是在oh-my-zsh的哪个文件中定义的?我找了一遍都没找到,有一个git.zsh:~/.oh-my-zsh/lib/git.zsh
,但我在里面搜索了一下,根本就没有alias这些命令,比如:gcmsg
你的blog是我见过最好看的,没有之一
就是
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.