虚拟机相关
Vmware中Linux或macOS客户端如何回收硬盘空间https://www.cnblogs.com/teacat/p/10444177.htmlVmware对于Windows的客户端,使用GUI操作硬盘回收和整理磁盘即可。对于Linux或macOS客户端,需要在安装Vmware Tools之后,在客户端OS的终端Terminal里输入命令进行操作:
Linux客户端:12sudo /usr/bin/vmware-toolbox-cmd disk listsudo /usr/bin/vmware-toolbox-cmd disk shrink /
macOS / OS X客户端:1sudo /Library/Application\ Support/VMware\ Tools/vmware-tools-cli disk shrink /
需要注意的是,macOS客户端如果使用了APFS格式,上述命令无效,需要使用如下的方法回收磁盘空间:
123diskutil secureErase freespace 0 Machintosh\ HD/Applications/VMw ...
Timer相关
qt timerwin SetTimer/SetCoalescableTimermac CFRunLoopAddTimerunix qt_safe_poll -> qt_ppoll -> ppoll/poll/select
win32 threadpoolQueueUserWorkItemhttps://learn.microsoft.com/zh-cn/windows/win32/procthread/thread-pool-api
timer heaplibuv/libhv timer -> heapLinux 定时器(四) 时间堆https://www.jianshu.com/p/e880f398530d定时器中到期时间最小值作为心搏间隔Linux 定时器(三) 时间轮https://www.jianshu.com/p/df55c5a1f8c3时间轮 -> hash时间堆 -> heap《Linux高性能服务器编程》——第十一章:定时器https://zhuanlan.zhihu.com/p/444354709 ...
Windows记录
HyperV1234dism.exe /Online /Disable-Feature /FeatureName:Microsoft-Hyper-V-All# https://www.jianshu.com/p/5f3cb933f9b6Disable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatformEnable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform
MessagePeekMessage和GetMessage函数的主要区别https://blog.csdn.net/gencheng/article/details/9376881
InvalidateRect(HWND) 与 ValidateRect(HWND)的区别http://t.zoukankan.com/renyuan-p-2746020.htmlInvalidateRect标脏(dirty) ValidateRect表示已经处理好可以显示
https ...
Docker记录
Docker从入门到实践
Docker sock1234curl -s --unix-socket /var/run/docker.sock http://image/jsoncurl -s --unix-socket /var/run/docker.sock v1.41/infocurl -s --unix-socket /var/run/docker.sock /info -vv [Error]curl -s --unix-socket /var/run/docker.sock docker/info -vv
Trying /var/run/docker.sock:0…
Connected to docker (/Users/wurui/.docker/run/docker.sock) port 80 (#0)
GET /info HTTP/1.1Host: dockerUser-Agent: curl/7.79.1Accept: /
Mark bundle ...
深入解析MacOS和iOS 卷三 笔记
MacOS and iOS Internals, Volume III : Security & Insecurity.md
Part I: Defensive Techniques and Technologie1. AuthenticationIt’s important to emphasize - at the lowest level of the kernel - UNIX only seesuser ids and group, not names. The name “root” is meaningless - it is the uid of 0 whichis all powerful.
Password Files (*OS)/etc/master.passwd
SetUID and SetGID (MacOS)Darwin has steadily been reducing its setuid/setgid club membership. With the move toopendirectory, passwd(1 ...
深入解析MacOS和iOS 卷二 笔记
MacOS and iOS Internals, Volume II : Kernel Modechapter 1Welcome to the Machine: Hardware
DevicesMac Models Numbers and code names
12sysctl hw.modelioreg -l -f | grep IOPlatformExpertDevice
Processors“Rosetta”Processor Code Names“A”-series chips“n+n” “p-cores” “e-cores”
PortsSerial portsFirewire -> IEEE1394 fwkdp(1)ThunderBolt -> Intel’s ThunderBolt standard-> MiniDisplay Port and PCIeUSB usbkdp(1)
12ioreg -p IOUSBsystem_profiler SPUSBDataType
USB Restricted Mode
iDevice Connectors30-pi ...
深入解析MacOS和iOS 卷一 笔记
MacOS and iOS Internals, Volume I : User Mode.md
MacOS and iOS Internals, Volume I : User ModeDarwinVer = 10.(MacOSVer + 4) = (iOSVer + 6) = (TvOSVer + 6) = (WatchOSVer + 13)/System/Library/CoreServices/SystemVersion.plist
man whatwhat /bin/lswhat which whatstrings /bin/ls | grep #
app nap / timer coalescing应用睡眠 / 计时器合并compressed memorythread-level qos10.11’s SIPAppleScript –> JXA(JavaScript for Automation)AMFI –> SIP
10 ...
OSX与iOS内核编程 笔记
OS.X and iOS Kernel Programming.mdhttps://github.com/Apress/os-x-ios-kernel-programminghttps://github.com/knightsc/osx_and_ios_kernel_programming
Memory Allocation in Machkmem_alloc/kmem_alloc_contig/kmem_free
The I/O Kit framework consists of the kernel level framework, as well as a user space framework called IOKit.framework.The kernel framework is written in Embedded C++, a subset of C++, whereas the user space framework is C-based.
In the case of a USB-based storage device, it ...
macOS命令行
main_service
gcoreget core images of running processesgcore: task_read_for_pid: (null)
man ipcsiperf3-darwin – perform network throughput tests
ippfind - find internet printing protocol printers
look – display lines beginning with a given string
lsbom – list contents of a bom filebom – bill of materials
lskq – display process kqueue statelsmp – Display mach port information for processes on the system
lsm - Latent Semantic Mapping toolLatentSemanticMapping.framework
mg – emacs-like text editor
m ...
chibicc笔记
chibicc
Chrome或Edge翻译 Safari有点不准https://www.sigbus.info/compilerbookmacOS下修改1.mainmain –> _main
2.gcc -static -o tmp tmp.s–> gcc -arch x86_64 -o tmp tmp.s
3.movzb–> movzx或者注释掉这个步骤
4.strndup
123char *strndup(char *p, int len);--> char *strndup_new(char *p, int len);
5.macOS下划线修饰
123456789case ND_FUNCALL: printf(" call %s\n", node->funcname); printf(" push rax\n"); return;// -->case ND_FUNCALL:printf(" call _%s\n", node->funcname);printf(" ...