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 / 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
@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 / 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 / default.ahk
Created July 8, 2013 18:01
My AHK directory
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetTitleMatchMode, 2 ; Needle for title match can occur anywhere
;SetTimer, KillCT, 60000 ; Calls the KillCT function every 60 seconds- no longer required
run "%A_ScriptDir%\bin\text-replace.ahk" ; Starts the text-replace script
GroupAdd, ThisScript, %A_ScriptName% ; Add any window containing this script's name to the group ThisScript