Skip to content

Instantly share code, notes, and snippets.

View bng44270's full-sized avatar

Andy Carlson bng44270

View GitHub Profile
@bng44270
bng44270 / typer.py
Last active April 22, 2023 03:25
Wrapper for xdotool used for simulating key strokes
########################################
# Typer - Wrapper for xdotool key stroke functionality
#
# Usage:
#
# Create Typer instance
#
# k = Typer()
#
# Create Typer instance with custom X windows display name
@bng44270
bng44270 / json2cbor.sh
Created February 3, 2023 21:41
Encode JSON data as CBOR
#!/bin/bash
##############################################################
#
# Encode JSON data provided via stdin as CBOR (uses cbor.me)
#
# Usage:
#
# <json-text-data-output> | json2cbor.sh
#
@bng44270
bng44270 / gist2txt.py
Created February 1, 2023 17:17
Download Gist information as tab-delimited text
######################################################
#
# Downloads information about a Github users Gists as a tab-delimited text file
#
# Requires arguments.py (https://gist.github.com/bng44270/871cb48d3516b6f5a1bca405959a4674)
#
# Usage:
#
# gist2txt.py -u <username> -f <output-txt-file>
#
@bng44270
bng44270 / img2mp4.sh
Created January 30, 2023 17:18
Create MP4 video file from a collection of image files
#!/bin/bash
#################################################
#
# Create MP4 video file from a collection of image files
#
# Image files are combined sequentially based on the
# modified timestamp of the image files.
#
# Usage:
@bng44270
bng44270 / sqliteconn.py
Last active February 24, 2023 16:14
(Another) Quick and Dirty Wrapper for SQLite Library
#########################################
# (Another) Quick and Dirty Wrapper for SQLite Library
#
# Usage:
#
# # Add additional PRAGMA commands to the second argument array
# mydb = SqliteConn('/path/to/file.db',['foreign_key = ON'])
#
# # Run any SQL query (returns same as the fetchall command)
# mydb.Run('SELECT * FROM table_name;')
@bng44270
bng44270 / datadef.js
Created December 6, 2022 21:40
Create a schema-enforced data structure based on the Array object
/*
DataDef - Create a schema-enforced data structure based on the Array object
Usage:
//Available data types: string, number, boolean
var people = new DataDef({
name:'string',
age:'number',
@bng44270
bng44270 / ifttt.js
Last active December 1, 2022 17:25
Call IFTTT Webhooks from JavaScript
/*
JsIFTTT
Call IFTTT Webhooks from JavaScript (for Google Script use https://gist.github.com/bng44270/d282f5a776b59486f98d2de60f2725d4)
Requires webrequest.js (https://gist.github.com/bng44270/61122a1947591d50004fcd9ee72d643d)
Usage:
@bng44270
bng44270 / ifttt.gs
Last active April 10, 2023 12:13
Call IFTTT Webhooks from Google Scripts
/*
GsIFTTT
Call IFTTT Webhooks from Google Scripts
Setup:
Add a Script Property to your project named "ifttt_key" to store your IFTTT API Key
@bng44270
bng44270 / configfile.inc.sh
Last active November 28, 2022 21:04
Parse config files in Bash
##################################################
#
# Read text-based config files
#
# File Format:
#
# <Parameter Name><WHITESPACE><Parameter Value>
#
# File Sample (config.txt):
#
@bng44270
bng44270 / snupdateset.ps1
Created November 24, 2022 00:08
Browse ServiceNow Update Set XML files
###################################
#
# Analyze ServiceNow Update Sets
#
# Usage:
#
# Get Information on Parent Update Set
#
# Get-SNUpdateSet -File /path/to/update_set.xml
#