Last active
March 14, 2022 08:01
-
-
Save petrsvihlik/b13b995e7d8495c87cfa2c3f44a6eb32 to your computer and use it in GitHub Desktop.
Rocky's Personal Cheat-sheet
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
# Revert commit | |
git reset --hard <old-commit-id> | |
git push -f <remote-name> <branch-name> | |
# Refresh remote branches list | |
git remote update origin --prune | |
# Edit last commit message | |
git commit --amend | |
git push --force | |
# Undo the last commit | |
git reset --soft HEAD~1 | |
# Undo staged files | |
git reset | |
# Pull a specific branch from a remote repo | |
git remote add 'remote_name' 'remote_url' | |
git pull 'remote_name' 'branch_name' |
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
# WSL2 - https://docs.microsoft.com/en-us/windows/wsl/install-win10 | |
# update system | |
sudo zypper ref | |
sudo zypper update | |
# install .NET https://docs.microsoft.com/en-us/dotnet/core/install/linux-opensuse#opensuse-15- | |
sudo zypper install libicu | |
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc | |
wget https://packages.microsoft.com/config/opensuse/15/prod.repo | |
sudo mv prod.repo /etc/zypp/repos.d/microsoft-prod.repo | |
sudo chown root:root /etc/zypp/repos.d/microsoft-prod.repo | |
sudo zypper install dotnet-sdk-5.0 |
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
# update system | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get dist-upgrade | |
sudo do-release-upgrade | |
# become root | |
sudo su - | |
# check current account | |
whoami | |
# change root pwd | |
sudo passwd root |
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
# Update Node (https://nodejs.org/en/) | |
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force | |
npm install -g npm-windows-upgrade | |
npm-windows-upgrade | |
# Update NPM packages | |
# Minor versions only | |
npm update | |
# Including major versions | |
npx npm-check-updates -u |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment