Skip to content

Instantly share code, notes, and snippets.


Brian bennettscience

View GitHub Profile
bennettscience / comment.js
Created Dec 31, 2017
Push a comment to a firebase database from a static HTML page
View comment.js
$(function() {
var ref = new Firebase(""),
postRef = ref.child(window.location.pathname);
postRef.on("child_added", function(snapshot) {
var newPost = snapshot.val();
if(newPost.moderated) {
$("#comment-list").prepend('<div class="comment">' +
'<h4>' + escapeHtml( + '</h4>' +
'<div class="profile-image"><img src="' + escapeHtml(newPost.md5Email) + '?s=100&d=retro"/></div> ' +
bennettscience /
Last active Sep 30, 2020
Dynamic data validation in Apps Script
function onEdit(e) {
var row = e.range.getRow();
var col = e.range.getColumn();
// If the edited column was 2 or 3, do the next part. Ignore other changes
if(col == 2 || col == 3) {
var value = sheet.getRange(row, col).getValue();
updateList(row,col, value);
bennettscience /
Last active Sep 24, 2020
Update student email notifications as an admin in Canvas LMS
import csv
import re
import requests
import concurrent.futures
import time
# pip install tqdm for progress monitoring
from tqdm import tqdm
from functools import partial
bennettscience /
Last active Sep 11, 2020
Automating feedback forms with Google Apps Script
// Copy this script into the feedback spreadsheet TEMPLATE
/************************ OnOpen *******************************/
function onOpen(e) {
var ui = SpreadsheetApp.getUi().createMenu("Shortlink")
.addItem("Show URL and QR code", "showQrAndLink")
/************************ GLOBALS *******************************/
bennettscience /
Last active May 18, 2020
Generate a report of missing assignments for all students in a Canvas course. Returns a CSV.
from canvasapi import Canvas # pip install canvasapi
import csv
import concurrent.futures
from functools import partial
KEY = '' # Your Canvas API key
URL = '' # Your Canvas API URL
COURSE = '' # Your course ID
bennettscience /
Created Nov 17, 2017
Auto-tweet images of slides as a Google Slideshow is presented
// The rest of the backend code.
// and can be appended to this file.
// When combined, click Publish > Deploy as web app
// You can then test by visiting your app page.
// Initialize Twitter login
// See
bennettscience /
Last active Oct 31, 2019
Automatically set a programmatically-created Google Doc to the correct owner.
/*********** SETUP ***************/
// Store two global variables with columns to use as references.
// These should be zero-based because they're used in a loop.
var docIdCol = 0 // Int of col to check for a document ID
var emailCol = 0 // Int of col with submitter email address
/********** END SETUP **************/
bennettscience / studentOutcomes.user.js
Last active Sep 6, 2019
Collect and display student Outcome score averages in Canvas LMS
View studentOutcomes.user.js
// ==UserScript==
// @name Student LMG Viewer
// @namespace
// @description Show calculated Outcome socres for students in Canvas
// @author Brian Bennett
// @match https://**/grades/*
// ==/UserScript==
(function() {
'use strict';
bennettscience /
Last active Jul 22, 2019
A script to scrape The Pity Part playlist from WDBM and create a spotify playlist
import re, sys
import requests
import spotipy
import spotipy.util as util
from bs4 import BeautifulSoup
# Get the ID of the track from Spotify
def get_track_id(username, title, artist):
print("Searching for {} by {}".format(title, artist))
scope = 'playlist-modify-public'
bennettscience /
Last active Jun 13, 2019
Tecmo Bowl modding instructions with links

Apparently, Tecmo Bowl is one of the most modded games ever. Much of this information is found on the forums, along with more software.

  1. Tecmo Bowl Team Manager

Tecmo Bowl is the simplest title. Tecmo Super Bowl got a little more complex, so the editor is more complex. Personally, as I was tinkering, I enjoyed replaying the original vs Tecmo Super Bowl, but that's just me. All things aside, you need an editor.

These programs allow you to load the game file (ROM, see below) and edit team names and rosters through a desktop app. If you're on a Mac and want to run Tecmo Bowl Manager, I can send more detailed instructions, because I got that running as well.

You can’t perform that action at this time.