Skip to content

Instantly share code, notes, and snippets.

View empiricalthought's full-sized avatar
🎵

Steven Huwig empiricalthought

🎵
View GitHub Profile
@conleym
conleym / jd.sql
Created November 8, 2019 04:51
awful query
-- Park cursor here on Line 1, hit RUN button
-- To covert from selectable to runtime, mass substitute 23192 or similar valid canvas_id for a course instead of :course
-- Engagement for Snapshot:
-- Run in 2 sections...select and run from line 314 up first, then remainder
-- Tables labeled with my initials had to be made in the public schema because I am read-only to Redshift.
-- They are temporary tables and drop at the close of session.
-- Engagement Score represents the computed_final_score (final course grade, 0 - 100) we would predict if using Engagement relative to the atomic section cohort as the sole predictor.
-- Per https://github.com/unizin/snapshot/wiki/Using-Canvas-Data-for-Snapshot#4-engagement-charts :
@empiricalthought
empiricalthought / mfa_wrap.sh
Created June 7, 2017 16:22
Bash function to automate MFA for interactive awscli usage
# To use this wrapper,
# $ . ./mfa_wrap.sh
# $ mfa_wrap 123456 'aws s3 ls'
mfa_wrap() {
MFA_TOKEN="$1"
shift
SHELL_CMD=$(aws sts get-session-token \
--serial-number="${AWS_MFA_SERIAL?AWS_MFA_SERIAL must be set}" \
--token-code=${MFA_TOKEN} \