PS as admin:
powercfg -devicequery wake_armed HID-compliant mouse (001)
Fix it
devmgmt.msc
Mouse properties and disable wakeup.
Open PS as admin and run:
Set-ExecutionPolicy Unrestricted
PS C:\Users\Thuy Dang\Workspace\00_current\gwui> Set-ExecutionPolicy Unrestricted -Scope Process PS C:\Users\Thuy Dang\Workspace\00_current\gwui> PowerShell.exe -ExecutionPolicy Bypass -File C:\Windows\System32\WindowsPowerShell\v1.0\profile.ps1
## Env Var Powershell
(https://stackoverflow.com/a/59706882/707704)
After I installed JAVA from oracle website I set
[System.Environment]::SetEnvironmentVariable("JAVA_HOME", "C:\Program Files\Java\jdk-13.0.1")
To set java in the path I did,
[System.Environment]::SetEnvironmentVariable("Path", [System.Environment]::GetEnvironmentVariable('Path', [System.EnvironmentVariableTarget]::Machine) + ";$($env:JAVA_HOME)\bin")
Worked like a charm!
If you want to have it load up automatically when you open powershell you can do,
New-Item $profile -Type File -Force
and open in notepad like
notepad.exe $profile
and paste in
[System.Environment]::SetEnvironmentVariable("JAVA_HOME", "D:\devfs\jdk-21.0.10+7")
[System.Environment]::SetEnvironmentVariable("MAVEN_HOME", "D:\devfs\apache-maven-3.9.15")
[System.Environment]::SetEnvironmentVariable("Path", [System.Environment]::GetEnvironmentVariable('Path', [System.EnvironmentVariableTarget]::Machine) + ";$($env:JAVA_HOME)\bin";$($env:MAVEN_HOME)\bin")
You can close the notepad now! Next, you want to allow powershell to run the ps script so don't forget to grant unrestricted access to running the profile script on load by,
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
Java should now be loaded after you reopen powershell. Thats it!
## Gi
t
git config –global core.fileMode false
creating in each Git repo a file .gitattributes including: LF is linux ending.
.gitattributes text eol=lf .gitignore text eol=lf *.build text eol=lf *.c text eol=lf *.cmake text eol=lf *.cpp text eol=lf *.csv text eol=lf *.f text eol=lf *.f90 text eol=lf *.for text eol=lf *.grc text eol=lf *.h text eol=lf *.ipynb text eol=lf *.m text eol=lf *.md text eol=lf *.pas text eol=lf *.py text eol=lf *.rst text eol=lf *.sh text eol=lf *.txt text eol=lf *.yml text eol=lf Makefile text eol=lf
DO NOT just use * as that can goof up binary files in your repo.
git config --global core.autocrlf input git config --global core.eol lf