Skip to content

Instantly share code, notes, and snippets.

View pclose's full-sized avatar

peter close pclose

View GitHub Profile
@pclose
pclose / sis-to-moog.go
Created November 16, 2022 02:25
This program watches for changes in the Microfocus Sitescope OM integration log and forwards new events to a Moogsoft REST LAM -pete 2021-09-17
package main
import (
"os"
"time"
"fmt"
"bufio"
"strings"
"net/http"
"bytes"
@pclose
pclose / swsh.py
Last active August 7, 2020 19:31
Wrapper for SWIS API -pete 2020-07-06
#!/usr/bin/python3
'''
usage: swsh.py [-h] [--login LOGIN] [--password PASSWORD] [--server SERVER]
[--verify VERIFY] [--output OUTPUT] [--input INPUT]
[--customprop [CUSTOMPROP [CUSTOMPROP ...]]]
[--pollers [POLLERS [POLLERS ...]]]
[--node-settings [NODE_SETTINGS [NODE_SETTINGS ...]]] [--debug]
[--log [LOG]] [--config [CONFIG]] [--generate-config]
[--col-order COL_ORDER]
@pclose
pclose / msoft-deploy.sh
Last active June 14, 2018 19:56
Generates commands to install Moogsoft on a linux machine
#!/bin/bash
# Generates commands to install Moogsoft on a linux machine -pete 2018-01-23
host="${1-localhost}"
moog_tar="moog6.3.tgz"
license="123"
java_archive="server-jre-8u172-linux-x64.tar.gz"
java_basedir="jdk1.8.0_172"
@pclose
pclose / gg-tracker-deploy.sh
Last active January 20, 2018 21:42
This script echos out a bunch of commands to set up ggtracker on a Debian box
#!/bin/bash
# This script echos out a bunch of commands to set up ggtracker on a Debian box
# probably have to run this from a linux box of some kind :-/ -pete 2017-11-12
host=${1:-"localhost"}
key=${2:-"key"} # AWS key
sec=${3:-"sec"} # AWS secret
bucket_prefix=${4:-"local"}
user=${5:-"gguser"} # User on Debian box
pass=${6:-$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1)}
recaptcha_secret=${7:-"AAAA"}
#!/usr/bin/python
#
# cp_virsh.py -pete 2016-03-15
#
#
'''
usage: cp-virsh.py [-h] [--remove] [--quiet] [--password PASSWORD]
[--memory MEMORY] [--cpus CPUS] [--add-disk]
[--disk-size DISK_SIZE] [--remove-vol]
@pclose
pclose / yt-convert.py
Created August 26, 2017 02:10
Youtube conversion tool -pete 2017-08-01
#!/usr/bin/python
'''
usage: yt-convert.py [-h] [--input INPUT] [--output OUTPUT] [--format FORMAT]
[--debug] [--url URL]
{channel,convert,query}
Youtube conversion tool -pete 2017-08-01
positional arguments:
{channel,convert,query}