Skip to content

Instantly share code, notes, and snippets.

View steadfasterX's full-sized avatar
😆
stateless but steadfast

steadfasterX steadfasterX

😆
stateless but steadfast
View GitHub Profile
@steadfasterX
steadfasterX / slack_alert.py
Last active March 20, 2020 14:52 — forked from ashishterp/slack_alert.py
Splunk Alerting to Slack
# Instructions:
# 1. Go to https://[yourdomain].slack.com/services/new
# 2. Configure a new Incoming WebHook and paste the URL below on Line 14
# 3. Copy this file into $SPLUNK_HOME$/bin/scripts
# 4. Configure your saved search to run slack_alert.py
from time import gmtime, strftime
import httplib, json
import getopt, sys, os
import subprocess
@steadfasterX
steadfasterX / autorun_on_boot.cmd
Last active March 28, 2024 08:18 — forked from LiamKarlMitchell/HideVirtualBox.bat
Hide Virtual Machine
rem Autorun script needed to run on every boot with admin perms!
rem Important: you need to use hideVBoxVM.py <name> on your VM as well, this cmd alone is not enough
@echo off
set TARGET="HPE"
@reg copy HKLM\HARDWARE\ACPI\DSDT\VBOX__ HKLM\HARDWARE\ACPI\DSDT\%TARGET%__ /s /f
@reg delete HKLM\HARDWARE\ACPI\DSDT\VBOX__ /f
@steadfasterX
steadfasterX / beautiful-failure.py
Created June 29, 2017 11:05 — forked from MatthiasWinkelmann/beautiful-failure.py
An Ansible plugin to format console output
# Save as <folder with your playbook>/callback_plugins/<some name>.py
# Optionally use no_log: True on your playbook/roles/tasks to suppress other output
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import time
import json
import sys
curl -i -u YOURUSER -X GET https://api.github.com/repos/ORG/REPO/hooks
curl -i -u YOURUSER -X PATCH https://api.github.com/repos/ORG/REPO/hooks/IRC_HOOK_ID -d "{ \"add_events\": [\"push\", \"pull_request\", \"issues\"] }"