Skip to content

Instantly share code, notes, and snippets.

View MattJermyWright's full-sized avatar

Matt Wright MattJermyWright

  • Zahlen Solutions
  • Lindon, UT
View GitHub Profile
import typer
from loguru import logger as log
import sys
import os
from os.path import exists
# Log Setup
log.remove()
log.add(sys.stderr, level="INFO")
@MattJermyWright
MattJermyWright / portchecker.py
Last active August 29, 2022 16:05
Port Scanner Client and Server
import typer
from loguru import logger as log
import socket
from multiprocessing import Pool
DEFAULT_MESSAGE = "Thank you sir, may I have another"
PORTS = [
443
]
@MattJermyWright
MattJermyWright / decibel-module-code.js
Last active January 22, 2020 17:43
HPE: Decibel code
/* global sessionStorage decibelInsight s digitalData utag_data */
(function (s) {
var enable = false
try {
enable = location.hostname.indexOf('www.hpe.com')!==-1 && digitalData.page.pageInfo.technology_stack.indexOf('AEM') > -1
} catch (e) {}
if (enable) {
digitalData.log.info('***Decibel Adobe Integrate: enable detected, starting to execute plugin')
s.maxDelay = 750
s.loadModule('Integrate')
@MattJermyWright
MattJermyWright / 1_setup_gpg.md
Last active October 30, 2019 08:53
GPG Setup - Vanilla setup on a system

Starting Out:

  • Run the command gpg --expert --full-generate-key
  • Create a certified certificate
$ gpg --expert --full-generate-key

gpg (GnuPG) 2.2.4; Copyright (C) 2017 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
@MattJermyWright
MattJermyWright / pubkey-gpg.key.txt
Last active January 10, 2023 22:04
Matt's GPG Public Key
-----BEGIN PGP PUBLIC KEY BLOCK-----
mDMEXmHfexYJKwYBBAHaRw8BAQdAWrNb5VLaKuDI71//8C7be2ji87n7ZqJUFYUe
QZOV0cm0LU1hdHQgV3JpZ2h0IChXb3JrKSA8bWF0dEB6YWhsZW5zb2x1dGlvbnMu
Y29tPoiQBBMWCAA4BQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAFiEEbRKoD5zQyz+n
8KlES37ERH0gdQwFAl5h4woCGwMACgkQS37ERH0gdQwEIQD+NjYfrL1RgJ87j8cr
eBdwLHWUAc5VhsFpxHqeJKlYPVgA/RrBIjHCgZd0aj1grFpUvHnO7D73iHNK4xbH
vhmUBeUMtCpNYXR0IFdyaWdodCA8bWF0dC5qZXJlbXkud3JpZ2h0QGdtYWlsLmNv
bT6IkAQTFggAOAIbAwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgBYhBG0SqA+c0Ms/
p/CpREt+xER9IHUMBQJeYd/kAAoJEEt+xER9IHUMXRUBAISlAB1C3+7txYgJWuf7
@MattJermyWright
MattJermyWright / Dockerfile
Last active March 22, 2019 17:30
General: Updated Jenkins Setup
FROM ubuntu:18.04
RUN apt-get update && apt-get install -y wget git curl
RUN apt-get update && apt-get install -y --no-install-recommends openjdk-8-jdk
RUN apt-get update && apt-get install -y maven ant ruby rbenv make
RUN wget -q -O - http://pkg.jenkins-ci.org/debian-stable/jenkins-ci.org.key | apt-key add -
RUN echo deb http://pkg.jenkins-ci.org/debian-stable binary/ >> /etc/apt/sources.list
RUN apt-get update && apt-get install -y jenkins
RUN mkdir -p /var/jenkins_home && chown -R jenkins /var/jenkins_home
ADD init.groovy /tmp/WEB-INF/init.groovy
@MattJermyWright
MattJermyWright / dockerfile.pyenv
Last active April 18, 2016 04:28
Docker: Common Docker Commands and Utilities
FROM agilemeasure/ubuntu-dev:latest
RUN curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
RUN echo "export PATH=\"/root/.pyenv/bin:\$PATH\"" >> /root/.bashrc
RUN echo "eval \"\$(pyenv init -)\"" >> /root/.bashrc
RUN echo "eval \"\$(pyenv virtualenv-init -)\"" >> /root/.bashrc
RUN /root/.pyenv/bin/pyenv install 3.5.1
RUN /root/.pyenv/bin/pyenv install 2.7.11
RUN cd /root && /root/.pyenv/bin/pyenv local 2.7.11
# RUN . ~/.bashrc
# RUN pyenv update && pyenv install 3.5.1 && pyenv local 3.5.1
@MattJermyWright
MattJermyWright / basicTrigger.js
Last active August 29, 2015 14:21
HP: Ensighten EDL / Promise architecture in triggers
function trigger() { // Used as a custom trigger for EDLs
console.log("PROMISE: Initiating Promise");
var p = Bootstrapper.when.defer();
var waitTime = 10; // Default MS to wait until resolved
(function waitForResolution() {
console.log("PROMISE: Waiting for value TestDataTrigger to exist: " + waitTime);
waitTime = waitTime * 2; // Exponential Backoff - wait longer and longer between calls
if(!window.TestDataTrigger) {
setTimeout(waitForResolution,waitTime);
} else {
@MattJermyWright
MattJermyWright / classifier.py
Last active August 29, 2015 14:11
Bayesian Classifier - classify mobile scripts
#!/usr/bin/env python
import fileinput
import re
import math
import pprint
import sqlite3
def getWords(str):
splitter = re.compile(r"\W*")
@MattJermyWright
MattJermyWright / youtubeAPIBasic.py
Last active February 2, 2016 16:27
Youtube Analytics API Pulls
#!/usr/bin/env python
# Original taken from https://developers.google.com/youtube/analytics/v1/code_samples/python
# Prereq Installs:
# pip install httplib2
# pip install apiclient
# pip install urllib3
# pip install --upgrade google-api-python-client
# pip install --upgrade oauth2client