Author Archives: Tang

About Tang

A mobile developer, work in Stockholm, Sweden

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 … Continue reading

Posted in Mac | Tagged , | Leave a comment

MongoDB on Mac

1.What’s MongoDB? MongoDB is a document database which belongs to a family of databases called NoSQL – not only SQL. In MongoDB, records are documents which behave a lot like JSON objects in JavaScript. Values in documents can be looked … Continue reading

Posted in Mobile | Tagged | Leave a comment

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

Posted in Mobile | Tagged | Leave a comment

LLDB you should know

LLDB is a next generation, high-performance debugger. It is built as a set of reusable components which highly leverage existing libraries in the larger LLVM Project, such as the Clang expression parser and LLVM disassembler. LLDB is the default debugger … Continue reading

Posted in iOS | Tagged , , | Leave a comment

Xcode instruments

 The two columns worth noting in Instruments are # Persistent and # Transient. The Persistent column keeps a count of the number of objects of each type that currently exist in memory. The Transient column shows the number of … Continue reading

Posted in iOS, Mobile | Tagged | Leave a comment

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 … Continue reading

Posted in git | Tagged | Leave a comment

Views vs. layers

A layer is a simple model class that exposes a number of properties to represents some image-based content. Every UIView is backed by a layer, so you can think of layers as the lower-level behind the scenes class behind your … Continue reading

Posted in iOS, Mobile | Tagged | Leave a comment