brew install pyenv
pyenv init
(reload terminal)
pyenv install 3.9.6
pyenv global 3.9.6
pyenv versions
python3 -V
pip3 -V
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
Show hidden characters
[ | |
{ "keys": ["super+t"], "command": "new_file" }, | |
] |
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 | |
# How to use this little dev tool | |
# | |
# You need to add the following snippet to .git/config | |
# [commit] | |
# template = .git/.gitmessage | |
# | |
# And this is how you should run it | |
# ./pair-with.sh will simply empty the .gitmessage file |
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
check_file_exists () { | |
local what=${1:-} | |
if [[ ! -f "$what" ]]; then | |
>&2 echo "Error: Could not find '$what'" # stderr | |
exit 1 | |
fi | |
} | |
check_tool_exists () { | |
local what=${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
PACKAGE_VERSION=$(cat package.json \ | |
| grep version \ | |
| head -1 \ | |
| awk -F: '{ print $2 }' \ | |
| sed 's/[",]//g' \ | |
| tr -d '[[:space:]]') | |
echo $PACKAGE_VERSION |
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 | |
############ | |
# Functions | |
############ | |
function is_api_healthy() { | |
local api_endpoint=${1} | |
local api_name=${2} | |
local status_code=$(/usr/bin/curl -sL --max-time 5 -w "%{http_code}\n" "$api_endpoint" -o /dev/null) |
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 | |
brew update; | |
brew upgrade; | |
brew upgrade --cask; | |
brew cu -fy --cleanup; | |
# brew upgrade --cask --greedy; | |
brew cleanup; | |
brew autoremove; | |
read -p "Finished. Press Enter to continue..." |
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
# ALIASES | |
# git config --global alias.co checkout | |
# git config --global alias.ci commit | |
# git config --global alias.st status | |
# git config --global alias.br branch | |
# git config --global alias.get "pull --rebase --autostash" | |
alias ll='ls -l' | |
# BREW | |
export PATH="/usr/local/bin:$PATH" |
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 | |
#set -e #fail on first error | |
echo -e "🤖 My purpose is to pull (rebase) all your git repositories in this directory.\n" | |
for d in */ ; do | |
echo -e "\n>> Pulling git repo... ${d%?}" | |
cd $d; | |
#git pull -r; | |
git pull -r --autostash; |
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
# list total size of directories, sorted on CLI | |
du -sh * | gsort -r -h | |
# GDrive find files that were deleted but are still using up space https://support.google.com/drive/thread/16475518?hl=en&msgid=16485580 | |
owner:me is:unorganized | |
# upgrade yarn dependency and update package.json | |
yarn upgrade PackageNameHere@^ | |
# when maven doesn't want to prepare release |
NewerOlder