Wake Me Up When September Ends.

A wanderer capable of grasping the beauty of the grass, with a heart full of ancient charm, and a fondness for playful wit. Those who understand my words are knowledgeable individuals; those who decipher my code truly comprehend the essence. I am a wandering code swordsman, carrying my skills and riding freely through the digital world.

1. 查看所有本地分支

git branch

2. 删除本地分支

git branch -D branch_name

其中,branch_name为要删除的分支名称。

3. 查看所有远程分支

git branch -r

4. 删除远程分支

git push origin --delete branch_name
阅读全文 »

QEMU

QEMU是一个通用的开源机器仿真器和虚拟机。当用作机器仿真器时,QEMU可以在不同的机器(例如您自己的PC)上运行针对一台机器(例如ARM板)的操作系统和程序。通过使用动态翻译,它获得了非常好的性能。比如模拟嵌入式开发环境!

ubuntu 22.04 桌面版本已经默认安装了,所以无需额外安装。

win10 镜像

win10镜像下载地址:

https://next.itellyou.cn/Original/#cbp=Product?ID=f905b2d9-11e7-4ee3-8b52-407a8befe8d1

建立一个虚拟机文件夹,如win10,接着如下操作步骤:

  1. 将上文镜像iso文件移动进来重命名为win10.iso
  2. 在当前目录下,使用qemu-img 创建运行虚拟机镜像,大小40G&格式为qcow2。命令如下:qemu-img create -f qcow2 win10.img 40G
  3. 如下是启动win10虚拟机相关命令:
qemu-system-x86_64 -hda ./win10.img -cdrom win10.iso  -boot d -enable-kvm -machine q35 -device intel-iommu -smp 2,sockets=1,cores=2 -m 2G -vga std -net nic,model=e1000 -net user -usbdevice tablet
阅读全文 »

目前一些场景在运行的容器时候需要附带执行一些命令,可以使用docker exec命令

docker exec [OPTIONS] CONTAINER COMMAND [ARG...]

OPTIONS说明:

-d,–detach :分离模式: 在后台运行

-i,–interactive :即使没有附加也保持STDIN 打开

-t,--tty:分配一个伪终端

-u,-user :指定执行用户

-w,–workdir :指定工作目录

docker 定时任务执行

下面是PHP的satis私有镜像仓库命令在docker中同步命令如下:

阅读全文 »

因为笔记的指纹驱动是goodix供应商提供,但是官方没有提供相应的linux下驱动,导致指纹在自己的ubuntu下使用。最近看到libfprint支持了goodix有关设备,其中包含了我的型号(型号查看lsusb),但是安装之后有线网卡没了,且编译安装过程中关于libusb无法解决,最终导致安装失败。

所以本次记录修复有线网卡解决办法,有线网卡故障表示线缆已拔出,实际是网卡驱动丢失并不是线路故障!

解决办法

查找网卡设备

lspci -k |grep Ethernet

显示如下:

01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
阅读全文 »