-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from gpproton/dev
certificate setup for openSUSE
- Loading branch information
Showing
4 changed files
with
87 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# dotnet related tops and tricks | ||
|
||
## un-proviledged setup script | ||
|
||
```bash | ||
mkdir -p $HOME/.dotnet | ||
curl "https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh" -o $HOME/.dotnet/dotnet-install | ||
chmod +x $HOME/.dotnet/dotnet-install | ||
$HOME/.dotnet/dotnet-install -c LTS --install-dir $HOME/.dotnet | ||
|
||
cat >>"$HOME/.bashrc" <<SHELL | ||
## start dotnet | ||
export DOTNET_ROOT=\$HOME/.dotnet | ||
export PATH=\$PATH:\$DOTNET_ROOT | ||
export PATH=\$PATH:\$DOTNET_ROOT/tools | ||
## end dotnet | ||
SHELL | ||
# source $HOME/.profile | ||
## or | ||
## source $HOME/.zshrc | ||
dotnet --info | ||
``` | ||
|
||
## import certificates | ||
|
||
```bash | ||
dotnet dev-certs https --clean --import $HOME/localhost.pfx -p "" | ||
dotnet dev-certs https --trust | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
param( | ||
[Parameter(Mandatory=$False, Position=0, ValueFromPipeline=$false)] | ||
[System.String] | ||
$Param1="help", | ||
|
||
[Parameter(Mandatory=$False, Position=1, ValueFromPipeline=$false)] | ||
[System.String] | ||
$Param2="xx-xx-xx" | ||
) | ||
|
||
Write-Host $Param2 | ||
|
||
if ($Param1 -eq "help") { | ||
Write-Host $Param1 | ||
} | ||
|
||
# $isAdmin=([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) | ||
# if (!$isAdmin) { | ||
# # Start-Process pwsh "-NoLogo -ExecutionPolicy Bypass -Command $PSCommandPath -Param1 $Param1 -Param2 $Param2" -Verb RunAs; # //Run this script as Administrator. | ||
# # exit # //Exit from this non elevated context. | ||
# } | ||
# Write-Host $isAdmin | ||
|
||
# function Test-Admin { | ||
# $currentUser = New-Object Security.Principal.WindowsPrincipal $([Security.Principal.WindowsIdentity]::GetCurrent()) | ||
# $currentUser.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator) | ||
# } | ||
# # If we are in a non-admin execution. Execute this script as admin | ||
# if ((Test-Admin) -eq $false) { | ||
# exit | ||
# } |