Skip to content

Instantly share code, notes, and snippets.

@starkfell
starkfell / SCOM_Mon_Query.ps1
Created December 1, 2012 15:11
SCOM 2012 - Agent Monitoring Query Tool (ManagementPacks,Monitors,Rules, and Overrides)
#################################################################################
#
# [SCOM_Mon_Query.ps1] - SCOM 2012 - Agent Monitoring Query Tool
#
# Author: Ryan Irujo
#
# Inception: 11.26.2012
# Last Modified: 11.30.2012
#
# Syntax: ./SCOM_Mon_Query.ps1 <hostname>
@starkfell
starkfell / OpCfg_MySQL_Backup Script
Created December 6, 2012 21:44
Mysqldump backup script for OpCfg.
#!/bin/bash
#
# OpCfg_MySQL_Backup Script
#
# Author: Ryan Irujo
# Inception: 12.06.2012
# Last Modified: 12.06.2012
#
# Description: Mysqldump backup script for OpCfg.
#
@starkfell
starkfell / NRPE Multi-Agent Updater Script
Created December 6, 2012 21:49
Bash Script used to update multiple NRPE Agents on multiple hosts from a text file.
#!/bin/bash
#
# NRPE Multi-Agent Updater Script
#
# Author : Ryan Irujo
# Inception: 03.07.2012
#
# Description: Bash Script used to update multiple NRPE Agent on multiple hosts listed in a text file
# called 'hosts.txt'.
#
@starkfell
starkfell / SQL_Server
Created December 6, 2014 21:44
SQL Server 2012 Custom Configuration File
;SQL Server 2012 Configuration File
[OPTIONS]
; Specifies a Setup work flow, like INSTALL, UNINSTALL, or UPGRADE. This is a required parameter.
ACTION="Install"
; Detailed help for command line argument ENU has not been defined yet.
ENU="True"
#!/bin/bash
# Name: install_azure_cli_centos.sh
# Author: Ryan Irujo
#
# Inception: 01.04.2016
# Description: This Script is responsible for performing the following actions:
# - Installing the Azure CLI for Linux.
# - All Output from the Script is written to a Log File called 'InstallAzureCLIErrors.log' which is deleted if everything ran successfully.
#
# Additional Notes:
var path = "url here"
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function () {
if (this.readyState == 4 && this.status == 200) {
this.responseText; //file content
}
};
xhttp.open("GET", path, true);
xhttp.send();
@starkfell
starkfell / deploy-ansible.sh
Last active March 1, 2018 15:18
Ansible deployment - Ubuntu 16.04
sudo apt-get update && \
sudo apt-get install -y vim curl git software-properties-common && \
sudo apt-get update && \
sudo apt-add-repository ppa:ansible/ansible && \
sudo apt-get install -y ansible
cd ~ && mkdir .ssh/
ssh-keygen \
-t rsa \
@starkfell
starkfell / quick-ref-commands.sh
Last active December 6, 2018 12:02
quick-ref-commands.sh
# Generate a password-less SSH Key.
ssh-keygen -t rsa -b 2048 -C "ssh-key-name-goes-here" -f ~/.ssh/ssh-key-name-goes-here -N ''
# Add a key for logging in via SSH or cloning Git via SSH.
eval $(ssh-agent -s) ; ssh-add ~/.ssh/
# Retrieve contents of Docker Registry or Azure Container Registry secret in Kubernetes Cluster.
kubectl get secret regcred --output="jsonpath={.data.\.dockerconfigjson}" | base64 --decode
# Retrieving all of the Agent Pools that are not 'master'.
# Instructions to Install AzureAD PowerShell on PowerShell Core.
Get-InstalledModule
Install-Module -Name Az -Repository PSGallery -AllowClobber -Force
Install-Module -Name AzureADPreview -Repository PSGallery -AllowClobber -Force
Install-Module -Name 'AzureAD.Standard.Preview' -Repository 'Posh Test Gallery'-SkipPublisherCheck -AllowClobber -Force
Import-Module Az.Resources
Import-Module AzureAD.Standard.Preview
#!/usr/bin/env python3
#
# Name: query-rg.py
#
# Author: Ryan Irujo
#
# Description: Script demonstrating how to query for an Azure Resource Group using the Azure CLI and Python.
#
# Notes: You must already be logged into an Azure Subscription for this script to work.
#