Code Monkey home page Code Monkey logo

go-utils's Introduction

简介

自己积累的一些 go 相关工具类

使用

go get github.com/BrokenMyth/go-utils 

Linux 相关脚本

最佳适配 Ubuntu,其他系统不一定兼容

安装 docker

curl -sSL https://raw.githubusercontent.com/BrokenMyth/go-utils/main/shell/docker/install_docker.sh | bash

卸载 docker

https://raw.githubusercontent.com/BrokenMyth/go-utils/main/shell/docker/uninstall_docker.sh

开启 rsa

Key 填本地生成的秘钥,且一定要加上引号。(TODO:如果配置里不存在一些 rsa 字段,需要新写入)

curl -sSL https://raw.githubusercontent.com/BrokenMyth/go-utils/main/shell/system/open_rsa.sh | bash -s "key"

随后使用本地机连接

ssh -i ~/.ssh/id_rsa root@ip  
ssh root@ip

查看 key:

cat ~/.ssh/id_rsa.pub

如果没有则生成:

ssh-keygen -t rsa

关闭 rsa

curl -sSL https://raw.githubusercontent.com/BrokenMyth/go-utils/main/shell/system/close_rsa.sh | bash

安装 go

curl -sSL https://raw.githubusercontent.com/BrokenMyth/go-utils/main/shell/go/install_go.sh | bash

卸载 go

curl -sSL https://raw.githubusercontent.com/BrokenMyth/go-utils/main/shell/go/uninstall_go.sh | bash

安装 xray

curl -sSL https://raw.githubusercontent.com/BrokenMyth/go-utils/main/shell/xray/install_xray.sh | bash

卸载 xray

curl -sSL https://raw.githubusercontent.com/BrokenMyth/go-utils/main/shell/xray/uninstall_xray.sh | bash

安装 ffmpeg

注意:安装的是二进制文件,无需编译

curl -sSL https://raw.githubusercontent.com/BrokenMyth/go-utils/main/shell/ffmpeg/install_amd64_ffmpeg.sh | bash
curl -sSL https://raw.githubusercontent.com/BrokenMyth/go-utils/main/shell/ffmpeg/install_arm64_ffmpeg.sh | bash

(TODO: 根据系统架构来安装)

卸载 ffmpeg

curl -sSL https://raw.githubusercontent.com/BrokenMyth/go-utils/main/shell/ffmpeg/uninstall_ffmpeg.sh | bash

测试

curl -sSL https://raw.githubusercontent.com/BrokenMyth/go-utils/main/shell/test.sh | bash -s key

go-utils's People

Contributors

brokenmyth avatar

Watchers

 avatar

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.