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 transaction isolation level read uncommitted | |
| select DB_NAME(database_id) as DataBaseName | |
| , count(*) as [Missing Index Count] | |
| from sys.dm_db_missing_index_details | |
| group by db_name(database_id) | |
| order by [Missing Index Count] desc | |
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
| DECLARE @TableName VARCHAR(255) | |
| DECLARE @sql NVARCHAR(500) | |
| DECLARE @fillfactor INT | |
| SET @fillfactor = 80 | |
| DECLARE TableCursor CURSOR FOR | |
| SELECT OBJECT_SCHEMA_NAME([object_id])+'.'+name AS TableName | |
| FROM sys.tables | |
| OPEN TableCursor | |
| FETCH NEXT FROM TableCursor INTO @TableName | |
| WHILE @@FETCH_STATUS = 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
| use [database] | |
| go | |
| select total_worker_time/execution_count as MediaCPU | |
| , total_worker_time AS TotalCPU | |
| , total_elapsed_time/execution_count as MediaDuration | |
| , total_elapsed_time AS TotalDuration | |
| , total_logical_reads/execution_count as MediaLogicalReads | |
| , total_logical_reads AS TotalLogicalReads | |
| , total_physical_reads/execution_count as MediaPhysicalReads | |
| , total_physical_reads AS TotalPhysicalReads |
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
| USE MASTER; | |
| GO | |
| -- Take database in single user mode -- if you are facing errors | |
| -- This may terminate your active transactions for database | |
| ALTER DATABASE Piloto | |
| SET SINGLE_USER | |
| WITH ROLLBACK IMMEDIATE; | |
| GO | |
| -- Detach DB | |
| EXEC MASTER.dbo.sp_detach_db @dbname = N'Piloto' |
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 servermanager | |
| Add-WindowsFeature web-server –includeallsubfeature | |
| Import-Module WebAdministration | |
| New-WebFtpSite -Name "LinxFTP" -Port "21" -Force | |
| cmd /c \Windows\System32\inetsrv\appcmd set SITE "LinxFTP" "-virtualDirectoryDefaults.physicalPath:C:\inetpub\ftproot" | |
| Set-ItemProperty "IIS:\Sites\LinxFTP" -Name ftpServer.security.ssl.controlChannelPolicy -Value 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
| tail -n +2 YOURFILE.csv/txt | split -l 1000 -d --additional-suffix=.csv - split_ | |
| for file in split_* | |
| do | |
| head -n 1 YOURFILE.csv/txt > tmp_file | |
| cat $file >> tmp_file | |
| mv -f tmp_file $file | |
| done |
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
| #!/bin/bash | |
| clear | |
| REPOS=(teste teste1 teste2) | |
| git=https://user:password@{organizationName}.visualstudio.com/{TeamProject}/_git/ | |
| newRepo=https://user:password@{organizationName}.visualstudio.com/{TeamProject}/_git/ | |
| for i in ${REPOS[@]} | |
| do | |
| echo $git$i |
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
| //Criando Classe | |
| using System; | |
| namespace Course | |
| { | |
| class Triangulo | |
| { | |
| private double A { get; set; } | |
| private double B { get; set; } | |
| private double C { get; set; } |
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
| curl 'https://{{YOUR_WEB_SITE}}/' -H 'Accept-Encoding: gzip, deflate, sdch' -H 'Accept-Language: en-US,en;q=0.8,ja;q=0.6' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.86 Safari/537.36' -H 'Connection: keep-alive' --compressed -s -o /dev/null -w "%{time_starttransfer}\n" |
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
| using System; | |
| using System.Collections.Generic; | |
| public class Program | |
| { | |
| public static void Main() | |
| { | |
| //Console.Write("Infix Formule: "); | |
| //string infix = Console.ReadLine(); | |
| string infix = "4.5+a5+.1215 + 1"; |