Skip to content

Instantly share code, notes, and snippets.

View dtaivpp's full-sized avatar

David Tippett dtaivpp

View GitHub Profile
@dtaivpp
dtaivpp / Epicor_BPM_pop_up_message.cs
Created March 11, 2020 14:15
Simple BPM Debugging Pop-Up Message
string msg ="Imma Message";
this.PublishInfoMessage(msg,
Ice.Common.BusinessObjectMessageType.Information,
Ice.Bpm.InfoMessageDisplayMode.Individual,"","");
import logging
import requests
logger = logging.getLogger(__name__)
formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s')
fileHandle = logging.FileHandler('failed_requests.log')
fileHandle.setLevel(logging.WARNING)
fileHandle.setFormatter(formatter)
logger.addHandler(fileHandle)
import threading
import requests
sites = {
'site1.com': ['https://site1.com/page1' ...],
'site2.com': ['https://site2.com/page1' ...],
'site3.com': ['https://site3.com/page1' ...],
'site4.com': ['https://site4.com/page1' ...]
}
@dtaivpp
dtaivpp / promise_chaining.js
Created September 1, 2020 12:40
A simple example of how you can slowly change the opacity of an html element using a promise chain.
// html has some element with the id heading
// <h1 id="heading">IM FADING IN</h1>
window.onload = () =>{
heading = document.getElementById("heading");
create_await_chain(heading);
}
function create_await_chain(fade_object, depth=0){
// Creates a promise chain to slowly load the bar
@dtaivpp
dtaivpp / firewall_rule_esxi_v7
Last active November 18, 2023 21:24
Adding ESXI v7 Persistent Firewall Rule
#!/bin/sh
# local configuration options
# Note: modify at your own risk! If you do/use anything in this
# script that is not part of a stable API (relying on files to be in
# specific places, specific tools, specific output, etc) there is a
# possibility you will end up with a broken system after patching or
# upgrading. Changes are not supported unless under direction of
# VMware support.
@dtaivpp
dtaivpp / pfx_to_cert_and_key
Last active March 8, 2021 21:11
Convert a .pfx to a cert and key file
# Credit to Mark Brilman https://www.markbrilman.nl/2011/08/howto-convert-a-pfx-to-a-seperate-key-crt-file/
# Output Key
# pkcs12 is just .pfx
openssl pkcs12 -in [yourfile.pfx] -nocerts -out [keyfile-encrypted.key]
# Output Cert
openssl pkcs12 -in [yourfile.pfx] -clcerts -nokeys -out [certificate.crt]
# Output Decrypted Key
@dtaivpp
dtaivpp / ssl_verify_error.log
Last active September 2, 2021 13:20
A sample of a SSL Cert Verify Log
2021-04-30 10:38:14,360 - __main__ - ERROR - HTTPSConnectionPool(host='api-you-want-to-use.com', port=443): Max retries exceeded with url: /ccx/service/customreport2/org/wamitchell/ORG_Network_ID_Validation_-_IT_Location?Effective_as_of_Date=2021-04-30-01%3A00 (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:847)'),))
Traceback (most recent call last):
File "c:\Software\<some-repo>\venv\lib\site-packages\urllib3\connectionpool.py", line 706, in urlopen
chunked=chunked,
File "c:\Software\<some-repo>\venv\lib\site-packages\urllib3\connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "c:\Software\<some-repo>\venv\lib\site-packages\urllib3\connectionpool.py", line 1010, in _validate_conn
conn.connect()
File "c:\Software\<some-repo>\venv\lib\site-packages\urllib3\connection.py", line 421, in connect
tls_in_tls=tls_in_tls,
{
"name": "Python 3",
"build": {
"dockerfile": "Dockerfile",
"context": "..",
"args": {
// Update 'VARIANT' to pick a Python version: 3, 3.6, 3.7, 3.8, 3.9
"VARIANT": "3",
// Options
"INSTALL_NODE": "true",
@dtaivpp
dtaivpp / terraform_resource_scraper.py
Created September 28, 2021 15:14
This is a quick script for scraping over a terraform directory and extracting the resources used
import yaml
import os
yaml_files = []
rootDir = '.'
for dirName, subdirList, fileList in os.walk(rootDir):
for fname in fileList:
if fname[-4:] == 'yaml':
yaml_files.append( dirName + "/" + fname)
usage: ghdorker [-h] [-v] [-s {repo,user,org}] [-d DORKS] [--debug] [-o OUTPUT_FILENAME] [--options INPUT_OPTION [INPUT_OPTION ...]] search
Search github for github dorks
positional arguments:
search The repo, username, or organization you would like to search
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit