Skip to content

Instantly share code, notes, and snippets.

View rbocchinfuso's full-sized avatar

Richard Bocchinfuso rbocchinfuso

View GitHub Profile
@rbocchinfuso
rbocchinfuso / SlackIncidentEscalateNotify.js
Last active October 5, 2017 19:09
ServiceNow Escalate Incident Slack Notification #servicenow #slack #businessrule
// ServiceNow Escalate Incident Slack Notification
// Business Rule
// SlackIncidentEscalateNotify.js
// Rich Bocchinfuso - 2017/05/10
// debug only
//var inc ='####'; // add incident sys_id you wnat to use for debugging
//var current = new GlideRecord('incident');
//if (current.get(inc)) {
@rbocchinfuso
rbocchinfuso / SlackMessage.js
Last active October 5, 2017 18:01
ServiceNow SlackMessage #servicenow #slack #scriptinclude
// ServiceNow Slack Message
// Script Include
// SlackMessage.js
// Rich Bocchinfuso - 2017/05/10
var SlackMessage = Class.create();
var iconurl = 'http://www.gb-advisors.com/wp-content/uploads/2016/06/servicenow-sm-icon.png';
var emoji = ':warning:';
var channel = '#test';
@rbocchinfuso
rbocchinfuso / SlackIncidentNewNotify.js
Last active October 5, 2017 18:48
ServiceNow New Incident Slack Notification #servicenow #slack #businessrule
// ServiceNow New Incident Slack Notification
// Business Rule
// SlackIncidentNewNotify.js
// Rich Bocchinfuso - 2017/05/10
// debug only
// var inc ='####'; // add incident sys_id you wnat to use for debugging
// var current = new GlideRecord('incident');
// if (current.get(inc)) {
@rbocchinfuso
rbocchinfuso / SlackIncidentAssignNotify.js
Last active October 5, 2017 18:40
ServiceNow Assigned Incident Slack Notification #servicenow #slack #businessrule
// ServiceNow Assigned Incident Slack Notification
// Business Rule
// SlackIncidentAssignNotify.js
// Rich Bocchinfuso - 2017/05/10
// debug only
//var inc ='####'; // add incident sys_id you wnat to use for debugging
//var current = new GlideRecord('incident');
//if (current.get(inc)) {
#!/usr/bin/php
<?php
/*
ssUpdate
MIT License
@rbocchinfuso
rbocchinfuso / zfs.mig
Last active August 15, 2017 19:29
zfs migration process
Create source and target zfs pools for testing
sourcepool is a raidz1 stripe comprised of 4x1GB volumes and targetpool is a single 5GB device
[ root@unknown:/ ] $ zpool create sourcepool raidz1 c1t0d0 c1t1d0 c1t2d0 c1t3d0
[ root@unknown:/ ] $ zpool create targetpool c1t4d0
Check pools after creation
[ root@unknown:/ ] $ zpool status -v sourcepool
pool: sourcepool
@rbocchinfuso
rbocchinfuso / check_vnx.ps1
Last active July 25, 2018 13:51
PRTG VNX Custom Sensor
#requires -version 2
<#
.SYNOPSIS
PRTG VNX Check Script
.DESCRIPTION
This is a custom EXEXML script which is invoked by PRTG
.PARAMETER <Parameter_Name>
-h [SP_IP] -u [username] -p [password]
.INPUTS
None
@rbocchinfuso
rbocchinfuso / hubot.sh
Created September 10, 2015 15:21
hubot starup script
#!/bin/sh
USER="hubot"
USER_HOME="/home/$USER"
HUBOT_ROOT="$USER_HOME/hubot"
HUBOT_HOME="$HUBOT_ROOT/node_modules/hubot"
DAEMON="$HUBOT_HOME/bin/hubot"
PIDFILE=$HUBOT_ROOT/hubot.pid
case "$1" in
@rbocchinfuso
rbocchinfuso / hubotAlive.sh
Created September 10, 2015 15:17
hubot keepalive script
#!/bin/bash
# Add to crontab
# */5 * * * * ~/hubotAlive.sh hubot
hubotName=$1
hubotPID=$(ps -aux | grep -w node | grep -w ${hubotName} | grep -v grep | awk '{print $2}')
echo "hubot PID: ${hubotPID}"
@rbocchinfuso
rbocchinfuso / mergenar.ps1
Created December 17, 2014 17:22
PowerShell Script to Merge NAR Files
#mergenar.ps1
$TempFile = "c:\temp\nar_out\Temp.nar"
$OutputFile = "c:\temp\nar_out\NAR_Merge.nar"
$NarFiles = Get-Childitem "c:\temp\nar_in"
$count =0
$count = $NarFiles | Measure-Object | select -ExpandProperty count
$filecount = 0