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
GIT_AUTHOR_NAME="Your Name" | |
GIT_AUTHOR_EMAIL="[email protected]" | |
# if there is no username set, set it now | |
if ! git config --list | grep -q "user.name"; then | |
git config --file ~/.gitconfig_private user.name "$GIT_AUTHOR_NAME" | |
fi | |
# if there is no user email set, set it now | |
if ! git config --list | grep -q "user.email"; then |
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
[user] | |
name = John Q. Developer | |
email = [email protected] | |
[alias] | |
l = log --pretty=oneline -n 20 --graph --abbrev-commit | |
go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f" | |
branches = branch -a |
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
class Solution: | |
def brokenCalc(self, x: int, y: int) -> int: | |
if y < x: | |
return x - y | |
# find next power of 2 | |
next_highest_power_of_two = 1 |
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/bash | |
if ! command -v gum &> /dev/null; then | |
echo "gum not found. To install:" | |
echo "sudo mkdir -p /etc/apt/keyrings" | |
echo "curl -fsSL https://repo.charm.sh/apt/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/charm.gpg" | |
echo 'echo "deb [signed-by=/etc/apt/keyrings/charm.gpg] https://repo.charm.sh/apt/ * *" | sudo tee /etc/apt/sources.list.d/charm.list' | |
echo "sudo apt update && sudo apt install gum" | |
exit 1 | |
fi |
OlderNewer