更换GORM默认的SQLite驱动 在GORM官方的Issues发现也有人反馈此类问题,于是顺藤摸瓜,找到了github.com/glebarez/sqlite这个库,该库使用纯go实现,不依赖CGO,地址是:https://github.com/glebarez/sqlite 于是将官方的驱动: import( "gorm.io/driver/sqlite" "gorm.io/gorm" ) 更换为: import( "github.com/glebarez/sqlite" "gorm.io/gorm" ) 这样就可以在不依赖CGO的情况下编译出静态二进制文件,从而解决跨平台依赖动态...

  mtfBvWHnJ7tD   2023年11月13日   41   0   0 sqlitegithub跨平台

<template> <!-省略其他模板代码--> <divclass="main-content"> <!-...--> <divref="xtermContainer"style="width:calc(100%40px);height:600px;padding:20px"></div> </div> <!-...--> </template> <script> //...其他import语句... exportdefault{ //...其他选项... ...

  mtfBvWHnJ7tD   2023年11月13日   34   0   0 服务器数组

!/bin/bash https://github.com/sklochkov/performance-tuner/blob/master/src/network-queues.sh https://github.com/torvalds/linux/blob/master/Documentation/networking/scaling.rst yuminstallredhat-lsb-y if[-n"`lsb_release-i|grep-i"debian"`"] then apt-getinstall-ynet-toolsbcethtool else yuminstall-ynet...

  mtfBvWHnJ7tD   2023年11月02日   60   0   0 网络接口sed中断处理

a:=[]string{} a1:=strings.Join(a,"\n") reader:=bytes.NewBuffer([]byte(a1)) cHttp:=&http.Client{Timeout:10time.Second} resp,_:=http.NewRequest("POST","http://localhost:8086/api/v2/write?org=org&bucket=test&precision=s",reader) resp.Header.Add("Authorization","Token12345") resp.Header.S...

  mtfBvWHnJ7tD   2023年11月02日   45   0   0 json

下载docker-compose文件 gitclonehttps://github.com/zabbix/zabbix-docker.git 启动服务 cdzabbix-docker gitcheckout6.0切换到6.0版本,进行6.0版本安装 ln-sdocker-compose_v3_alpine_mysql_latest.yamldocker-compose.yaml创建软链接 docker-composeup-d

  mtfBvWHnJ7tD   2023年11月02日   33   0   0 gitDocker启动服务

!/bin/bash mac_addresses=($(dmesg|grep"eth"|grep"PCIe"|awk-F'''{print$8}')) count=0 formacin"${mac_addresses[@]}";do ((count)) interface=$(ifconfig|grep-B4"$mac"|grep-oE"^[^]+"|head-n1|awk-F":"'{print$1}') echo"第$count个口MAC地址:$mac对应的物理端口:$interface" done

  mtfBvWHnJ7tD   2023年11月02日   60   0   0 bash

1修改rootfs.img1.安装工具[root@localhost]yuminstall-ysquashfs-tools2.用unsuqashfs命令直接解压缩squashfs.img[root@localhost]unsquashfssquashfs.img3.挂载文件系统[root@localhost]cdsquashfs-root/LiveOS/[root@localhostLiveOS]mountrootfs.img/mnt/rootfs/[root@localhostLiveOS]ls/mnt/rootfs/binbootdevetcfirmwareliblib64l...

  mtfBvWHnJ7tD   2023年11月02日   60   0   0 CentOS

cat/etc/pcdn/pcdn.conf|grepmacs|head-n1|awk-F""'{print$2}'cat/etc/pcdn/pcdn.conf|grepbw|head-n1|awk-F""'{print$2}'系统盘root_type=`lsblk-ar2>>/dev/null|grep-w"/"|awk'{print$(NF-1)}'`root_name=`lsblk-ar2>>/dev/null|grep-w"/"|awk'{print$1}'`root_disk=""if[x"$root_type"x"lvm"];thenroot_vg_n...

  mtfBvWHnJ7tD   2023年11月02日   42   0   0 sed系统盘

sudovim/etc/systemd/system/getty.target.wants/getty\@tty1.serviceExecStart=-/sbin/agetty--autologinroot--noclear%I$TERM加一个这个文件getty@tty2.serviceThisfileispartofsystemd.systemdisfreesoftware;youcanredistributeitand/ormodifyitunderthetermsoftheGNULesserGeneralPublicLicenseaspublishedbytheFreeSoftw...

  mtfBvWHnJ7tD   2023年11月02日   51   0   0 GNUvimredis
关注 更多

空空如也 ~ ~

粉丝 更多

空空如也 ~ ~