1 知识 2024-10-02 rsync 自动输入密码 我们常用sudo,ssh、ftp命令操作服务器或者修改权限的时候都会要求输入password,但是shell脚本运行中该如何交互实现自动输入密码呢? 下面总结三种实现方法。 一、重定向: 用重定向方法实现交互的前提是指令需要有参数来指定密码输入方式,如ftp就有-i参数来指... 阅读全文
2 知识 2024-09-30 Gin路由分组 1 假设我们需要开发的接口有这些 package main import ( "net/http" "github.com/gin-gonic/gin" ) func main() { r := gin.Default() r.GE... 阅读全文
3 知识 2024-09-30 Gin控制器分离 Gin控制器分离 1 函数式 /* apiRouters.GET("/", func(c *gin.Context) { c.String(200, "我是一个api接口") }) 这样的一个路由注册我们发现,后面都跟了一个匿名函数,... 阅读全文
4 知识 2024-09-23 首次使用Android Studio,下载Gradle很慢或者失败的解决办法 即使把微屁恩开启全局模式,在Android Studio下仍然提示Download Gradle失败,或者下载速度非常非常慢。 这时候可以点击下载进度条,在弹出Build之类的窗口可以看到下载链接,类似于https://services.gradle.org/distrib... 阅读全文
5 知识 2024-08-26 How to implement the Sylius theme? Practical tips and examples How to implement the Sylius theme? Practical tips and examples Natively in Sylius, you can customize your storefront design in many wa... 阅读全文