Skip to content

Instantly share code, notes, and snippets.

View onmax's full-sized avatar
💭
🌍

Max onmax

💭
🌍
View GitHub Profile
@onmax
onmax / mean_politecnicavirtual.js
Created July 28, 2020 13:16
Small JS script to obtain your mean grade using the UPM page
// First you need to click the button to show your grades.
// Then open the console using F12 and copy and paste the following code
const tables = document.querySelectorAll("table#tabla_expediente")
let acc = 0
let sum = 0
tables.forEach(t => {
Array.from(t.rows).forEach(r => {
const col = r.cells[r.cells.length - 1]
matches = /\((\d+\,*\d*)\)/gm.exec(col.innerText);
if(matches !== null) {
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{342e5e83-faf1-4849-b17e-a7e37aaab403}",
"profiles": {
"defaults": {
"colorScheme": "Dracula"
},
"list": [