This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias dd='rm -rf /Users/xavier/Library/Developer/Xcode/DerivedData/*' | |
alias ccb='git branch --show-current | pbcopy | echo "current branch copied to $ | |
alias reset='git reset head~1' | |
alias reuse='git commit --reuse-message=orig_head | echo "commited with last me$ | |
alias nanoz='nano ~/.zshrc' | |
alias xlog='git log --format="%C(auto) %h %s" -n10' | |
alias dab='git branch | grep -v "main" | xargs git branch -D' | |
alias diff='git diff --name-only --diff-filter=U --relative' | |
export CLICOLOR=1 | |
export LSCOLORS=bxFxCxDxBxegedabagaced |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tell system when Xcode utilities live: | |
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer | |
# Set "opendiff" as the default mergetool globally: | |
git config --global merge.tool opendiff | |
# Then, when git tells you that there is a conflict, you can run `git mergetool` and | |
# it will open XCode's mergetool (like in the question's screenshot) and you can work through the conflict. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Click on a data model | |
Editor > Add data model | |
Make changes to the new data model | |
Inspector > Model version > current > choose latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Type this in console after breakpoint | |
expr variableToChangeOnTheFly = 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In AppDelegate: | |
# This is to make sure that it only happens on the first launch | |
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | |
// Override point for customization after application launch. | |
let defaults = UserDefaults.standard | |
let isPreloaded = defaults.bool(forKey: "isPreloaded") | |
if !isPreloaded { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Switch on emulator keyboard: Command + k | |
Refresh preview: option + command + p |
- Most of your time will be spent reading, not writing.
- Simulates working at a company or open source project.
- It's the fastest way to learn and improve.
- Learn how to ignore large parts of a codebase and get a piece-by-piece understanding.
- Read the docs (if they exist).
- git add .
- git commit --fixup 3050fc0de // Created a fixup commit for
3050fc0de
- GIT_SEQUENCE_EDITOR=: git rebase -i main --autosquash // Now the fixup commit has been squashed
- git cherry pick firstCommit^..lastCommit # First and last are inclusive
- git fetch upstream # This will fetch all upstream branches & show on terminal
NewerOlder