Skip to content

Instantly share code, notes, and snippets.

Avatar

Richard Bocchinfuso rbocchinfuso

View GitHub Profile
@rbocchinfuso
rbocchinfuso / win-svc-auth-validate.py
Last active Dec 1, 2021
Windows Service and Auth Validator
View win-svc-auth-validate.py
#!/home/bocchrj/anaconda3/envs/myenv/bin/python
"""win-svc-auth-validate.py: Windows Service and Auth Validator"""
# Owned
__author__ = 'Rich Bocchinfuso'
__copyright__ = 'Copyright 2021, Windows Service and Auth Validator'
__credits__ = ['Rich Bocchinfuso']
__license__ = 'MIT'
__version__ = '0.1.0'
@rbocchinfuso
rbocchinfuso / TheRealDeal.md
Last active Jul 12, 2021
CC Digital Innovation Roles, The Real Deal
View TheRealDeal.md

CC Digital Innovation Roles, The Real Deal

The Digital Innovation team has four (4) open requisitions, and we are looking for four (4) individuals possessing similar DNA. While the DNA of the four (4) individuals is similar, there are two distinct paths that I will talk to candidates about.

Path 1: DevOps Engineer focused on problem solving and automation.

  • This individual's coding experience is relevant in terms of their understanding of constructs, like conditionals, loops, arrays, etc. I am most interested in their logic and structured design skills, their passion for problem-solving, their desire to become a polyglot, and a complete disdain for brute force solutions.
  • What are some representative tasks that this individual would be performing:
    • We have a plenty of poortly written PowerShell and Python code that requires refactoring. I have already begin refactoring some of the code
      • Anything new that I/we are coding is adhering to a style that we want to refactor all legacy code to a
@rbocchinfuso
rbocchinfuso / cmd.coffee
Created Aug 24, 2018
Simple Hubot CoffeeScript to fire other local commands
View cmd.coffee
# Description:
# Runs a command on hubot
# TOTAL VIOLATION of any and all security!
#
# Commands:
# hubot cmd <command> - runs a command on hubot host
module.exports = (robot) ->
robot.respond /CMD (.*)$/i, (msg) ->
# console.log(msg)
@rbocchinfuso
rbocchinfuso / slack-curl-post.php
Created Aug 24, 2018
PHP Slack CURL Post Snippet
View slack-curl-post.php
// post message
$message = "@$username is working on $text";
$data = "payload=" . json_encode(array(
'response_type' => $response_type,
"text" => $message,
"icon_emoji" => $icon
));
@rbocchinfuso
rbocchinfuso / SlackIncidentNewNotify.js
Created Aug 24, 2018
ServiceNow New Incident Slack Notification
View SlackIncidentNewNotify.js
// 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 / SlackMessage.js
Created Aug 24, 2018
Slack Message Script Include
View SlackMessage.js
// 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 = '#tickets';
View conv2utf8.ps1
Get-ChildItem "C:\Users\gerhardl\Documents\My Received Files" -Filter *.log |
Foreach-Object {
$content = Get-Content $_.FullName
Get-Content $content | Set-Content -Encoding utf8 $content
}
@rbocchinfuso
rbocchinfuso / ipcam.py
Created Mar 21, 2018 — forked from shihyuan/ipcam.py
Stream Video with OpenCV in Python from an Android running IP Webcam
View ipcam.py
# Stream Video with OpenCV from an Android running IP Webcam (https://play.google.com/store/apps/details?id=com.pas.webcam)
# Code Adopted from http://stackoverflow.com/questions/21702477/how-to-parse-mjpeg-http-stream-from-ip-camera
import cv2
import urllib2
import numpy as np
import sys
host = "192.168.0.220:8080"
if len(sys.argv)>1:
View xsnap.pl
#!/usr/bin/perl
# ----------------------------------------------------- #
# SUMMARY:
# This script provides REST integration with EMC arrays.
#
# EXIT CODES:
# 0 --> Completed successfully
# 1 --> Invalid usage, server parameter required
# 2 --> Configuration files missing
@rbocchinfuso
rbocchinfuso / SlackIncidentEscalateNotify.js
Last active Oct 5, 2017
ServiceNow Escalate Incident Slack Notification #servicenow #slack #businessrule
View SlackIncidentEscalateNotify.js
// 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)) {