# Windows ## Windows 10 default font Segoe UI ## show extension for shortcut link file HKEY_CLASSES_ROOT\lnkfile look in the right pane for a line NeverShowExt and delete that line. # internet connection sharing(ics) forwarding traffic between subnets - share internet of one interface to the desired interface - `Set-NetIPInterface -Forwarding Enabled` - `Set-Service RemoteAccess -StartupType Automatic; Start-Service RemoteAccess` ## mount network drive net use x: \\192.168.56.1\shared\Downloads bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi bcdedit /set {bootmgr} path \EFI\ubuntu\bootx64.efi http://askubuntu.com/questions/62440/is-it-possible-to-boot-ubuntu-using-the-windows-bootloader https://www.58bits.com/blog/2016/08/05/installing-windows-10-external-usb-3-hard-drive-boot-camp Properties > C/C++ > Preprocessor > Preprocessor Definitions and type NDEBUG libglew32d.lib;freeglut_staticd.lib;glfw3.lib; ## Remove sshd service cygrunsrv --stop cygsshd cygrunsrv --remove cygsshd or sc delete cygsshd #Delete any sshd or related users (such as cyg_server) from /etc/passwd #(use your favorite editor) ## Delete any sshd or related users (such as cyg_server) from the system net user sshd /delete net user cyg_server /delete ## cyg_server password cyg_server ## set default gateway route add 0.0.0.0 mask 0.0.0.0 192.168.0.1 ## get DNS servers nslookup ## add hosts in C:\Windows\System32\drivers\etc\hosts.txt ## mount network drive net use s: "\\VASALF01INDS\GTAUSysDev\Projects\System Development\Drive_ToolPort_Interface" /USER:ADTMGE\gowtham.kudupudi ros3Tooth62 # unmount network drive net use /delete "\\Kudupudi\Workspace" #unmount all network drives net use * /delete # mount nfs share HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default DWORD AnonymousUid 501 DWORD AnonymousGid 501 mount –u:USER –p:PASSWORD -o nolock 192.168.19.3:/export/Aren z: # List all tasks with cpu utilization tasklist /v > Desktop\tasklist.txt # Linux which equivalent where # change username netplwiz # Networking route print route -p add 192.168.7.0 mask 255.255.255.0 192.168.137.2 route delete 192.168.7.0 # Recursively delete files with naming patterns del /s /q *.svn rmdir /s /q *.svn # Find vendor and product id HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\ ctrl+f search values no keys # screen rotate Ctrl + Alt + Arrows # Open my computer properties sysdm.cpl # nfs [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default] "AnonymousGid"=dword:00000064 "AnonymousUid"=dword:000001f4 # print screen ## With apple keyboard Fn + Shift + F11 Fn + Shift + Alt + F11 Ctrl + Alt + F11 1280 54 132 # Open key or password manager rundll32.exe keymgr.dll,KRShowKeyMgr ## putty ### tmux select text shift+mouse_down+drag ### save sessions regedit /e "%userprofile%\desktop\putty-registry.reg" HKEY_CURRENT_USER\Software\Simontatham ### context menu or right click options ctrl+right click # VLC show playlist - Ctrl+L # Set Bluetooth name devmgmt.msc > Bluetooth > Intel Wireless Bluetooth > properties > Advanced # reset quick access del "%AppData%\Microsoft\Windows\Recent\AutomaticDestinations\f01b4d95cf55d32a.automaticDestinations-ms" # access network symbolic links fsutil behavior query SymlinkEvaluation fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1 # set UTC time HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation\RealTimeIsUniversal=1(DWORD) # batch script # ------------ # comments rem this will do nothing # Cygwin # ------ # set windows home directory vi /etc/nsswitch.conf db_home: /%H # synergy-core ## qt install Qt -> Qt 5.12.10 -> Developer and Designer Tools -> CMake -> OpenSSL ## build cd synergy-core\build call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64 cmake -G "Visual Studio 16 2019" -DCMAKE_BUILD_TYPE=Debug -DOPENSSL_ROOT_DIR="C:\Qt\Tools\OpenSSL\Win_x64\lib" -DQt5_DIR="C:\Qt\5.12.10\msvc2017_64\lib\cmake\Qt5" .. msbuild synergy-core.sln /p:Platform="x64" /p:Configuration=Debug /m ## run ### add path set path=%path%;C:\Qt\Tools\OpenSSL\Win_x64\bin # FFMPEG https://trac.ffmpeg.org/wiki/CompilationGuide/WinRT - open x64 Native Tools Command Prompt for VS 2019 - edit c:\msys64\msys2_shell.cmd, remove rem on "set MSYS2_PATH_TYPE=inherit" c:\msys64\msys2_shell.cmd pacman -Syu pacman -S make diffutils yasm nasm ## x264 git clone https://code.videolan.org/videolan/x264.git cd x264 git checkout stable mkdir build.VS2019x64Native cd build.VS2019x64Native CC=cl ../configure --prefix=${PWD}/install --enable-shared --enable-pic make -j8 make install mv lib/libx264.dll.lib lib/libx264.lib ## FFMPEG git clone https://github.com/FFmpeg/FFmpeg.git cd FFmpeg git checkout n4.4 git switch -c n4.4 mkdir build.VS2019x64Native cd build.VS2019x64Native CC=cl ../configure --prefix=${PWD}/install --toolchain=msvc --arch=x86_64 --enable-shared --disable-static --enable-avresample --enable-libx264 --enable-gpl --enable-w32threads --extra-ldflags="-LIBPATH:/c/Users/Admin/Downloads/x264/build.VS2019x64Native/install/lib" --extra-cflags="-I/c/Users/Admin/Downloads/x264/build.VS2019x64Native/install/include/" CC=cl ../configure --prefix=${PWD}/install --toolchain=msvc --arch=x86_64 --enable-shared --disable-static --enable-avresample --enable-libx264 --enable-libx265 --enable-gpl --enable-w32threads --extra-ldflags="-LIBPATH:/i/Gowtham/workspace/x264/build.VS2019x64Native/install/lib -LIBPATH:/i/Gowtham/workspace/x265/build.VS2019x64Native/install/lib" --extra-cflags="-I/i/Gowtham/workspace/x264/build.VS2019x64Native/install/include -I/i/Gowtham/workspace/x265/build.VS2019x64Native/install/include" # get user's uuid wmic useraccount where name='Gowtham' get sid # list physical discs # in PowerShell GET-WMIOBJECT -query "SELECT * from Win32_DiskDrive" # wsl ## attach a physical disk wsl --mount \\.\PHYSICALDRIVE1 --bare ## detach a physical disk wsl --unmount \\.\PHYSICALDRIVE1 ## terminate a distro wsl -t Ubuntu ## QNX ### Build FFMPEG - Open x64 Native Tools Command Prompt for VS 2019 C:\qnx700\qnxsdp-env.bat C:\msys64\msys2.exe export SYSROOT=/c/qnx700/target/qnx7/aarch64le export TOOLCHAIN=/c/qnx700/host/win64/x86_64 #### Build x264 ../configure --prefix=./install --cross-prefix=$TOOLCHAIN/usr/bin/aarch64-unknown-nto-qnx7.0.0- --sysroot=$SYSROOT --host=arm-qnx --enable-pic --enable-static --disable-asm --enable-shared --disable-opencl --disable-cli ## msys ### update all `pacman -Syu` - if failed to sync follow https://stackoverflow.com/questions/69348953/certificate-error-when-trying-to-install-msys2-packages-on-windows-server ### list files installed by a package `pacman -Ql gmp` ### uninstall or remove a package `pacman -R gmp` ### change home directory to windows ``` cd c:\msys64 mklink /j home c:\Users ``` - set %HOME% Windows user variable to c:\msys64\home\ - put db_home: windows in /etc/nsswitch.conf ### sshd https://www.msys2.org/wiki/Setting-up-SSHd/ - if connection closed run /usr/bin/sshd manually instead of starting the service ## python - `Ctrl+z Return` to quit