This file contains 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
stages{ | |
stage('Linting') { | |
parallel { | |
stage('Chekov') { | |
steps { | |
script { | |
dir("${env.WORKSPACE}/terraform"){ | |
sh "checkov --directory terraform/modules -o junitxml > $WORKSPACE/checkov.xml || true" | |
} | |
} |
This file contains 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 | |
AWS="/usr/local/bin/aws" | |
JQ="/usr/local/bin/jq -r" | |
REGIONS=( "us-east-1" "us-east-2" "us-west-1" "us-west-2" "ap-northeast-1" "eu-west-1") | |
SSO_ROLE_NAME=$1 | |
KUBE_CONFIG=$2 | |
PROFILES=( "$3" ) | |
function cluster-info { | |
local PROFILE=$1 |
This file contains 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 | |
logger Recorder Check Running | |
SERVER=localhost | |
PORT=2003 | |
TOTAL_SENT_COUNT=$(sed -n "/^$(date --date='1 minutes ago' '+%b %_d %H:%M')/,\$p" /var/log/syslog | grep 'Sending ' | wc -l) | |
NO_STREAM_COUNT=$(sed -n "/^$(date --date='1 minutes ago' '+%b %_d %H:%M')/,\$p" /var/log/syslog | grep 'No Stream for ' | wc -l) | |
DECODE_COUNT=$(sed -n "/^$(date --date='1 minutes ago' '+%b %_d %H:%M')/,\$p" /var/log/syslog | grep 'Control Channel Message Decode Rate: 0/sec' | wc -l) | |
DURATION_COUNT=$(sed -n "/^$(date --date='1 minutes ago' '+%b %_d %H:%M')/,\$p" /var/log/syslog | grep 'Deleting this call as it has a duration less than minimum duration of' | wc -l) | |
ENCRYPTED_COUNT=$(sed -n "/^$(date --date='1 minutes ago' '+%b %_d %H:%M')/,\$p" /var/log/syslog | grep 'Not Recording: ENCRYPTED' | wc -l) | |
OLDER1=$(find /tmp/streamthis-*-lastrun -not -newermt '-1 minutes' | wc -l) |
This file contains 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
#!/usr/bin/env python3 | |
import logging | |
import sys | |
import os | |
from twotonedecoder import DetectTones | |
logging.basicConfig(level=logging.DEBUG, format='[%(asctime)s] %(levelname)-11s %(message)s') | |
logger = logging.getLogger('tone_detect') | |
if len(sys.argv) > 1: |
This file contains 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 Get-WindowsKey { | |
param ($targets = ".") | |
$hklm = 2147483650 | |
$regPath = "Software\Microsoft\Windows NT\CurrentVersion" | |
$regValue = "DigitalProductId" | |
Foreach ($target in $targets) { | |
$productKey = $null | |
$win32os = $null | |
$wmi = [WMIClass]"\\$target\root\default:stdRegProv" | |
$data = $wmi.GetBinaryValue($hklm,$regPath,$regValue) |
This file contains 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
// 1: The model schema. | |
var modelDefinition = { | |
username: { | |
type: Sequelize.STRING, | |
unique: true, | |
allowNull: false | |
}, | |
password: { | |
type: Sequelize.STRING, |
This file contains 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
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"securityGroupName": { | |
"type": "string", | |
"metadata": { | |
"description": "Security Group" | |
} | |
}, |
This file contains 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
[General] | |
Timeout=10 | |
RptAddress=127.0.0.1 | |
RptPort=62032 | |
LocalAddress=127.0.0.1 | |
LocalPort=62031 | |
RuleTrace=0 | |
Daemon=0 | |
Debug=0 |
This file contains 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
static { | |
// Collect jvm and system metrics by default | |
Metrics.registerMetricSet("jvm.gc", new GarbageCollectorMetricSet()); | |
Metrics.registerMetricSet("jvm.memory", new MemoryUsageGaugeSet()); | |
Metrics.registerMetricSet("jvm.threads", new ThreadStatesGaugeSet()); | |
Metrics.registerMetricSet("jvm.runtime", new RuntimeMetricSet()); | |
Metrics.registerMetricSet("jvm.os", new OperatingSystemMetricSet()); | |
Metrics.registerMetricSet("jvm.filesystem", new FileSystemMetricSet()); | |
Metrics.registerAll("jvm.buffers", new BufferPoolMetricSet(ManagementFactory.getPlatformMBeanServer()), Metrics.getMetricRegistry()); |
This file contains 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 Meters for Important Events | |
*/ | |
Metrics.markMeter(Metrics.name("requests", "ended")); | |
/* | |
* Counters are simple, you can inc/dec them. | |
*/ | |
Metrics.incCounter(Metrics.name("metricstats", tenantId, "valid")); |
NewerOlder