Skip to content

Instantly share code, notes, and snippets.

View mhglover's full-sized avatar

Matthew Harris Glover mhglover

  • Carnegie Learning, Inc
  • Pittsburgh, PA
View GitHub Profile
07ab55d4-27c4-4dce-a483-011ed6ef4a8e
1005010f7f79l
100587711mlnb
10067998tzs81
1006934210xc5
1007053djejgr
1007265yh2afk
10072695kbphh
1007354fqj06d
1007734b42u5e

Keybase proof

I hereby claim:

  • I am mhglover on github.
  • I am mhglover (https://keybase.io/mhglover) on keybase.
  • I have a public key ASCtXqyQ7YyWcml3RoPVOWZ0t13ERj0d1vyR7LWKVNEpFQo

To claim this, I am signing this object:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.19999992847442627</real>
@mhglover
mhglover / gist:c164dab0661dade9491ca770f5e9e59f
Created August 9, 2016 01:02
Roll20 Blades Sheet Worker - Correct old-skool Rep checkboxes to new-skool Rep radios
<script type="text/worker">
on("sheet:opened", function() {
// Correct old-skool Rep checkboxes to new-skool Rep radios
getAttrs(["crew_rep1",
"crew_rep2",
"crew_rep3",
"crew_rep4",
"crew_rep5",
"crew_rep6",
@mhglover
mhglover / gist:10264686
Created April 9, 2014 12:36
Keybase proof
### Keybase proof
I hereby claim:
* I am mhglover on github.
* I am mhglover (https://keybase.io/mhglover) on keybase.
* I have a public key whose fingerprint is 28AD 1C69 CCA0 2679 FB43 598B 4396 5901 5222 D42E
To claim this, I am signing this object:
@mhglover
mhglover / gist:5452615
Last active December 16, 2015 14:59
bash script for adding permissions on every table in every database on postgresql
#!/bin/bash
hostname="my.db.server.hostname.com"
user="myusername"
#get a list of all the databases
databases=`psql -wl -h $hostname | sed -n 4,/\eof/p | grep -v rows\) | grep -v template0 | grep -v template1 | grep -v ":" | awk {'print $1'}`
for database in $databases; do
#get a list of all the tables
tables=$(psql -h $hostname $database -A -t -c "SELECT table_name FROM information_schema.tables WHERE table_schema = 'public';")
@mhglover
mhglover / autoloader.sh
Last active December 13, 2018 17:25
bash script for brute-force loading and unloading tapes from a Quantum Superloader 3 via the HTML management console
#!/bin/bash
wget="/usr/local/bin/wget"
username="user"
password="pass"
IP="10.0.0.1"
#this is a file used to stash the origin slot for the tape currently in the tape drive
homefile="$SCRIPTDIR/drive-status.txt"
SCRIPTDIR=$( cd "$( dirname "$0" )" && pwd )