Sometimes when debugging on Xcode with LLDB’s p or po on a a codebase that have both Objective-C and Swift, Xcode will throw a syntax error at you and you might be wondering out why? You checked for any typos but everything seems to be correct. So what gives?
Well, that’s because you might be using it in the wrong context.
Here’s a quick rundown:
When you stop in Objective-C code using breakpoint, LLDB will use Objective-C debugging context.
dep is a dependency management tool for golang. If you have work on other programming languages, dep is similar to npm, pod or pip. In simple words, it is a package manager to manage your project’s third party libraries.
How to install it There’s a few ways to install dep. Personally, I prefer to install it with Homebrew To install it run:
$~ brew install dep Initializing a project with dep To initialize it in your go project, go to your project directory and run the following
Here’s a quick reference on how you can change your git branch name:
If you want to rename of your current local branch:
git branch -m new-branch-name If you want to change the name of a different local branch
git branch -m old-branch new-branch-name That’s it. Bye.
Oftentimes, I forget that I have to specify the current branch name when pushing it to a remote.
For example:
$~ git push or like this
$~ git push -u origin Either way, these commands will fail since I didn’t specify the upstream branch. git will return an error similar like this:
fatal: The current branch develop has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin <INSERT BRANCH NAME HERE> To avoid this error, I have to set the upstream branch name explicitly first before pushing it to the remote repository.
I prefer zsh over bash as my everyday shell. Unfortunately, zsh is not the default shell on macOS.
Here’s a quick guide on how to make it as a default shell for your machine:
1. Install zsh Make sure zsh is available on your system. If not, install it with brew.
$~ brew install zsh $~ which zsh /usr/local/bin/zsh #output 2. Set zsh as default shell To set is as default shell, run the following in your terminal: