Skip to content

Instantly share code, notes, and snippets.

View slashinfty's full-sized avatar

Matt Braddock slashinfty

View GitHub Profile
\documentclass[t]{beamer}
\usepackage[utf8]{inputenc}
\usecolortheme{seahorse}
\usetheme{Rochester}
\usefonttheme{structuresmallcapsserif}
\beamertemplatenavigationsymbolsempty
\begin{document}
\begin{frame}
\frametitle{Monday\,-\,\today}
\begin{columns}
@slashinfty
slashinfty / fromSGB-toSGB
Last active July 21, 2020 15:09
Nightbot commands for SGB time conversion
Suggested command name: !fromSGB
Command:
$(eval const timeToMS=b=>{let c=b.split(":").reverse(),a=1e3*parseFloat(c[0]);return 1<c.length&&(a+=6e4*parseInt(c[1])),2<c.length&&(a+=36e5*parseInt(c[2])),a},msToTime=a=>{let b=Math.floor(a/36e5%24),c=Math.floor(a/6e4%60);c=10<c?c+":":0===c?"":"0"+c+":";let d=Math.floor(a/1e3%60);d=10>d?"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<c.length&&(a+=6e4*parseInt(c[1])),2<c.length&&(a+=36e5*parseInt(c[2])),a},msToTime=a=>{let b=Math.floor(a/36e5%24),c=Math.floor(a/6e4%60);c=10<c?c+":":0===c?"":"0"+c+":";let d=Math.floor(a/1e3%60);d=10>d?"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
@slashinfty
slashinfty / .profile
Last active July 27, 2020 12:23
Verifying runs
# 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
@slashinfty
slashinfty / index.js
Created July 26, 2020 03:21
Mobile Speedrunning Bot
//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);
@slashinfty
slashinfty / Meet_Attendance.md
Last active February 26, 2024 04:32
How to easily take attendance from Google Meets

Google Meet Attendance Made Easier

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

Google Sheets

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

@slashinfty
slashinfty / delta-math-cheats.md
Last active September 29, 2020 18:41
Getting information out of DeltaMath

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).

@slashinfty
slashinfty / primetimer.html
Last active October 6, 2020 16:24
Prime factorization speedrunning timer
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Prime Timer</title>
<style>
@font-face {
font-family: 'Latin Modern Roman';
font-weight: normal;
font-style: normal;
@slashinfty
slashinfty / race-timer.html
Created November 1, 2020 22:32
A simple timer for racing
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Race Timer</title>
<link href="https://fonts.googleapis.com/css2?family=Major+Mono+Display&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Major Mono Display', monospace;
background-color: black;
const input = [1,0,0,3,1,1,2,3,1,3,4,3,1,5,0,3,2,9,1,19,1,9,19,23,1,23,5,27,2,27,10,31,1,6,31,35,1,6,35,39,2,9,39,43,1,6,43,47,1,47,5,51,1,51,13,55,1,55,13,59,1,59,5,63,2,63,6,67,1,5,67,71,1,71,13,75,1,10,75,79,2,79,6,83,2,9,83,87,1,5,87,91,1,91,5,95,2,9,95,99,1,6,99,103,1,9,103,107,2,9,107,111,1,111,6,115,2,9,115,119,1,119,6,123,1,123,9,127,2,127,13,131,1,131,9,135,1,10,135,139,2,139,10,143,1,143,5,147,2,147,6,151,1,151,5,155,1,2,155,159,1,6,159,0,99,2,0,14,0];
const a = [...input];
a[1] = 12;
a[2] = 2;
let i = 0;
do {
if (a[i] === 1) a[a[i + 3]] = a[a[i + 1]] + a[a[i + 2]];
else if (a[i] === 2) a[a[i + 3]] = a[a[i + 1]] * a[a[i + 2]];
@slashinfty
slashinfty / index.css
Created April 18, 2021 12:14
Fake LiveSplit w/ max 10 splits (requires Skeleton CSS Boilerplate from http://getskeleton.com/)
body {
width: 600px;
background-color: #F1F1D4;
}
#timer {
font-size: 100px;
text-align: right;
margin-top: -35px;
}