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 FuncCheckService{ | |
param($ServiceName) | |
$arrService = Get-Service -Name $ServiceName | |
if ($arrService.Status -ne "Running"){ | |
Start-Service $ServiceName | |
Write-Host "Starting " $ServiceName " service" | |
" ---------------------- " | |
" Service is now started" | |
} | |
if ($arrService.Status -eq "running"){ |
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
resource "aws_sns_topic" "codepipeline" { | |
name = "CodePipelineExecutionStateChange" | |
} | |
resource "aws_sns_topic_policy" "codepipeline" { | |
arn = "$ {aws_sns_topic.codepipeline.arn}" | |
policy = "$ {data.aws_iam_policy_document.sns_topic_policy.json}" | |
} | |
data "aws_iam_policy_document" "sns_topic_policy" { | |
statement { | |
effect = "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
resource "aws_cloudwatch_event_rule" "codepipeline" { | |
name = "CodePipelineExecutionStateChane" | |
description = "CodePipeline Pipeline Execution State Change" | |
event_pattern = << PATTERN | |
{ | |
"source": [ | |
"aws.codepipeline" | |
], | |
"detail-type": [ | |
"CodePipeline Pipeline Execution State Change" |
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 i.ID AS ItemID, i.Name AS ItemName, FieldItem.Name AS FieldName, f.Value AS FieldValue, | |
TemplateItem.ID AS TemplateID, TemplateItem.Name AS TemplateName | |
FROM dbo.Items i | |
INNER JOIN dbo.Fields f ON i.ID = f.ItemId | |
INNER JOIN dbo.Items FieldItem ON FieldItem.ID = f.FieldId | |
INNER JOIN dbo.Items TemplateItem ON TemplateItem.ID = i.TemplateID | |
WHERE FieldItem.Name = '__Lock' |
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 DISTINCT i.ID AS ItemID, i.Name AS ItemName, FieldItem.Name AS FieldName, f.Value AS FieldValue, | |
TemplateItem.ID AS TemplateID, TemplateItem.Name AS TemplateName, | |
SUBSTRING(f.Value, CHARINDEX('owner="', f.Value) + 7, CHARINDEX('"', SUBSTRING(f.Value, CHARINDEX('owner="', f.Value) + 7, LEN(f.Value) - CHARINDEX('owner="', f.Value) + 7)) - 1) AS LockUsername, | |
SUBSTRING(f.Value, CHARINDEX('date="', f.Value) + 7, CHARINDEX('"', SUBSTRING(f.Value, CHARINDEX('date="', f.Value) + 7, LEN(f.Value) - CHARINDEX('date="', f.Value) + 7)) - 1) AS LockDate | |
FROM dbo.Items i | |
INNER JOIN dbo.Fields f ON i.ID = f.ItemId | |
INNER JOIN dbo.Items FieldItem ON FieldItem.ID = f.FieldId | |
INNER JOIN dbo.Items TemplateItem ON TemplateItem.ID = i.TemplateID | |
WHERE FieldItem.Name = '__Lock' |
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 LockUsername, COUNT(*) AS TotalLocks | |
FROM | |
( | |
SELECT DISTINCT i.ID AS ItemID, i.Name AS ItemName, FieldItem.Name AS FieldName, f.Value AS FieldValue, | |
TemplateItem.ID AS TemplateID, TemplateItem.Name AS TemplateName, | |
SUBSTRING(f.Value, CHARINDEX('owner="', f.Value) + 7, CHARINDEX('"', SUBSTRING(f.Value, CHARINDEX('owner="', f.Value) + 7, LEN(f.Value) - CHARINDEX('owner="', f.Value) + 7)) - 1) AS LockUsername, | |
SUBSTRING(f.Value, CHARINDEX('date="', f.Value) + 7, CHARINDEX('"', SUBSTRING(f.Value, CHARINDEX('date="', f.Value) + 7, LEN(f.Value) - CHARINDEX('date="', f.Value) + 7)) - 1) AS LockDate | |
FROM dbo.Items i | |
INNER JOIN dbo.Fields f ON i.ID = f.ItemId | |
INNER JOIN dbo.Items FieldItem ON FieldItem.ID = f.FieldId |
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 javax.net.ssl.SSLSocket;import javax.net.ssl.SSLSocketFactory; | |
import java.io.*; | |
/** Establish a SSL connection to a host and port, writes a byte and | |
* prints the response. See | |
* http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services | |
*/ | |
public class SSLPoke { | |
public static void main(String[] args) { | |
if (args.length != 2) { | |
System.out.println("Usage: "+SSLPoke.class.getName()+" <host> <port>"); |
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 | |
for /L %%N in (1,1,600) do ( | |
echo Deleting driver OEM%%N.INF | |
pnputil /d OEM%%N.INF | |
) |
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
if ($env:computername -eq $env:userdomain) { echo " no AD domain" } | |
else { echo "must be in AD"} |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<outboundRules> | |
<rule name="ReverseProxyOutboundRule1" preCondition="IsRedirection"> | |
<match filterByTags="A, Form, Img" serverVariable="RESPONSE_LOCATION" | |
pattern="^http://[^/]+/(.*)" /> | |
<action type="Rewrite" value="https://public_sonar.com/{R:1}" /> | |
</rule> |