list all node versions
Thu 25. June 2026 | 2026-06-25nvm ls-remote
nvm ls-remote
nvim --helpnvim --cleannvim --startuptime time.txt --clean "Factory defaults" (skip user config and plugins, shada)
--startuptime <file> Write startup timing messages to <file>
Ting som folk har rapportert at kan være årsaken
read -p "Push anyway?" pushanyway if [[ $pushanyway == "y" ]]; then exit 0 else exit 1 fi
!!! FØR COMMIT !!!
TODO: lim inn innhold fra bashrc som er relevant (update_prepush og gitFlowFeatureStart)
det må også funke da. test i gittesting.
.------
relevant bashrc innhld her...
export ZSH="$HOME/.oh-my-zsh"
alias c=clear alias compare-home="yadm diff home2 | delta"
alias ripgrep="rg"
alias p0="~/rvf.sh " alias p="nn $(fzf)" alias pp="nn $(fzf)"
alias yl="yadm pull" alias yp="yadm push" alias ya="yadm add" alias yc="yadm commit --verbose" alias yc!="yadm commit --verbose --amend" alias ycn!="yadm commit --verbose --no-edit --amend" alias ycan!="yadm commit --verbose --all --no-edit --amend" alias yst="yadm status" alias yss="yadm status --short" alias yb="yadm branch" alias yd="yadm diff" alias yco="yadm checkout" alias ylg="yadm log --stat" alias ylo="yadm log --oneline --decorate" alias ystl="yadm stash list " alias ystaa="yadm stash apply" alias ysta="yadm stash push" alias ystp="yadm stash pop"
alias ye="yadm enter lazygit" alias yes="yadm enter lazygit status" alias yesh="yadm enter azygit stash" alias yel="yadm enter lazygit log" alias yeb="yadm enter lazygit branch"
alias yu="yadm add -u"
alias grs="git restore --staged"
alias bas="nvim ~/.zshrc" alias zs="nvim ~/.zshrc" alias basr=". ~/.zshrc" # source zshrc
alias n="nvim ." alias nn="nvim"
alias v="vim ." alias vv="vim"
alias nnvim="cd ~/.config/nvim/ && rename_tmux_window Neovim"
alias idea="nvim ~/.ideavimrc" alias vimrc="nvim ~/.vimrc" alias rem="nvim ~/.config/nvim/lua/setup/remap.lua" alias set="nvim ~/.config/nvim/lua/setup/set.lua" alias aft="nvim ~/.config/nvim/after/plugin/" alias use="nvim ~/code/useful-snippets/posts/" alias surr="nvim ~/.config/nvim/after/plugin/vim-surround.lua" alias diff="nvim ~/.config/nvim/after/plugin/diffview.lua" alias fzfvim="nvim ~/.config/nvim/after/plugin/fzfvim.lua" alias lsp="nvim ~/.config/nvim/after/plugin/"
alias gi="nvim ~/.gitconfig" alias bran="echo $(git branch --show-current) | pbcopy"
function rename_tmux_window { if [ -z "$TMUX" ]; then echo "Not in tmux, nothing to rename" else tmux rename-window "$1" fi }
alias cdc="cd ~/code" alias cdtest="cd ~/code/test/ && rename_tmux_window test" alias hybel="cd ~/code/hybel && rename_tmux_window HYBEL" alias tenant="cd ~/code/tenant-frontend-app && rename_tmux_window TENANT" alias tresults="cd ~/code/test/hybel-test-results-develop && rename_tmux_window test-results" alias dresults="cd ~/code/dbdump-hybeldb2/ && rename_tmux_window db-results" alias useful="cd ~/code/useful-snippets && rename_tmux_window useful-snippets" alias u="cd ~/code/useful-snippets && rename_tmux_window useful-snippets && nvim"
alias shybel="hybel && bash ~/start-hybel.sh" alias stenant="tenant && bash ~/start-tenant.sh" alias suseful="cd ~/code/useful-snippets && bash ~/start-useful.sh" alias home="cd ~ && bash ~/start-home.sh && rename_tmux_window home" alias snvim="nnvim" alias stestcompare="cd ~/code/test/hybel-test-results-develop && bash ~/start-test-compare.sh"
alias predisttest="tenant && bash ~/prepare-dist-test.sh" alias presrctest="tenant && bash ~/prepare-src-test.sh"
alias q="exit" alias e="open ."
alias f1="explorer.exe http://localhost:5173/" alias f2="explorer.exe http://localhost:8000/" alias f3="explorer.exe http://localhost:5173/graphql/" alias f4="explorer.exe http://localhost:6006/" alias f5="explorer.exe http://localhost:3000/tenant/"
alias dev="npm run dev" alias compile="npm run compile" alias tsc="npm run compile" alias build="npm run build" alias storybook="npm run storybook" alias preview="npm run preview" alias caddyrun="sudo caddy run --config Caddyfile" alias i18nextract="npm run i18n:extract" alias premerge=" ./_pre-merge-request.sh docker" alias crr="coderabbit --plain --base origin/develop"
alias t="tmux" alias ntmux="nvim ~/.tmux.conf" alias tmu="nvim ~/.tmux.conf" alias tt="bash ~/dev-tmux.sh"
alias lg="lazygit" alias lgs="lazygit status" alias lgsh="lazygit stash" alias lgl="lazygit log" alias lgb="lazygit branch"
function update_prepush { sed -i'' -e "s&allowed_branch_name=".*"&allowed_branch_name="$1"&g" $(gitHookFull pre-push) }
#1: name of git hook (e.g. pre-push, post-commit) function gitHookFull { if [[ -f ".git/hooks/$1" ]]; then echo ".git/hooks/$1" else if [[ -f ".git/hooks/$1.sample" ]]; then echo ".git/hooks/$1.sample" else echo "undefined" fi fi }
#1: name of git hook (e.g. pre-push, post-commit) function gitHook { if [[ -f ".git/hooks/$1" ]]; then echo "$1" else if [[ -f ".git/hooks/$1.sample" ]]; then echo $1.sample else echo "undefined" fi fi }
function isGitHookActivated { if [[ -f ".git/hooks/$1" ]]; then echo true else if [[ -f ".git/hooks/$1.sample" ]]; then echo false else echo "undefined" fi fi }
function gitFlowFeatureStart { git flow feature start "$1" update_prepush "feature/$1" }
alias gffs="gitFlowFeatureStart" alias gfrs="git flow release start" alias gfhs="git flow hotfix start" alias gfbs="git flow bugfix start" # bugfix dont exist alias gfrf="git flow release finish" alias gfhf="git flow hotfix finish"
alias dcu="docker compose --profile=django up django" alias dcudjango="docker compose --profile=django up django" alias dcr="docker compose --profile=manage run manage migrate" alias dcs="docker compose --profile=manage run manage shell" alias dcd="docker compose down" alias dcdr="docker compose down --remove-orphans"
alias ahk="skhd --start-service" alias skh="skhd --start-service" alias starts="skhd --start-service" alias stops="skhd --stop-service"
alias vers="skhd --verbose"
alias nahk="nvim ~/.skhdrc" alias nskh="nvim ~/.skhdrc"
alias activateprepush="mv .git/hooks/pre-push.sample .git/hooks/pre-push" alias deactivateprepush="mv .git/hooks/pre-push .git/hooks/pre-push.sample"
po() { if [[ -f ".git/hooks/pre-push" ]]; then echo ".git/hooks/pre-push was found:" nvim .git/hooks/pre-push else if [[ -f ".git/hooks/pre-push.sample" ]]; then echo ".git/hooks/pre-push was not found:" echo "but .git/hooks/pre-push.sample was found:" nvim .git/hooks/pre-push.sample else echo "Hmmmmm" fi fi }
lpo() { if [[ -f ".git/hooks/pre-push" ]]; then echo ".git/hooks/pre-push was found:" echo "pre-push is activated" else if [[ -f ".git/hooks/pre-push.sample" ]]; then echo ".git/hooks/pre-push was not found:" echo "but .git/hooks/pre-push.sample was found:" echo "pre-push is deactivated" else echo "Hmmmmm" fi fi }
alias activateHello="source ~/code/hello-world/.venv/bin/activate" alias py="python"
filehistorysearch() { git grep $1 $(git rev-list --all -- $2) -- $2 }
export NVM_DIR="$HOME/.nvm" [ -s "$HOMEBREW_PREFIX/opt/nvm/nvm.sh" ] && . "$HOMEBREW_PREFIX/opt/nvm/nvm.sh" # This loads nvm [ -s "$HOMEBREW_PREFIX/opt/nvm/etc/bash_completion.d/nvm" ] && . "$HOMEBREW_PREFIX/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
webstorm . in terminalwebstorm() {
open -na "WebStorm.app" --args "$@" }
pycharm() {
open -na "PyCharm.app" --args "$@" }
manage() { if [[ $1 == "runtests" ]]; then docker compose --profile=manage run manage test hybel --parallel else docker compose --profile=manage run manage "$@" fi }
export DEFAULT_USER=$USER
ZSH_THEME="agnoster"
plugins=(git)
source $ZSH/oh-my-zsh.sh
alias.source ~/.safe-chain/scripts/init-posix.sh # Safe-chain Zsh initialization script
. "$HOME/.local/bin/env"
# Cross-platform pattern: works on both GNU and BSD/macOS
sed -i'' -e 's/old/new/g' file.txt # GNU
sed -i '' -e 's/old/new/g' file.txt # BSD/macOS (note the space)
:'<,'>,!sort -h
javascript
const obj = {
bla: "bla"
}
python dictionary
lua table
At least one digit
/(?=.*\d)
Create dump file (package.json, requirements.txt)
brew bundle dump --force --describe
notes:
git push $remote --delete $old_namegit push origin HEADThis will close any existing PR if exists
# Source - https://stackoverflow.com/a/30590238
# Posted by CodeWizard, modified by community. See post 'Timeline' for change history
# Retrieved 2026-04-22, License - CC BY-SA 4.0
# Names of things - allows you to copy/paste commands
old_name=feature/old
new_name=feature/new
remote=origin
# Rename the local branch to the new name
git branch -m $old_name $new_name
# Delete the old branch on remote
git push $remote --delete $old_name
# Or shorter way to delete remote branch [:]
git push $remote :$old_name
# Prevent git from using the old name when pushing in the next step.
# Otherwise, git will use the old upstream name instead of $new_name.
git branch --unset-upstream $new_name
# Push the new branch to remote
git push $remote $new_name
# Reset the upstream branch for the new_name local branch
git push $remote -u $new_name
At a glance: Branch renaming commands
Task Command
Rename current branch git branch -m new-name
Rename specific branch git branch -m old-name new-name
Delete remote branch git push origin --delete branch-name
Push renamed branch git push origin new-name
Set upstream tracking git push --set-upstream origin new-name
https://www.codecademy.com/article/rename-git-branch
git branch -m new-branch-name
https://www.freecodecamp.org/news/git-rename-branch-how-to-change-a-local-branch-name/
Install Helix
Migrating from Vim
Basics
hx --tutor helix --tutor :tutor@media only screen and (min-width: 500px) {
}
// X-Small devices (portrait phones, less than 576px)
// No media query for `xs` since this is the default in Bootstrap
// Small devices (landscape phones, 576px and up)
@media (min-width: 576px) { ... }
// Medium devices (tablets, 768px and up)
@media (min-width: 768px) { ... }
// Large devices (desktops, 992px and up)
@media (min-width: 992px) { ... }
// X-Large devices (large desktops, 1200px and up)
@media (min-width: 1200px) { ... }
// XX-Large devices (larger desktops, 1400px and up)
@media (min-width: 1400px) { ... }
https://getbootstrap.com/docs/5.3/layout/breakpoints/#min-width