{{ message }}

Instantly share code, notes, and snippets.

Last active Oct 6, 2020
Prime factorization speedrunning timer
View primetimer.html
 Prime Timer
Last active Sep 29, 2020
Getting information out of DeltaMath
View delta-math-cheats.md

Student History on a Skill

Create a bookmark in Chrome, name it what you want, and put the following for the page:

javascript:(function(){const a=[...document.querySelectorAll("tr:not(.flatly-table-header)")];let s="";a.forEach((e,t)=>{let n=e.children,i=n[n.length-1].children,l="";for(let e=0;e<i.length;e++){if(i[e].classList.contains("fa-times"))l+="X";else if(i[e].classList.contains("fa-check"))l+="O";else if(i[e].classList.contains("fa-film"))continue;e+1!=i.length&&(l+=",")}""===l&&(l="none"),s+=n[1].innerText+", "+n[0].innerText+" - "+n[2].innerText+" - Record: "+n[4].innerText+" - History: "+l,t+1!=a.length&&(s+="\n")}),navigator.clipboard.writeText(s).then(()=>alert("Text copied to clipboard!"));})();


When you click it, a list will be copied to your clipboard. Paste it in a document to see the results. It will give you student name, period, record, and history (O means check).

Last active Sep 8, 2020
How to easily take attendance from Google Meets
View Meet_Attendance.md

How are most things made easier? Usually by doing some work ahead of time.

First thing to do is to have a spreadsheet for attendance. I suggest making a copy of this spreadsheet.

You need to get a list of your students. The easiest way to do this is to go into Canvas gradebook, and select Actions -> Export. It will download a .csv file. In your Google Sheet, select File -> Import, then Upload, and select the file from Canvas. In the resulting dialog, change the first option (Import Location) to Insert New Sheet(s).

In order to get names alphabetized within sections, we have to do a bit of work. Delete the first two rows (they are unnecessary headers) and create a column to the right of student names (names should be in the A column, and the B column should be blank). First, sort by the A column (names), then sort by the F column (sect

Created Jul 26, 2020
Mobile Speedrunning Bot
View index.js
 //dependencies: discord.js, node-fetch, dotenv const fs = require('fs'); const Discord = require('discord.js'); const fetch = require('node-fetch'); const path = require('path'); require('dotenv').config(); const client = new Discord.Client(); client.login(process.env.TOKEN);
Last active Jul 27, 2020
Verifying runs
View .profile
 # must hanve youtube-dl streamlink ffmpeg bc # these specific commands also have the IBMPlexMono-Regular.ttf text file in the /hdd/verification/ folder ## edit all commands as necessary alias yt-dl='yt-frames' # must pass youtube video slug function yt-frames() { cd /hdd/verification/ rm -f temp_frames.mp4
Last active Jul 21, 2020
Nightbot commands for SGB time conversion
View fromSGB-toSGB
 Suggested command name: !fromSGB Command: $(eval const timeToMS=b=>{let c=b.split(":").reverse(),a=1e3*parseFloat(c[0]);return 1{let b=Math.floor(a/36e5%24),c=Math.floor(a/6e4%60);c=10d?"0"+d:d;let e=Math.trunc(a%1e3);return b=0===b?"":b+":",e=0==e?"":"."+e,b+c+d+e};msToTime(4295454*timeToMS("$(1)")/4194304);) To add: !commands add !fromSGB $(eval const timeToMS=b=>{let c=b.split(":").reverse(),a=1e3*parseFloat(c[0]);return 1{let b=Math.floor(a/36e5%24),c=Math.floor(a/6e4%60);c=10d?"0"+d:d;let e=Math.trunc(a%1e3);return b=0===b?"":b+":",e=0==e?"":"."+e,b+c+d+e};msToTime(4295454*timeToMS("$(1)")/4194304);) To edit: !commands edit !fromSGB $(eval const timeToMS=b=>{let c=b.split(":").reverse(),a=1e3*parseFloat(c[0]);retu Last active Jun 29, 2020 View board.tex  \documentclass[t]{beamer} \usepackage[utf8]{inputenc} \usecolortheme{seahorse} \usetheme{Rochester} \usefonttheme{structuresmallcapsserif} \beamertemplatenavigationsymbolsempty \begin{document} \begin{frame} \frametitle{Monday\,-\,\today} \begin{columns} Created May 26, 2020 View sml2tiles.lua  local i = 0 local cx = 0 local cy = 0 local p1_cx = 0 local p1_cy = 0 local p2_cx = 0 local p2_cy = 0 local drawn = 0 function drawTile(x, y) Last active Jun 1, 2020 Are you in a racetime.gg race? (node.js) View racetime.js  const fetch = require('node-fetch'); module.exports = { getLink: async function(client, channel) { const siteRoot = 'https://racetime.gg'; const raceSearch = await fetch(${siteRoot}/races/data); const races = await raceSearch.json(); if (races.races.length === 0) client.say(channel, 'No active races'); else { let foundRace = null;
Last active Apr 21, 2020
Get a list of users who have sent a chat message in a Google Meet
View copy-meet-chat.js
 // To run (in Chrome): // MUST HAVE GOOGLE MEET CHAT VISIBLE! // Press F12 to open Developer Tools // Click the "Console" tab // Copy and paste the code below function copyToClipboard(str) { var tempInput = document.createElement("input"); tempInput.style = "position: absolute; left: -1000px; top: -1000px"; tempInput.value = str;
You can’t perform that action at this time.