Razer Synapse showing “PLEASE CONNECT A RAZER SYNAPSE ENABLED DEVICE”

What we’ll need to do is add Razer to the allowed developers for kernel extensions — we’ll basically add the Razer ID (R2H967U8J8) to the list of allowed kernel extension developers. Boot into recovery mode (Restart your mac and hold ⌘+ R during startup. (Command + R) Go to Utility → Terminal Type “/usr/sbin/spctl kext-consent… Continue reading Razer Synapse showing “PLEASE CONNECT A RAZER SYNAPSE ENABLED DEVICE”

How to delete an App from command line

1. List all simulators Find out all simulators xcrun simctl list Find out active simulator xcrun simctl list | grep Booted You will get the result like: $ xcrun simctl list |grep Booted iPhone 11 (AE8852AB-378E-47FB-BD23-4CF77BFBC6DC) (Booted) Now you can erase the simulator by xcrun simctl erase AE8852AB-378E-47FB-BD23-4CF77BFBC6DC 2. Delete the app from active simulator… Continue reading How to delete an App from command line

Combine Asynchronous Programming

1 Combine basics Combine is a declarative, reactive framework for processing asynchronous events over time. It aims to solve existing problems, like unifying tools for asynchronous programming, dealing with mutable state and making error handling a starting team player. Combine revolves around three main types: publishers to emit events over time, operators to asynchronously process… Continue reading Combine Asynchronous Programming

Configure Visual Studio Code for Swift development

1. Build sourcekit-lsp https://github.com/apple/sourcekit-lsp#building-sourcekit-lsp $ git clone https://github.com/apple/sourcekit-lsp.git $ swift package update $ swift build  The sourcekit-lsp will be here: /Users/zhihuitang/repo/common/sourcekit-lsp/.build/x86_64-apple-macosx/debug/sourcekit-lsp 2. Configure sourcekit-lsp In the sourcekit-lsp settings, set the Language Server Mode to sourcekit-lsp  Set Server Path: 

HOW TO RUN VISUAL STUDIO CODE FROM ZSH ON MAC OSX

Adding the codefunction to .zshrc file: function code { if [[ $# = 0 ]] then open -a "Visual Studio Code" else local argPath="$1" [[ $1 = /* ]] && argPath="$1" || argPath="$PWD/${1#./}" open -a "Visual Studio Code" "$argPath" fi } hen from Terminal you can type: code – opens Visual Studio Code code .… Continue reading HOW TO RUN VISUAL STUDIO CODE FROM ZSH ON MAC OSX

Python3 Virtualenv Setup

Install python3 brew install python3 Pip3 is installed with Python3 Upgrade virtualenv To install virtualenv via pip run: pip install --upgrade virtualenv Create virtualenv virtualenv -p python3 python3-venv Activate the virtualenv source python3-venv/bin/activate Deactivate the virtualenv deactivate

Git tips

How do I discard changes in my working copy that are not in the index? git stash save --keep-index --include-untracked You don't need to include --include-untracked if you don't want to be thorough about it. or drop the stash git stash drop or all unstaged files in current working directory use: git checkout -- .… Continue reading Git tips