Skip to content

Instantly share code, notes, and snippets.

View jmcker's full-sized avatar

Jack McKernan jmcker

View GitHub Profile
@jmcker
jmcker / cs-avail.sh
Last active January 17, 2019 23:38
Tool for viewing lab machine availability and active sessions.
#!/bin/bash
AUTO_LOGIN="true"
LIST_ALL="false"
VERBOSE="false"
USERNAME="${USER}"
TARGETNAME="xinu"
SEARCH_NAME=""
MIN_USER_COUNT=-1
@jmcker
jmcker / install-key.sh
Last active November 9, 2022 18:49
install-key - Generate, install, and manage SSH key rings
#!/bin/bash
RED='\033[0;31m'
YELLOW='\033[1;33m'
BLUE='\033[1;96m'
NC='\033[0m' # No color
GITHUB="false"
USERNAME=""
TARGETNAME=""
@jmcker
jmcker / javascript-ajax-get.js
Last active July 15, 2018 23:11 — forked from john-doherty/javascript-http-get.js
Simple, pure JavaScript HTTP Get function (QML, IE8+, Chrome, Safari, Firefox, PhoneGap/Cordova)
/**
* GET contents of a URL
* @access private
* @param {string} url - url to get
* @param {function} error - function to call if there is an error
* @param {function} callback - function to call if success
* @returns {void}
*/
function httpGet(url, error, callback) {
#!/bin/bash/
git clone --bare https://github.com/jmcker/.cfg.git $HOME/.cfg
function cfg {
/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@
}
mkdir -p .cfg-backup
cfg checkout