This file contains hidden or 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
| abstract class BuildMode { | |
| static final BuildModeType buildMode = () { | |
| if (const bool.fromEnvironment('dart.vm.product')) { | |
| return BuildModeType.release; | |
| } | |
| var result = BuildModeType.profile; | |
| assert(() { | |
| result = BuildModeType.debug; | |
| return true; | |
| }()); |
This file contains hidden or 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
| import 'package:flutter/material.dart'; | |
| import 'package:provider/provider.dart'; | |
| class Counter extends ChangeNotifier { | |
| Counter(int initialValue) : _value = initialValue; | |
| int _value; | |
| set value(int newValue) { | |
| _value = newValue; | |
| notifyListeners(); |
This file contains hidden or 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
| setopt prompt_subst | |
| () { | |
| local PR_USER PR_USER_OP PR_PROMPT PR_HOST | |
| # Check the UID | |
| if [[ $UID -ne 0 ]]; then # normal user | |
| PR_USER='%F{green}%n%f' | |
| PR_USER_OP='%F{green}%#%f' |
This file contains hidden or 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
| #!/bin/sh | |
| # git config --global user.name "Firstname Lastname" | |
| # git config --global user.email "[email protected]" | |
| git config --global user.useconfigonly true | |
| git config --global pull.ff only | |
| git config --global push.default simple | |
| git config --global rerere.enabled true | |
| git config --global rerere.autoupdate true | |
| git config --global diff.algorithm histogram | |
| git config --global merge.conflictstyle zdiff3 |
This file contains hidden or 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
| #!/bin/sh | |
| echo "ℹ️ Running pre-commit hook" | |
| # go to git root | |
| pushd `git rev-parse --show-toplevel` > /dev/null | |
| STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".go$") | |
| if [[ "$STAGED_FILES" = "" ]]; then |
OlderNewer