Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
; Secret files are for tokens or other "Secret stuff"
*.secret
*.secret
.DS_Store
2 changes: 1 addition & 1 deletion bin/create_certkey
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ if [ $# -lt 1 ] || [[ $* == *"--help"* ]]; then
exit 0
fi

openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 9000 -subj "/C=NL/ST=Noord-Holland/L=Amsterdam/O=jor.dev/OU=IT/CN=$1"
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 9000 -subj "/C=NL/ST=Noord-Holland/L=Amsterdam/O=jor.dev/OU=IT/CN=$1" -addext "subjectAltName = DNS:localhost"
26 changes: 26 additions & 0 deletions profile/nvm
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,29 @@ export NVM_DIR="$HOME/.nvm"
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm
# shellcheck source=/dev/null
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion


# Auto load correct Node version
autoload -U add-zsh-hook
load-nvmrc() {
# shellcheck disable=SC2155
local node_version="$(nvm version)"
# shellcheck disable=SC2155
local nvmrc_path="$(nvm_find_nvmrc)"

if [ -n "$nvmrc_path" ]; then
# shellcheck disable=SC2155
local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")

if [ "$nvmrc_node_version" = "N/A" ]; then
nvm install
elif [ "$nvmrc_node_version" != "$node_version" ]; then
nvm use
fi
elif [ "$node_version" != "$(nvm version default)" ]; then
echo "Reverting to nvm default version"
nvm use default
fi
}
add-zsh-hook chpwd load-nvmrc
load-nvmrc