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
| @echo off | |
| set loops=0 | |
| set process=%1 | |
| :WaitForProcessToStart | |
| if /i %loops% gtr 10 ( | |
| echo Process didn't started on time | |
| exit /b 1 | |
| ) |
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 "PATH_TO_Microsoft.ServiceBus.dll" | |
| #Create the required credentials | |
| $tokenProvider = [Microsoft.ServiceBus.TokenProvider]::CreateSharedSecretTokenProvider("owner", "YOUR_ISSUERSECRET") | |
| $namespaceUri = [Microsoft.ServiceBus.ServiceBusEnvironment]::CreateServiceUri("sb", "YOUR_NAMESPACE", ""); | |
| $namespaceManager = New-Object Microsoft.ServiceBus.NamespaceManager $namespaceUri,$tokenProvider | |
| #Create a queue | |
| $queue = $namespaceManager.CreateQueue("MyPowershellQueue"); |
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
| select sysobj.name, sum(reserved_page_count) * 8.0 / 1024 as 'total size (MB)' | |
| from sys.dm_db_partition_stats sysstats, sys.objects sysobj | |
| where sysstats.object_id = sysobj.object_id and sysobj.schema_id = schema_id('dbo') | |
| group by sysobj.name; |
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
| SELECT Convert(datetime, SWITCHOFFSET(CONVERT(datetimeoffset,[ColumnWithUTCTime]), DATENAME(TzOffset, SYSDATETIMEOFFSET()))) AS LocalTime | |
| FROM TABLE |
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; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Security.Cryptography.X509Certificates; | |
| using System.Net; | |
| using System.Net.Security; | |
| namespace WebClientClientCertificateAuth | |
| { |
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
| rm -Rf |
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
| title=$1 | |
| echo -n -e "\033]0;$title\007" |
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
| kill -9 `ps aux | grep 'my_rogue_process.py' | grep -v grep | awk '{print $2}'` |
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
| MACHINE_IP=`ifconfig eth0 | grep inet | grep -v inet6 | awk '{print substr($2, 6)}'` | |
| echo $MACHINE_IP |
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 boto.ec2 | |
| if __name__ == '__main__': | |
| zones = ['us-east-1', 'us-west-2', 'us-west-1', 'eu-west-1', 'ap-southeast-1', | |
| 'ap-northeast-1', 'ap-southeast-2', 'sa-east-1'] | |
| for zone in zones: | |
| connection = boto.ec2.connect_to_region( | |
| region_name=zone, |
OlderNewer