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
| exports.config = { | |
| framework: 'jasmine2', | |
| specs: ['spec/**/*.js'], | |
| sauceUser: 'seu-usuario', | |
| sauceKey: 'sua-access-key', | |
| multiCapabilities: [{ | |
| 'name': 'UI Tests', | |
| 'browserName': 'chrome', | |
| 'version': '46.0', |
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
| packer build -machine-readable packer.json | tee build.log | |
| grep 'Tagging snapshot' build.log | cut -d, -f5 | cut -d: -f3 | grep -o '[^$(printf '\t')].*' |
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
| $file = "C:\Path\To\Your\File.zip" | |
| $destination = "C:\DestinationPath" | |
| Add-Type -assembly "system.io.compression.filesystem" | |
| [io.compression.zipfile]::ExtractToDirectory($file, $destination) |
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
| $source = "C:\Path\To\Directory" | |
| $destination = "C:\Path\To\Zip\file.zip" | |
| If(Test-path $destination) {Remove-item $destination} | |
| Add-Type -assembly "system.io.compression.filesystem" | |
| [io.compression.zipfile]::CreateFromDirectory($Source, $destination) |
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
| New-Item -ItemType Directory -Force -Path C:\Path\To\Directory | |
| $path = "C:\Path\To\Directory" | |
| $Acl = (Get-Item $path).GetAccessControl('Access') | |
| $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule("NT SERVICE\MSSQLSERVER", "FullControl", "ContainerInherit,ObjectInherit", "None", "Allow") | |
| $Acl.SetAccessRule($Ar) | |
| Set-Acl $path $Acl |
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
| New-NetFirewallRule -DisplayName "MSSQL" -Direction Inbound -LocalPort 1433 -Protocol TCP -Action Allow |
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
| Import-Module "sqlps" | |
| $smo = 'Microsoft.SqlServer.Management.Smo.' | |
| $wmi = new-object ($smo + 'Wmi.ManagedComputer'). | |
| # List the object properties, including the instance names. | |
| $Wmi | |
| # Enable the TCP protocol on the default instance. | |
| $uri = "ManagedComputer[@Name='" + (get-item env:\computername).Value + "']/ServerInstance[@Name='MSSQLSERVER']/ServerProtocol[@Name='Tcp']" | |
| $Tcp = $wmi.GetSmoObject($uri) |
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
| /* | |
| To run the script from the DB machine, use: sqlcmd -S localhost -i C:\Path\To\File\setupMixedMode.sql | |
| */ | |
| USE [master] | |
| EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'LoginMode', REG_DWORD, 2 | |
| GO |
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
| set wmiComputer = GetObject( _ | |
| "winmgmts:" _ | |
| & "\\.\root\Microsoft\SqlServer\ComputerManagement12") | |
| set tcpProperties = wmiComputer.ExecQuery( _ | |
| "select * from ServerNetworkProtocolProperty " _ | |
| & "where InstanceName='MSSQLSERVER' and " _ | |
| & "ProtocolName='Tcp' and IPAddressName='IPAll'") | |
| for each tcpProperty in tcpProperties | |
| dim setValueResult, requestedValue |
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
| set wmiComputer = GetObject( _ | |
| "winmgmts:" _ | |
| & "\\.\root\Microsoft\SqlServer\ComputerManagement12") | |
| set tcpProperties = wmiComputer.ExecQuery( _ | |
| "select * from ServerNetworkProtocolProperty " _ | |
| & "where InstanceName='MSSQLSERVER' and " _ | |
| & "ProtocolName='Tcp' and IPAddressName='IP1'") | |
| for each tcpProperty in tcpProperties | |
| dim setValueResult, requestedValue |
NewerOlder