[misc] win10 utilities

This commit is contained in:
Klesh Wong 2020-06-20 12:38:36 +08:00
parent 7f8e76b9fb
commit 5b1fddc565
2 changed files with 14 additions and 0 deletions

Binary file not shown.

View File

@ -46,4 +46,18 @@ function d {
function vsbuild {
Import-Module "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
Enter-VsDevShell 56e7bf1c
}
function ssh-copy-id {
[Cmdletbinding()]
param (
[Parameter()]
[String]
$IdentityFile="~/.ssh/id_rsa.pub",
[Parameter(Mandatory=$true, Position=0)]
[String]
$UserHost
)
Get-Content $IdentityFile | ssh $UserHost "umask 077; test -d .ssh || mkdir .ssh ; cat >> .ssh/authorized_keys"
}