macOS
Finder
Remove recent files
xattr -c ./*
The App package is broken
sudo xattr -rd com.app.quarantine
Shortcuts
Request API and run JavaScript on macOS(JS is not support on iOS yet)
Get API response, the input’s type need set to ’Text’, you can set to ’Dictionary’ and use If and Get Value to implement it.
function run(input, parameters) { let response = JSON.parse(input[0][0]); // if the input's type is text. let result = ''; if (response.code == 0) { result = 'Successfully!'; } else { result = 'Failed, error: ' + response.message; } return result; }
Software
Sourcetrail
Compile from source:
Dependencies
brew install wget mvn imagemagick boost qt@5 llvm@12
Download source code
cd ~ git clone https://github.com/CoatiSoftware/Sourcetrail.git
Change CMakeLists.txt to find JNI
# TODO if (BUILD_JAVA_LANGUAGE_PACKAGE) set(JAVA_INCLUDE_PATH /opt/homebrew/opt/openjdk/libexec/openjdk.jdk/Contents/Home/include) set(JAVA_INCLUDE_PATH2 /opt/homebrew/opt/openjdk/libexec/openjdk.jdk/Contents/Home/include/darwin) set(JAVA_AWT_INCLUDE_PATH /opt/homebrew/opt/openjdk/libexec/openjdk.jdk/Contents/Home/include) set(JAVA_AWT_LIBRARY /opt/homebrew/opt/openjdk/libexec/openjdk.jdk/Contents/Home/lib) set(JAVA_JVM_LIBRARY /opt/homebrew/opt/openjdk/libexec/openjdk.jdk/Contents/Home/lib) set(JNI_LIBRARIES ${JAVA_AWT_LIBRARY} ${JAVA_JVM_LIBRARY} ) set(JNI_INCLUDE_DIRS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2} ${JAVA_AWT_INCLUDE_PATH} ) # set(JNI_FOUND TRUE)
Compile
mkdir -p build/Release cd build/Release ln -s "$pwd/../../bin/app/data" data cmake -DCMAKE_BUILD_TYPE=Release \ -DLLVM_ENABLE_RTTI=ON \ -DBUILD_CXX_LANGUAGE_PACKAGE=ON \ -DBUILD_JAVA_LANGUAGE_PACKAGE=ON \ -DBUILD_PYTHON_LANGUAGE_PACKAGE=ON \ -DClang_DIR=/opt/homebrew/opt/llvm@12/lib/cmake/clang \ -DQt5_DIR=/opt/homebrew/opt/qt5/lib/cmake/Qt5 \ ../..
Virtual Machine
Compile open-vm-tools in Debian 10.4 Arm on VMWare Fusion Tech1
Install Dependencies
sudo apt install -y autoconf libtool make libmspack-dev libglib2.0-dev libpam0g-dev libssl-dev libxml2-dev libxmlsec1-dev libxinerama-dev libxrandr-dev libxtst-dev libgdk-pixbuf2.0-dev libgtk-3-dev libgtkmm-3.0-dev gcc g++
Download source code and compile
cd ~ git clone https://github.com/vmware/open-vm-tools.git cd open-vm-tools autoconf -i ./configure make sudo make install sudo ldconfig
Main starter: touch
/etc/rc.local
andsudo chmod a+x /etc/rc.local
#!/bin/bash /usr/local/bin/vmtoolsd -b /var/run/open-vm-tools.pid
User starter:
/etc/xdg/autostart/user-vmtoolsd.desktop
[Desktop Entry] Type=Application Name=vmtoolsd user launcher Exec=/usr/local/bin/vmtoolsd -n vmusr --blockFd 3 Icon=system-run X-GNOME-Autostart-enabled=true
Compile Sourcetrail in Debian 10.4 Arm on VMWare Fusion Tech2
Dependencies
sudo apt install qtbase5-dev libx11-xcb-dev libudev-dev libinput-dev libts-dev libxcb-xinerama0-dev libxcb-xinerama0 gdbserver libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev libx11-xcb-dev libxcb*-dev sudo apt install libboost-dev libboost-system-dev libboost-program-options-del libboost-program-options-dev libboost-filesystem-dev libboost-date-time-dev sudo apt install qtbase5-dev libqt5svg5-dev # TODO: install llvm 11 # deb [arch=arm64] http://apt.llvm.org/buster/ llvm-toolchain-buster-10 main # deb-src [arch=arm64] http://apt.llvm.org/buster/ llvm-toolchain-buster-10 main
Download source and compile
cd ~ git clone https://github.com/CoatiSoftware/Sourcetrail.git cd Sourcetrail
Change CMakeLists.txt to use Qt 5.11:
sed -i 's/5.12.0/5.11.0/' CMakeLists.txt sed -i 's/0x051200/0x05110/' CMakeLists.txt
Compile:
mkdir -p build/Release cd build/Release ln -s "$pwd/../../bin/app/data" data cmake -DCMAKE_BUILD_TYPE=Release \ -DLLVM_ENABLE_RTTI=ON \ -DBUILD_CXX_LANGUAGE_PACKAGE=ON \ -DBUILD_JAVA_LANGUAGE_PACKAGE=ON \ -DBUILD_PYTHON_LANGUAGE_PACKAGE=ON \ -DClang_DIR=/usr/lib/llvm-11/lib/cmake/clang \ -DQt5_DIR=/usr/lib/aarch64-linux-gnu/cmake/Qt5 \ ../.. make ARCH=arm -j8 Sourcetrail