Skip to content

Instantly share code, notes, and snippets.

View jayu's full-sized avatar
😁

Jakub Mazurek jayu

😁
View GitHub Profile
@OrionReed
OrionReed / dom3d.js
Last active June 29, 2024 20:23
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@zablotski
zablotski / sredniaWazonaPwr.js
Last active March 2, 2023 17:15
Skrypt obliczjący średnią ważoną w systemie https://jsos.pwr.edu.pl. Skrypt automatycznie usuwa wpisy z oceną 2.0. Aby obliczyć należy wcisnąć F12 w przeglądarce, otworzyć wkładkę Console i wstawić skrypt. Następnie wcisnąć Enter.
$('td:contains("2.0")').parent().remove(); //usunięcie wpisów z oceną 2
var sum=0; //suma ECTS
var mulSum=0; // suma ECTS * ocena
$('td[title="ocena"]').each(function(){
mulSum += parseFloat($(this).text()) * parseFloat($(this).next().next().text());
sum += parseFloat($(this).next().next().text());
console.log(parseFloat($(this).text()), parseFloat($(this).next().next().text()));
});
console.log(mulSum, sum, mulSum/sum);