Skip to content

Instantly share code, notes, and snippets.

View Oisann's full-sized avatar

Jonas Myhr Refseth Oisann

View GitHub Profile
@Oisann
Oisann / OddshotBot.user.js
Last active August 27, 2015 17:33
Moves OddshotBot's comment to the top of the comment list on reddit threads
// ==UserScript==
// @name OddshotBot
// @namespace https://www.oisann.net/
// @version 1.1
// @description Moves OddshotBot's comment to the top of the comment list on reddit threads
// @author Oisann, Kebabpizza
// @match http*://*.reddit.com/r/*/comments/*
// @grant none
// ==/UserScript==
@Oisann
Oisann / steampin.user.js
Last active August 31, 2015 23:04
Automatically enters Steam pin.
// ==UserScript==
// @name Steam PIN
// @namespace https://www.oisann.net/
// @version 1.0
// @description I'm lazy. No PIN please!
// @author Oisann
// @match http*://*.steampowered.com/*
// @grant none
// ==/UserScript==
@Oisann
Oisann / osrshiscoresmod.user.js
Created March 29, 2017 15:20
A short script that cleans up the Old School RuneScape HiScores list.
// ==UserScript==
// @name OSRS HiScores Mod
// @namespace https://www.reddit.com/u/Oisann
// @version 1.0
// @description Cleans up the OSRS HiScores list
// @author Oisann
// @match http*://services.runescape.com/m=hiscore_oldschool*/overall.ws*
// @grant none
// ==/UserScript==
@Oisann
Oisann / KomplettPPG.user.js
Last active January 1, 2018 15:22
Shows the price per Gigabyte on storage media on Komplett.no
// ==UserScript==
// @name KomplettPPG
// @namespace https://www.oisann.net/
// @version 1.4
// @description Shows the price per Gigabyte on storage media on Komplett.no
// @author Oisann
// @match https://www.komplett.no/*
// @grant none
// ==/UserScript==
@Oisann
Oisann / Hotkeys.cs
Created November 24, 2017 13:20
Shortcut on windows: ctrl + alt + o
using UnityEditor;
using UnityEngine;
namespace Oisann.Editor {
public class Hotkeys : MonoBehaviour {
[MenuItem("Assets/Open C# Project %&O")]
private static void OpenProject() {
EditorApplication.ExecuteMenuItem("Assets/Open C# Project");
}
}
public static float dist(float x1, float y1, float x2, float y2) {
return (float) Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
}
public static float getRayCast(float p0_x, float p0_y, float p1_x, float p1_y, float p2_x, float p2_y, float p3_x, float p3_y) {
float s1_x, s1_y, s2_x, s2_y;
s1_x = p1_x - p0_x;
s1_y = p1_y - p0_y;
s2_x = p3_x - p2_x;
@Oisann
Oisann / ShouldThisNameUseSAfterApostrophe.swift
Last active April 9, 2018 08:29
Should This Name Use S After Apostrophe????
class ShouldThisNameUseSAfterApostrophe {
func check(_ name: String) -> String {
return name.lowercased().last == "s" ? "" : "s"
}
}
extension String {
func toPossesive() -> String {
let stnusaa = ShouldThisNameUseSAfterApostrophe()
return "\(self)'\(stnusaa.check(self))"
// ==UserScript==
// @name Bugsnag-Metrics
// @namespace https://oisann.net/
// @version 0.5
// @description GB
// @author Oisann
// @match http*://app.bugsnag.com/*
// @grant none
// ==/UserScript==
@Oisann
Oisann / digitalocean-profile-name-fix.user.js
Created May 1, 2018 22:08
DigitalOcean Profile Name Fix - Fixes the layout if your name is too big.
// ==UserScript==
// @name DigitalOcean Profile Name Fix
// @namespace https://oisann.net/
// @version 0.1
// @description Fixes the layout if your name is too big.
// @author Oisann
// @match http*://cloud.digitalocean.com/settings/profile*
// @grant none
// ==/UserScript==
@Oisann
Oisann / settings.vscode.json
Created July 5, 2018 21:03
My personal settings for Visual Studio Code
{
"editor.codeLens": false,
"files.eol": "\n",
"workbench.colorTheme": "Material Theme Ocean High Contrast",
"workbench.iconTheme": "eq-material-theme-icons",
"window.titleBarStyle": "custom"
}