Skip to content

Instantly share code, notes, and snippets.

View SmugZombie's full-sized avatar

Ron Egli SmugZombie

View GitHub Profile
<?php
function sendmailgun($to,$toname,$mailfromname,$mailfrom,$subject,$html,$text,$tag,$replyto,$cc="",$attachments=""){
global $CONFIG;
define('MAILGUN_URL', 'https://api.mailgun.net/v3/'.$CONFIG['mailgun']['domain']);
define('MAILGUN_KEY', $CONFIG['mailgun']['apikey']);
$array_data = array(
'from'=> $mailfromname .'<'.$mailfrom.'>',
'to'=>$toname.'<'.$to.'>',
'subject'=>$subject,
#!/usr/bin/python3
import json
# Ron Egli
# v0.4.1
# Quick and dirty script used to Pull all rules that have a specific IP defined to compare against the rules of another specific IP
# aws ec2 describe-security-groups > SecGroups.json
# View in table: python3 dirtysecgroup.py | column -t -s, | less -S
with open('SecGroups.json', 'r') as reader:
SecGroups = reader.read()
#! /usr/bin/python
# sendmail.py - Utilizes Authenticated SMTP Relay to send mail
# Ron Egli - github.com/smugzombie
# Version 1.0
import smtplib
import argparse
import HTMLParser
import json
#!/bin/bash
# Randomword.sh
# Ron Egli - github.com/smugzombie
WORDFILE=/usr/share/dict/words
WORD=
VALID=0
function randomword {
RANDOM=$(date +%s%N);
# echo $RANDOM
// ==UserScript==
// @name Porkbun PriceScanner
// @namespace Github.com/Smugzombie
// @version 0.1
// @description Scans Porkbun's Domain Page for Best Priced Domains
// @author SmugZombie
// @match https://porkbun.com/checkout/search?q=*&all=1
// @grant none
// ==/UserScript==
#!/bin/bash
# Loops through the current directory looking for .mp3 files, converts them to wav files and cleans up the current directory
# Ron Egli - Github/smugzombie
# Create a place for the Originals
dir1="mp3"
dir2="wav"
if [[ ! -e $dir1 ]]; then
mkdir $dir1
@SmugZombie
SmugZombie / README.md
Created October 11, 2019 17:59 — forked from barneycarroll/README.md
Lock and unlock a page's scroll position.

jquery.scrollLock.js

Useful for when a blocking user experience is needed (in my case, didn't want people unwittingly loosing their place by scrolling while a modal required their attention): $.scrollLock() locks the body in place, preventing scroll until it is unlocked.

// Locks the page if it's currently unlocked
$.scrollLock();

// ...or vice versa
#!/bin/bash
echo
echo "# arguments called with ----> ${@} "
echo "# \$1 ----------------------> $1 "
echo "# \$2 ----------------------> $2 "
echo "# path to me ---------------> ${0} "
echo "# parent path --------------> ${0%/*} "
echo "# my name ------------------> ${0##*/} "
echo "# path to me ---------------> " $(basename $0)
@ECHO OFF
FOR /F "tokens=3 delims=: " %%H IN ('SC QUERY "ServiceName" ^| FINDSTR " STATE"') DO (
IF /I "%%H" NEQ "RUNNING" (
NET START "ServiceName"
)
)
; A system-wide mute toggle for Zoom Meetings.
$F9::
; Zoom appears not to accept ControlSend when in the background, so
; we isolate the Zoom and current windows, switch over to Zoom, send
; its own mute-toggle hotkey, and then switch back.
;
; Get the current window
WinGet, active_window, ID, A
;