Skip to content

Instantly share code, notes, and snippets.

View leiless's full-sized avatar
🎯
Focusing

Fishbone° leiless

🎯
Focusing
  • Shanghai, China
  • 04:50 (UTC +08:00)
View GitHub Profile
#!/bin/sh
#
# Created 18H12
#
if [ $# -ne 1 ]; then
echo "`basename $0` installer_app"
exit 1
fi
@leiless
leiless / vmware_fusion_retrial.sh
Last active June 12, 2024 01:38
Retrial VMWare Fusion another 30 days
#!/bin/sh
#
# Retrial VMWare Fusion another 30 days
#
set -eu
sudo rm -rf /Library/Preferences/VMware\ Fusion/license-fusion-*
echo "Done! please restart VMware Fusion.app."
@leiless
leiless / kextdeps.sh
Last active August 17, 2018 02:08
Generate the XML-format dependencies of kernel extension which used in Info.plist of the kext
#!/bin/sh
#
# Created 18H17
#
# Generate the XML-format dependencies of kernel extension
# which used in Info.plist of the kext
#
if [ $# -lt 1 ]; then
echo "kextdeps.sh kext ..."
#!/bin/sh
#
# Created 18H17
#
if [ $# -ne 1 ]; then
echo "`basename $0` installer_app"
exit 1
fi
@leiless
leiless / resolve_kpi.sh
Last active January 28, 2019 07:34
Resolve XNU kernel programming interfaces(KPIs)
#!/bin/sh
#
# Created 18H21
#
if [ $# -ne 1 ]; then
cat << EOL
Usage: $(basename $0) symbol ...
EOL
/**
* Created 18H18 lynnl
*/
#include <mach/mach_types.h>
#include <sys/systm.h>
#include <libkern/OSAtomic.h>
#define INAME "kext-memleak"
#define LOG(fmt, ...) printf(INAME ": " fmt "\n", ##__VA_ARGS__)
#!/bin/sh
#
# Created 18H28
#
if [ $# -ne 1 ]; then
echo "`basename $0` installer_app"
exit 1
fi
@leiless
leiless / barebone_kext_build.log
Last active September 6, 2018 06:02
Barebone kext build transcripts (DEBUG/RELEASE)
Showing All Messages
Build target kext-null of project kext-null with configuration Release
ProcessInfoPlistFile DerivedData/kext-null/Build/Products/Release/kext-null.kext/Contents/Info.plist kext-null/Info.plist
cd /Users/lynnl/Zen/kext-null
builtin-infoPlistUtility /Users/lynnl/Zen/kext-null/kext-null/Info.plist -expandbuildsettings -platform macosx -o /Users/lynnl/Zen/kext-null/DerivedData/kext-null/Build/Products/Release/kext-null.kext/Contents/Info.plist
CompileC DerivedData/kext-null/Build/Intermediates.noindex/kext-null.build/Release/kext-null.build/Objects-normal/x86_64/kext_null.o kext-null/kext_null.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler
@leiless
leiless / clang_macros.txt
Last active September 7, 2018 05:53
clang predefined macros
$(xcrun -find clang) -v
Apple LLVM version 9.1.0 (clang-902.0.39.2)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
$(xcrun -find clang) -x c /dev/null -dM -E
#define OBJC_NEW_PROPERTIES 1
@leiless
leiless / mac_quicklook_plugin_build.log
Created September 8, 2018 01:52
Barebone Quick Look plugin build
Showing All Messages
Build target EmptyQuickLook of project EmptyQuickLook with configuration Debug
Write auxiliary files
write-file /Users/lynnl/Mars/EmptyQuickLook/DerivedData/EmptyQuickLook/Build/Intermediates.noindex/EmptyQuickLook.build/Debug/EmptyQuickLook.build/EmptyQuickLook-all-non-framework-target-headers.hmap
write-file /Users/lynnl/Mars/EmptyQuickLook/DerivedData/EmptyQuickLook/Build/Intermediates.noindex/EmptyQuickLook.build/Debug/EmptyQuickLook.build/EmptyQuickLook-project-headers.hmap
write-file /Users/lynnl/Mars/EmptyQuickLook/DerivedData/EmptyQuickLook/Build/Intermediates.noindex/EmptyQuickLook.build/Debug/EmptyQuickLook.build/EmptyQuickLook-all-target-headers.hmap