Convert SVG with xlink image to PNG

Only with ImageMagick.

1 identify -list policy

If you see output below:

Modify Path above, comment those like

2 If you have svg somewhere other than your own disk, download it first.

3 Convert

if that doesn’t work, try

kexec 更新Linux内核

线上的CentOS7,没有跑什么服务,但是挂了个wireguard,用来解决内网服务器访问外网的需求

更新CentOS 7的时候发现现有内核版本太老了,wireguard出了点错,手工dkms:

所以想更新一下内核。

没有找到靠谱的hot upgrade,所以试了试 kexec,参考 Kernel patching with kexec: updating a CentOS 7 kernel without a full reboot

执行完,ssh就断了,然后过了一会儿就ping通了,好像没比reboot快多少。

VMware Fusion: Cannot connect to a valid peer process

I ran VMware Fusion 10 on macOS, and got this error when starting a VM.
Cannot connect to a valid peer process
找不到可以连接的有效对等进程

I googled, most guys says to trust developer from Preferences.app, but I’ve already trusted.

I checked process list, only:

I tried this on another working mac:

Those processes are started by /Applications/VMware\ Fusion.app/Contents/Library/services/services.sh.

In this file, find

Uncomment those two lines, and re-run, check “/tmp/debug”:

Verbose output

Compare signatures

I Googled again and found https://communities.vmware.com/thread/584909 saying unload some kernel extensions might work.

I remember VMware Fusion turned not working days after I installed VirtualBox and rebooted, so I remove VirtualBox.app and unload all useless extensions:

No error now.

Convert PDF to Image

using GraphicsMagick

Convert full page to %d.png

Convert first page

lldb 断点自动执行命令

调试某软件,需要取到断点时候的内存数据。

之前是每次到断点,一个地址一个地址地 p 或者 memory read,后来看到 breakpoint command 命令,于是有了:

添加断点

添加命令

输入命令

这样,每次运行到断点的时候,就会执行这两条命令。