Nyere, mer oppdatert versjon lagret i din egen config
sudo apt install neovim
# ask in what path the component resides in | |
# if no answer is provided, use default value | |
# -e flag is for giving `cd`-code completion while answering the question | |
defaultValue=src/stories/default/ | |
read -e -p "Where is component located? (default: $defaultValue): " location | |
location=${location:-$defaultValue} | |
read -p "Enter component name you want to rename: " currentName | |
componentPath=$location/$currentName |
Nyere, mer oppdatert versjon lagret i din egen config
sudo apt install neovim
For filer i mappe hvis navn er "pages":
npx jscodeshift -t https://mskelton.dev/ratchet.ts pages/**/*.{ts,tsx}
https://github.com/mskelton/ratchet
funker ikke på destructured props, da
for f in *.js; do mv -- "$f" "${f%.js}.tsx"; done
https://unix.stackexchange.com/questions/19654/how-do-i-change-the-extension-of-multiple-files
nano ~/.nanorc
sett inn
https://gist.github.com/keithamus/736220/5e069767b22841610ee18fd2f92bd6026f5eb41d
syntax "gitcommit" "COMMIT_EDITMSG$"
Search aliases: https://ohmycheatsheet.com/oh-my-zsh-commands-cheat-sheet/
Aliases as pinnable list items: https://paalss.github.io/oh-my-aliases/
alias | command |
---|---|
-- - | cd - |
.. | cd ../ |
Vise kort commit hash
git rev-parse --short HEAD