This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Mount a DMG and output the mount point. Do not make the volume visible to | |
# the Finder. This is useful for remote software installation. | |
# Debugging | |
# set -x | |
DMG="$@" | |
TMPFILE=`mktemp /tmp/dmg.XXX` && |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
''' | |
To obtain an access token in the Canvas LMI (e.g. bcourses, uconline), | |
click own user name at top, scroll down to Approved Integrations, click New | |
# Tests with curl | |
curl https://cole2.uconline.edu/api/v1/courses/NNNNNN/users -X GET \ | |
-F "per_page=5000" -F "include[]=email" -F "enrollment_type=student" \ | |
-H "Authorization: Bearer <token>" | |
curl https://bcourses.berkeley.edu/api/v1/courses/NNNNNNN/users -X GET \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
''' | |
Download and cache SNS AID list. | |
API filter examples: | |
# last_seen_ts (returns entries where last_seen_ts >= '2015-04-09'): | |
# Note: The time stamp can be made even more precise using the format of | |
# <Date>T<hour>:<min>:<sec><TZ offset (optiona l)> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
''' | |
Convert SNS AID data to a list for ipf. | |
''' | |
import os | |
import itertools | |
import json | |
from optparse import OptionParser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
import os | |
import json | |
import requests | |
import argparse | |
def get_courses(term_id, uid, sa_filter=''): | |
'''Fetch a UID's enrollments in a specified term. Optionally filter by |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Events: | |
FirstSeen LastSeen Count From SubObjectPath Type Reason Message | |
--------- -------- ----- ---- ------------- -------- ------ ------- | |
2m 2m 1 default-scheduler Normal Scheduled Successfully assigned hub-deployment-2251915166-3r2q7 to k8s-agent-5b771e27-1 | |
1m 1m 2 controller-manager Warning FailedMount Failed to attach volume "pvc-3ec04964-3760-11e7-85c7-000d3a363479" on node "k8s-agent-5b771e27-1" with: Attach volume "tmp1cluster-dynamic-pvc-3ec04964-3760-11e7-85c7-000d3a363479.vhd" to instance "k8s-agent-5B771E27-1" failed with compute.VirtualMachinesClient#CreateOrUpdate: Failure sending request: StatusCode=200 -- Original Error: Long running operation terminated with status 'Failed': Code="AcquireDiskLeaseFailed" Message="Failed to acquire lease while creating disk 'tmp1cluster-dynamic-pvc-3ec04964-3760-11e7-85c7-000d3a363479.vhd' using blob with URI https://dg3ds7fetp2k6mstr0.blob.core.windows.net/vhds/tmp1cluster-dynamic-pvc-3ec04964-3760-11e7-85c7-000d3a363479.vhd. Blob is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
POOL_NAME="pool0" | |
MOUNT_POINT="/export/${POOL_NAME}" | |
log() { | |
# Un-comment the following if you would like to enable logging to a service | |
#curl -X POST -H "content-type:text/plain" --data-binary "${HOSTNAME} - $1" https://logs-01.loggly.com/inputs/<key>/tag/es-extension,${HOSTNAME} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Example usage: | |
# $0 -H headers.json -s compsci -c c8 | |
# $0 -H headers.json -s stat -c c100 | |
import sys | |
import os | |
import json | |
import requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Example usage: | |
# $0 -H headers.json -s compsci -c c8 | |
# $0 -H headers.json -s stat -c c100 | |
import argparse | |
import json | |
import requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# vim: set et sw=4 ts=4: | |
# Given a listen of courses, where each has a term, department, & course number: | |
# - fetch the course roster from sis | |
# - replace members of the calgroup roster with those from the sis | |
# Requires SIS and CalGroups API secrets. | |
# CalGroups API |
OlderNewer