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 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

How to generate **.cer** and **.p12** file for iOS push notification

Every time I created a new app with push notifications, iOS, I'm sure I've got everything right and then something refused to work. So this time I'm writing it down so I can't possibly get it wrong again.  Generally, we need 2 files for push notification: * .cer file * .p12 file Generate cer… Continue reading How to generate **.cer** and **.p12** file for iOS push notification

How to use Android Battery Historian

1. Install Docker: https://docs.docker.com/docker-for-mac/install/#install-and-run-docker-for-mac 2. Run Docker docker run -p 5001:9999 gcr.io/android-battery-historian/stable:3.0 --port 9999 3. Fetch battery report To obtain a bug report from your development device running Android 7.0 and higher: $ adb bugreport bugreport.zip For devices 6.0 and lower: $ adb bugreport > bugreport.txt Then the bugreport will be exported & downloaded to… Continue reading How to use Android Battery Historian

Adding an existing project to GitHub using the command line

Create a new repository on GitHub. To avoid errors, do not initialize the new repository with README, license, or gitignore files. You can add these files after your project has been pushed to GitHub. Open Terminal. Change the current working directory to your local project. Initialize the local directory as a Git repository. Add the… Continue reading Adding an existing project to GitHub using the command line

RAM Disk on Mac

原文链接:http://www.toutiao.com/a6412375956519403778/?tt_from=weixin&utm_campaign=client_share&app=news_article&utm_source=weixin&iid=9729151087&utm_medium=toutiao_ios&wxshare_count=1 实现方法 方法的思路很简单,大概可以分两步: 1.配置 RAM。在内存中专门开出一块让 Xcode 使用。 2.连接 Xcode。让 Xcode 连接到我们开辟出来的专属内存空间。 下面就是见证奇迹的时刻。 第一步, 创建 .sh 文件。代码如下 #!/bin/bash RAMDISK="ramdisk" SIZE=1024 #size in MB for ramdisk.· diskutil erasevolume HFS+ $RAMDISK `hdiutil attach -nomount ram://$[SIZE*2048]` 第二步, 运行 .sh 文件。在命令行中敲下 之后你会发现你会多出一个叫 ramdisk 的内存空间,有大概 1 GB 大小。 第三步,连接 Xcode。Xcode -> Preferences -> Locations -> Locations Tab,配置 DerivedData。 Advanced... 也要配置成下图所示 以上就是全部步骤。这时候你就可以享受飞一般的开发了。现在… Continue reading RAM Disk on Mac

Posted in Mac

git squash

1. Add a global "squash" alias from bash git config --global alias.squash '!f(){ git reset --soft HEAD~${1} && git commit --edit -m"$(git log --format=%B --reverse HEAD..HEAD@{1})"; };f' 2. ~/.gitconfig should now contain this alias: [alias] squash = "!f(){ git reset --soft HEAD~${1} && git commit --edit -m\"$(git log --format=%B --reverse HEAD..HEAD@{1})\"; };f" 3. Usage git… Continue reading git squash