My Wiki!
**You've loaded an old revision of the document!** If you save it, you will create a new version with this data.
Media Files
# Windows tricks ## Auto power on PS as admin: powercfg -devicequery wake_armed HID-compliant mouse (001) Fix it devmgmt.msc Mouse properties and disable wakeup. ## Powershell ### Execution policy Open PS as admin and run: Set-ExecutionPolicy Unrestricted ### Run ps1 script 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", "C:\Program Files\Java\jdk-13.0.1") [System.Environment]::SetEnvironmentVariable("Path", [System.Environment]::GetEnvironmentVariable('Path', [System.EnvironmentVariableTarget]::Machine) + ";$($env:JAVA_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! ## Git ### Ignore File mode git config --global core.fileMode false ==== - Set new line ==== creating in each Git repo a file .gitattributes including: LF is linux ending. <code> .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 </code> 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
Save
Preview
Cancel
Edit summary
Note: By editing this page you agree to license your content under the following license:
Trace:
•
win_tricks
•
wsl
Article
Discussion
Edit this page
Old revisions
Log In
Navigation
ai_eng
cloudsa
devices
devops
documents
linux
misc
old_wiki
playground
programming
projects
resources
todo
ui-ux
virtualization
wiki
windows
work_dai_labor
yacoub
00_watch_list
01_publication_watchlist
02_pjs_task_overview
apache_wiki
damcuoi
heuristics
learning_resources
navigation
sidebar
td_wiki
v_openinfra_watch
Search
Toolbox
What links here
Recent Changes
Media Manager
Site index
Printable version
Permanent link
Cite this article