Skip to content

Instantly share code, notes, and snippets.

@iarigby
iarigby / init.sh
Last active August 17, 2022 07:40
initialise fresh install
echo "make sure that you have these packages installed: git tmux zsh"
if ! command -v git
then
echo "git is not installed. Install it in another tab and press any key to continue"
read confirm
fi
if ! command -v yadm
then
@iarigby
iarigby / submit-grades.js
Created November 24, 2019 15:56
submit grades to Google Classroom
// ew vars but otherwise not easy to copy paste to console while changing
var resultsListElement="DC55n"
var nameDiv="YVvGBb"
var gradeSpan="cL8LOd" // [0]
// declare const students, csv string
function main() {
const marks = parseCsv(studentsCSV)
const results = getStudents()
.filter(needsChecking)
.map(e => createResult(e, marks))
@iarigby
iarigby / download_assignments.js
Last active September 12, 2022 03:52
Download all assignments from google classroom (student work window)
/**
HOW TO USE
1. go to assignment submissions (classwork > click assignment > student work)
2. open developer console ( F12 or right click > inspect element > console in top)
3. copy and paste this code, assignments will be downloaded in 5 second intervals
NOTE: CHANGE auth_user IF NECESSARY
if you are signed in to multiple google accounts, you need to select whichever you use for classroom
(ie freeuni account). If that account is the default one, leave at 0. Otherwise, sign in to gmail with that account
and the number will be displayed in url bar (https://mail.google.com/mail/u/$number), enter that
@iarigby
iarigby / dabblet.css
Last active August 29, 2015 14:20
Untitled
html, body {
margin: 0;
padding: 0;
}
.btn-header li{
border: 1px solid grey;
color: #333;
font-family: 'Raleway', sans-serif;
font-weight: 600;