This file contains hidden or 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
| Test |
This file contains hidden or 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
| _spPageContextInfo | |
| { | |
| webServerRelativeUrl : "/ProjectWeb", | |
| webLanguage : 1033, | |
| currentLanguage : 1033, | |
| webUIVersion : 4, | |
| pageListId : "{c1d7b89f-f07b-4e2e-b89c-76c315831d59}", | |
| pageItemId : 5, | |
| userId : 68, | |
| alertsEnabled : true, |
This file contains hidden or 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
| #Install-PackageProvider -Name Nuget -MinimumVersion 2.8.5.201 | |
| Configuration sqlAlias | |
| { | |
| Import-Module PSDesiredStateConfiguration -ErrorAction SilentlyContinue | |
| Import-Module xSQLServer -ErrorAction SilentlyContinue | |
| if ((get-module -Name PSDesiredStateConfiguration) -eq $null){ | |
| Install-Module PSDesiredStateConfiguration -Force | |
| Import-Module PSDesiredStateConfiguration | |
| } |
This file contains hidden or 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
| Configuration SqlFirewallApp2 | |
| { | |
| #Import-DscResource -ModuleName PSDesiredStateConfiguration | |
| Import-DSCResource -ModuleName xNetworking | |
| node $env:ComputerName | |
| { | |
| # instance rule | |
| xFireWall SQLFirewallRule |
This file contains hidden or 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
| # based on https://technet.microsoft.com/en-us/library/dn949332.aspx | |
| # This command needs to run on a modern powershell (win 10/server 2016, PSVersion >= 5.1) | |
| #local certificate authority | |
| $caFriendlyName = "myCA"; | |
| $caSubjectName = "myCA"; | |
| #server to server cert | |
| $encrptCertFriendlyName = "EncryptCert"; |
This file contains hidden or 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
| # Create certificate ------------------------------------------------------------- | |
| $encrptCertFriendlyName = 'myCert' | |
| $pfxPassWord = 'passwordCert' | |
| $location = 'Cert:\LocalMachine\my'; | |
| # This command needs to run on a modern powershell (win 10/server 2016, PSVersion >= 5.1) | |
| $cert = New-SelfSignedCertificate -CertStoreLocation $location -Subject $encrptCertFriendlyName -KeySpec KeyExchange -NotAfter (Get-Date).AddYears(20) -FriendlyName $encrptCertFriendlyName -Type Custom | |
| $mypwd = ConvertTo-SecureString -String $pfxPassWord -Force -AsPlainText | |
| Export-pfxCertificate -FilePath 'c:\myCert.pfx' -Cert $cert -Password $mypwd |
This file contains hidden or 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
| $friendlyName = 'cert friendly name' | |
| $location = 'Cert:\LocalMachine\my'; | |
| #get cert by friendly name | |
| $cert = Get-ChildItem -Path $location | Where { $_.FriendlyName -eq $friendlyName}; | |
| #location of pfx on file system | |
| $keyName = $cert.PrivateKey.CspKeyContainerInfo.UniqueKeyContainerName | |
| $keyPath = [System.IO.Path]::Combine("$env:ProgramData\Microsoft\Crypto\RSA\MachineKeys\",$keyName) |
This file contains hidden or 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
| function test(){ | |
| alert('hi'); | |
| } |
This file contains hidden or 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
| { | |
| "files.exclude": { | |
| "**/*.js": true, | |
| "**/*.js.map": true, | |
| "**/*.njsproj": true, | |
| "**/*.njsproj.user": true, | |
| "bin/": true, | |
| "node_modules/": true, | |
| "obj/": true, | |
| "package-lock.json": true |
This file contains hidden or 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
| var readDirectory = async () => { | |
| const opts = { type: 'open-directory' }; | |
| const handle = await window.chooseFileSystemEntries(opts); | |
| const entries = await handle.getEntries(); | |
| window.entries = entries; | |
| for await (const entry of entries) { | |
| const kind = entry.isFile ? 'File' : 'Directory'; | |
| console.log(kind, entry.name); | |
| } |
OlderNewer