Useful Information

Useful Information

About

This page contains useful information to myself. It also serve as a testing page for this blog.

Software Development

Architecture

Security

ASP.Net

Miscellaneous

Frequently Used Commands

  • Shutdown 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`

Git

  • Deleting a remote branch git push [remote] --delete [branch] e.g., git push origin --delete feature/branch
  • Sync remote branch and delete remote non-existing local copy git fetch --prune
  • List the commit different between branches git rev-list [branch]...[another branch]
  • List the commit different between branches with arrow indicates which branch owns the commit git rev-list --left-right [branch]...[another branch]
  • List the commit of a branch is ahead/behind to a remote branch git rev-list [branch]...[remote]/[another branch]
  • Show the number of ahead of behind between branches git rev-list --left-right count [branch]...[another branch]
  • Update submodules with latest commit git submodule update --remote

Windows

Remove XBox

  • Remove 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 shortcuts

  • Move Window to another monitor Windows + Shift + /
  • Switch to another desktop Windows + ⌃ Control + /
  • Task View Windows + Tab

Learning

Tech

Mac

Share