Git Product home page Git Product logo

kblog's People

Contributors

imgbotapp avatar kuri-su avatar kurisu-a avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

kblog's Issues

git call failed

[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有问题呢

png to webp

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
}

oh-my-zsh-git-alias.md

请问这些alias是在oh-my-zsh的哪个文件中定义的?我找了一遍都没找到,有一个git.zsh:~/.oh-my-zsh/lib/git.zsh,但我在里面搜索了一下,根本就没有alias这些命令,比如:gcmsg

抱歉

你的blog是我见过最好看的,没有之一
就是

文章少了点

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.