Skip to content

Instantly share code, notes, and snippets.

View Jojodicus's full-sized avatar
👾
doing stuff

Johannes Jojodicus

👾
doing stuff
View GitHub Profile
@Matoex
Matoex / prozent.js
Created December 30, 2021 16:00
Studon Punkte und Prozent berechnen
/*
Berechnet die erreichte und maximale Punktzahl (daraus auch die %) einer Übungsseite in Studon der FAU
Den Code einfach mit F12 im richtigen Tab in die Browserkonsole einfügen und enter drücken, das Ergebnis erscheint in der Konsole.
*/
erreicht = Array.from(document.querySelectorAll(".ilTag")).map(x => x.innerText).map(x=>parseFloat(x.split(" ")[1])).reduce((a,b)=>a+b)
maxSumme = Array.from(document.querySelectorAll(".ilExcAssignmentHead")).filter(x=>x.children[0].alt != "Nicht bewertet").map(x=>parseFloat(x.outerText.split("max. ")[1].split(" ")[0])).reduce((a,b)=>a+b)
console.log(erreicht + "/"+maxSumme+"="+Math.round((erreicht/maxSumme)*1000)/10 + "%")
@jzbor
jzbor / paccache_outdated.hook
Last active October 11, 2022 13:08
Pacman hooks to clean old package cache
# /etc/pacman.d/hooks/paccache_outdated.hook
[Trigger]
Operation = Upgrade
Operation = Install
Operation = Remove
Type = Package
Target = *
[Action]
Description = Cleaning pacman cache (outdated versions)
@vegaasen
vegaasen / supress-warning-idea.md
Created November 27, 2015 12:59
SuppressWarnings with IntelliJ Idea

@SuppressWarnings - IntelliJ modes

Information

This list may grow each year with either new versions or patches. Enjoy!

Usage

Following is an example related to the usage of the various ignore capabilities.

This software is licensed under the "Anyone But Richard M Stallman"
(ABRMS) license, described below. No other licenses may apply.
--------------------------------------------
The "Anyone But Richard M Stallman" license
--------------------------------------------
Do anything you want with this program, with the exceptions listed
below under "EXCEPTIONS".