About Frequently Used Prompt Software Development Security Miscellaneous Frequently Used Commands Git Windows Remove XBox Windows shortcuts Editing Visual Studio Code shortcuts Basic Navigation Debug Others AboutThis page contains useful information to myself. It also serve as a testing page for this blog.
Frequently Used PromptConvert a string from blog title to Linux frendly filename.
1 convert string by replacing colon with dash, nonnalpha numeric with underscore. reduce repetiting underscore or dash to single underscore or dash:
Software Development Security Miscellaneous Frequently Used CommandsShutdown Windows immediately shutdown -r -t 0
, useful when you remote to a Windows PC Switch java version 1 export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
GitUndo (Not pushed)git reset --soft HEAD~
Deleting a remote branchgit push [remote] --delete [branch]
e.g., git push origin --delete feature/branch
Sync remote branch and delete remote non-existing local copygit fetch --prune
List the commit different between branchesgit rev-list [branch]...[another branch]
List the commit different between branches with arrow indicates which branch owns the commitgit rev-list --left-right [branch]...[another branch]
List the commit of a branch is ahead/behind to a remote branchgit rev-list [branch]...[remote]/[another branch]
Show the number of ahead of behind between branchesgit rev-list --left-right count [branch]...[another branch]
Update submodules with latest commitgit submodule update --remote
Clean up orphan commitsgit gc --prune=now --aggressive
Windows Remove XBoxRemove XBox with Powershell Get-ProvisionedAppxPackage -Online | Where-Object { $_.PackageName -match "xbox" } | ForEach-Object { Remove-ProvisionedAppxPackage -Online -AllUsers -PackageName $_.PackageName }
Check if any Xbox application is left dism /Online /Get-ProvisionedAppxPackages | Select-String PackageName | Select-String xbox
Windows shortcutsOnly those that are frequently used and easily forgotten are listed.
Move Window to another monitor ⊞ Windows + ⇧ Shift + ← / → Switch to another desktop ⊞ Windows + ⌃ Control + ← / → Task View ⊞ Windows + Tab Open Action Center ⊞ Windows + A Display/Hide Desktop ⊞ Windows + D Open File Explorer ⊞ Windows + E Quick Link Menu (System tools such as Event Viewer) ⊞ Windows + X Lock ⊞ Windows + L
EditingSwitch Voice Typing ⊞ Windows + H Open Clipboard History ⊞ Windows + ⌃ Control + V Paste as plain text ⊞ Windows + V Capture screen and then OCR to clipboard ⊞ Windows + T Emoji ⊞ Windows + .
Visual Studio Code shortcutsOnly those that are frequently used and easily forgotten are listed. Refernce from https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf
BasicUser Settings ⌃ Control + , Select all occurences of Find match Alt + Enter Quick Fix ⌃ Control< + . Ctrl+K Ctrl+X ⌃ Control< + K ⌃ Control< + X
NavigationGo to Line… ⌃ Control + G Go to File… ⌃ Control + P Go to next error or warning F8 Focus into 1st, 2nd or 3rd… editor group ⌃ Control + 1 /2 /3 …Spit editor ⌃ Control + </kbd> Show integrated termina ⌃ Control + ` Create new terminal ⌃ Control + ⇧ Shift + ` Show Explorer / Toggle focus ⌃ Control + ⇧ Shift + E Show Search ⌃ Control + ⇧ Shift + S Show Source Control ⌃ Control + ⇧ Shift + G Show Debug ⌃ Control + ⇧ Shift + D Show Extension ⌃ Control + ⇧ Shift + X Replace in files ⌃ Control + ⇧ Shift + H Show Output panel ⌃ Control + ⇧ Shift + U Open Markdown preview to the side ⌃ Control + K V
DebugToggle breakpoin F9 Start/Continue F5 Step over F10 Step into F11 Step out ⇧ Shift + F11
Others