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 / ImageZoom.user.js
Last active June 18, 2017 14:15
Image Zoom
// ==UserScript==
// @name WheelZoom
// @namespace http://oerpli.github.io/
// @version 0.1
// @description Right Click + Mouse wheel to change image size, Right Click + Middle Click to reset current image
// @author oerpli
// @match http://*/*
// @match https://*/*
// @grant none
// @require http://code.jquery.com/jquery-3.2.1.slim.min.js
\documentclass{standalone}
\usepackage[usenames,dvipsnames,table]{xcolor} % Allows the definition and use of colors. This package has to be included before tikz.
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{float}
\usepackage{lmodern} % Use an extension of the original Computer Modern font to minimize the use of bitmapped letters.
\usepackage[T1]{fontenc} % Determines font encoding of the output. Font packages have to be included before this line.
\usepackage[utf8]{inputenc} % Determines encoding of the input. All input files have to use UTF8 encoding.
\usepackage{graphicx}
// ==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()
// ==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==
@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 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 / 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
@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 =
std::binomial_distribution<int> binomV(verticecount,1.0/verticecount)
int count = binomV(gen);
for(int i = 0; i < count;i++){
//swap
}
@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