Skip to content

Instantly share code, notes, and snippets.

View jm-welch's full-sized avatar

Jeremy Welch jm-welch

View GitHub Profile
@jm-welch
jm-welch / Syntax Test Script.ps1
Created July 17, 2013 16:14
PowerShell syntax highlighting test script
# Syntax test script for PowerGUI
# -------------------------------
# To modify syntax highlighting, use the Script Colors addin
# from http://www.powergui.org/entry.jspa?externalID=3023
# Or edit PowerShellSyntax.xml in your PowerGUI install path
cls
<# Formatted types in example below
$myarray : variable
@jm-welch
jm-welch / Send-MailMessages.ps1
Last active December 20, 2015 21:29
My version of jfrmilner's Send-MailMessages function
function Send-MailMessages {
<#
.SYNOPSIS
Send a batch of emails very quickly.
.DESCRIPTION
This script is designed to assist in generating email messages for testing internal/external message flow for your messaging infrastructure.
The ability to quickly send a batch of messages with an attachment on a schedule can help track flow issues, to confirm mail routing, or to test 'high-load' scenarios.
.EXAMPLE
@jm-welch
jm-welch / nagios_template.py
Created February 14, 2014 21:20
A simple template for writing Nagios plugin in Python
#! /usr/bin/env python
###############################################################################
# Nagios plugin template
#
# Notes
# - The RHEL boxes I work on are currently limited to Python 2.6.6, hence the
# use of (deprecated) optparse. If I can ever get them all updated to
# Python 2.7 (or better yet, 3.3), I'll switch to argparse
# - This template runs in 2.6-3.3. Any changes made will need to be appropriate