Skip to content

Instantly share code, notes, and snippets.

View oerpli's full-sized avatar
🐱
:octocat:

Abraham Hinteregger oerpli

🐱
:octocat:
View GitHub Profile
@oerpli
oerpli / LEC.clp
Last active August 29, 2015 14:20
LEC Clips
(deftemplate person
(slot name)
(slot age)
(slot cantpay
(allowed-symbols yes no)
(default yes))
(slot job
(default unemployed)))
(deftemplate parent
@oerpli
oerpli / HideEmptyModules.user.js
Last active October 25, 2017 16:37
Userscript that removes empty modules from the record of examinations ("Prüfungspass") on uspace.univie. To toggle empty modules expand your curriculum and then press the button on the top. Installation: Get greasemonkey (FF)or tampermonkey (Chrome), then click on the raw button here and confirm. IE/Edge/Safari users are sol.
// ==UserScript==
// @name ModuleHider
// @namespace hem
// @description hides empty modules in the uspace overview
// @match https://uspace.univie.ac.at/web/studierende/pruefungspass*
// @include https://uspace.univie.ac.at/de/web/studierende/pruefungspass*
// @include https://uspace.univie.ac.at/en/web/studierende/pruefungspass*
// @author oerpli
// @version 1.2
// @grant none
@oerpli
oerpli / unfucklastfm.user.js
Last active August 3, 2016 13:53
Changes title - artist back to artist - title on user pages. deprecated as of 24.9.15 as lastfm switched it back. use this addon to make it title - artist now.
// ==UserScript==
// @name unfucklastfm
// @namespace uflfm
// @description change artist and title
// @include http://www.last.fm/*/user/*
// @include http://www.last.fm/user*
// @author oerpli
// @version 1.2
// @grant none
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js
std::binomial_distribution<int> binomV(verticecount,1.0/verticecount)
int count = binomV(gen);
for(int i = 0; i < count;i++){
//swap
}
@oerpli
oerpli / test.fs
Last active December 15, 2015 22:11
: rl s" test.fs" included ;
: arrange { a b c d a1 b1 c1 d1 -- n n }
a a1 b b1 c c1 d d1 ;
: neg ( n -- n)
0 swap - ;
: checkEqual { a b c d a1 b1 c1 d1 -- n }
a a1 =
b b1 =
@oerpli
oerpli / Mastermind.fs
Last active December 17, 2015 23:42
A primitive mastermind implementation in Forth. Now available here: https://github.com/oerpli/ForthMastermind
: rl s" Mastermind.fs" included ;
\ Usage:
\ >n cg
\ generates the n-th possible solution in the given system (depending on base and fields)
\ >[guess] sol!
\ defines the correct solution
\ >[guess] chk
\ checks the guess - outputs the number of correct positions and colors
\ >[guess] [guess] check
\ outputs the number of matching positions and colors
// ==UserScript==
// @name UFindTitleFixer
// @namespace uftf
// @description Displays name of lecture/whatever in the title
// @include https://ufind.univie.ac.at/*/course.html*
// @include https://ufind.univie.ac.at/*/person.html*
// @include https://ufind.univie.ac.at/*/pvz_sub.html*
// @include https://ufind.univie.ac.at/*/vvz_sub.html*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @require https://greasyfork.org/scripts/6250-waitforkeyelements/code/waitForKeyElements.js?version=23756
@oerpli
oerpli / ArithmeticHierarchy.tex
Created September 28, 2016 23:56
TikZ graphic for arithmetic hierarchy
\documentclass{standalone}
\usepackage{amsmath}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[node distance=2cm,semithick,-latex]
\node(1){$\Delta_1^0$};
\node(1a)[above right of=1]{$\Sigma_1^0$};
\node(1b)[below right of=1]{$\Pi_1^0$};
// ==UserScript==
// @name ProjEulerProgress
// @namespace pep
// @description Displays progress
// @include https://projecteuler.net/progress*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @author oerpli
// @version 1.2
// @grant none
// ==/UserScript==
// ==UserScript==
// @name CampusFixer
// @namespace uftf
// @description Displays name of lecture/whatever in the title
// @include http://campusinterview.ch/de/interview/firmen/*
// @author oerpli
// @version 1.0
// @grant none
// ==/UserScript==
$(".highlight-red").parent().parent().toggle()