Skip to content

Instantly share code, notes, and snippets.

View bng44270's full-sized avatar

Andy Carlson bng44270

View GitHub Profile
@bng44270
bng44270 / dcstones.json
Last active October 16, 2023 02:38
Washington, DC Boundary Stone locations in GeoJSON format
View dcstones.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bng44270
bng44270 / jsonfs.ps1
Last active May 12, 2023 13:55
Create JsonFS File from Directory in PowerShell
View jsonfs.ps1
##################################
#
# Create JsonFS File from Directory in PowerShell
#
# Usage:
#
# New-JsonFSFile -Path <directory-path> -File <target-JSON-file> [-Unicode $True]
#
# If the -Unicode option is omitted text files will be encoded ASCII values
#
@bng44270
bng44270 / callguard.gs
Created April 14, 2023 15:55
Add phone numbers found in Gmail e-mails to a Google single contact
View callguard.gs
/*
Add phone numbers found in Gmail e-mails to a Google single contact
Usage:
1. Create a contact (use an purposely invalid e-mail address) i.e. sender-emails@myaccount
2. Include this script in your project
@bng44270
bng44270 / githubfile.gs
Last active June 14, 2023 14:37
Update Files using Github API from Google Script
View githubfile.gs
/*
Update Files using Github API from Google Script
Installation:
1) Add file to the top of the list in App Script project
2) Add the following script properties to App Script project:
github_user -> will contain the username of the commit user
@bng44270
bng44270 / githubfile.js
Last active April 6, 2023 15:21
Update Repository Files using Github API
View githubfile.js
/*
Update Repository Files using Github API
Requires webrequest.js (https://gist.github.com/bng44270/61122a1947591d50004fcd9ee72d643d)
Usage:
var gh = new GithubFile('API-TOKEN','USERNAME','EMAIL-ADDRESS');
var prFile = gh.getFile('REPOSITORY','FILE-PATH');
@bng44270
bng44270 / xsdispinfo.c
Created March 29, 2023 15:50
Show X Windows Display Information with easily parsable output
View xsdispinfo.c
/*
Show X Windows Display Information
Compiling Note:
Requires X11 headers
gcc <options> xdispinfo.c -lX11
@bng44270
bng44270 / xnest.sh
Created March 22, 2023 19:43
Launch nested X windows session
View xnest.sh
#!/bin/bash
##################################
#
# Launch nested X windows session
#
# Usage:
#
# 1) Determine window manager executable (i.e. wmaker)
#
@bng44270
bng44270 / callhandler.gs
Created March 21, 2023 00:00
Streamline the creation of API Endpoints on Google Script
View callhandler.gs
/*
Streamline the creation of API Endpoints on Google Script
Usage:
1. Create a new App Script project.
2. Create a new script file, paste this code into it, and save it.
NOTE: Make sure the new callhandler script file is at the top of the file list
@bng44270
bng44270 / radio-gui.sh
Created March 6, 2023 21:08
Internet Radio Station Player (GUI)
View radio-gui.sh
#!/bin/bash
###################################
#
# Radio Player (GUI)
#
# Requires zenity
#
# Usage:
#
@bng44270
bng44270 / ipcalc.sh
Last active March 2, 2023 14:01
Calculate IP Network Scheme
View ipcalc.sh
#!/bin/bash
#######################################################
#
# Calculate IP Network Scheme
#
# Usage:
#
# ipcalc.sh <cidr-notation>
#