Skip to content

Instantly share code, notes, and snippets.

View johann8384's full-sized avatar

Jonathan Creasy johann8384

View GitHub Profile
@johann8384
johann8384 / Jenkinsfile
Created April 27, 2021 22:43
Puppet Jenkins
stages{
stage('Linting') {
parallel {
stage('Chekov') {
steps {
script {
dir("${env.WORKSPACE}/terraform"){
sh "checkov --directory terraform/modules -o junitxml > $WORKSPACE/checkov.xml || true"
}
}
#!/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
#! /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)
#!/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:
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)
// 1: The model schema.
var modelDefinition = {
username: {
type: Sequelize.STRING,
unique: true,
allowNull: false
},
password: {
type: Sequelize.STRING,
@johann8384
johann8384 / cloudbreakTemplate.json
Last active November 10, 2017 22:46
Cloudbreak Datalake Template
{
"$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"
}
},
@johann8384
johann8384 / DMRGateway.ini
Last active September 8, 2022 12:54
MMDVM Configs
[General]
Timeout=10
RptAddress=127.0.0.1
RptPort=62032
LocalAddress=127.0.0.1
LocalPort=62031
RuleTrace=0
Daemon=0
Debug=0
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());
/*
* 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"));