Skip to content

Instantly share code, notes, and snippets.

@szyminson
szyminson / jsos_avg.js
Last active January 21, 2022 21:21
Paste it to js console while visiting jsos marks page and run calc_avg()
function calc_avg() {
var mark_ects_sum = 0;
var ects_sum = 0;
jQuery('td[title=ocena]').each(function () {
var mark = parseFloat(jQuery(this).text().replace(' (E)',''));
var ects = parseInt(jQuery(this).next('td').next('td').text());
if(isNumber(mark) && isNumber(ects)) {
mark_ects_sum += mark*ects;
ects_sum += ects;

Keybase proof

I hereby claim:

  • I am szyminson on github.

  • I am szyminson (https://keybase.io/szyminson) on keybase.

  • I have a public key ASD3PDv3Ze2slA25vnF_uUDwG0iy__75SCLkEgHocVeGrQo

zstyle ':completion:*' list-colors "${(@s.:.)LS_COLORS}"
autoload -Uz compinit
compinit
@szyminson
szyminson / git-remove-forever.sh
Last active October 29, 2019 13:20 — forked from wdalmut/git-remove-forever.sh
Remove files and folders from your git repo and it's history in an easy way!
#!/bin/bash
set -o errexit
# Author: David Underhill
# Script to permanently delete files/folders from your git repository. To use
# it, cd to your repository's root and then run the script with a list of paths
# you want to delete, e.g., git-delete-history path1 path2
if [ $# -eq 0 ]; then
exit 0