Skip to content

Instantly share code, notes, and snippets.

View sheodox's full-sized avatar

sheodox

View GitHub Profile
@sheodox
sheodox / infinite-number.ts
Last active November 26, 2021 00:44
An incrementable integer with infinite digits stored as an array of single digit integers because why not
import assert from 'assert';
class Digit {
// a number 0-9
value: number;
constructor(value: number) {
if (value > 9 || value < 0) {
throw new Error(`Digit value must be between 0 and 9, got ${value}`);
}
if (Math.round(value) !== value) {
@sheodox
sheodox / memrise-add-wizard.user.js
Last active May 25, 2017 02:55
Memrise Add Wizard
// ==UserScript==
// @name Memrise Add Wizard
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Wizard for adding words to a course
// @author sheodox
// @match https://www.memrise.com/course/*/edit/*
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_xmlhttpRequest
@sheodox
sheodox / memrise-edit-enhancements.user.js
Last active May 24, 2017 01:29
Memrise Editor Enhancements
// ==UserScript==
// @name Memrise Editor Enhancements
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Some convenience improvements for editing Memrise courses.
// @author sheodox
// @match https://www.memrise.com/course/*/edit/*
// @grant GM_getValue
// @grant GM_setValue
// ==/UserScript==
// ==UserScript==
// @name Jisho Hotkeys
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Hotkeys for some actions on jisho.org
// @author sheodox
// @match http://jisho.org/*
// @grant none
// ==/UserScript==
@sheodox
sheodox / betterhangouts.user.js
Created February 13, 2015 14:32
Better Hangouts
// ==UserScript==
// @name Better Hangouts
// @namespace Jake Harrington
// @description Makes Hangouts better
// @include https://plus.google.com/*/hangouts
// @version 1.0
// @run-at document-end
// @require https://code.jquery.com/jquery-1.11.2.min.js
// @require https://code.jquery.com/ui/1.11.3/jquery-ui.min.js
// @downloadURL https://gist.github.com/dbs727/e4def722691762c4c910/raw/2bf1936175459f6b6c0fefbe222f34d298234b82/betterhangouts.user.js
@sheodox
sheodox / wkrealnumbers.user.js
Last active August 29, 2015 14:15
WK Real Numbers (Fixed for Greasemonkey)
// ==UserScript==
// @name WaniKani Real Numbers
// @namespace penx.scripts
// @description Replaces 42+ with the real number using WaniKani API v1.0
// @include https://www.wanikani.com/*
// @version 2.8
// @run-at document-end
// @grant GM_registerMenuCommand
// @grant GM_setValue
// @grant GM_getValue
@sheodox
sheodox / wkoverride.user.js
Created February 7, 2015 20:26
WaniKani override, fixed for Greasemonkey
// ==UserScript==
// @name Wanikani Override
// @namespace wkoverride
// @description Adds an "Ignore Answer" button during reviews that makes WaniKani ignore the current answer (useful if, for example, you made a stupid typo)
// @include http://www.wanikani.com/review/session*
// @include https://www.wanikani.com/review/session*
// @version 1.1.3
// @author Rui Pinheiro
// @grant GM_addStyle
// @grant unsafeWindow
@sheodox
sheodox / shadowDialog.js
Created October 30, 2014 14:09
Shadow DOM dialog. Putting this here to use later as a dialog for my specific dialog needs for a dialog that won't be effected by site styling.
(function() {
var dialog = document.createElement('div'),
shadow = dialog.createShadowRoot(),
style = document.createElement('style'),
paragraph = document.createElement('p');
dialog.style.width = '500px';
dialog.style.height = '500px';
dialog.style.border = '3px solid gray';
dialog.style.position = 'fixed';
@sheodox
sheodox / automeiryo
Last active August 29, 2015 14:07
Automatically changes the font to Meiryo for the chosen domains.
// ==UserScript==
// @name Auto-Meiryo
// @namespace http://use.i.E.your.homepage/
// @version 0.1
// @description enter something useful
// @copyright 2012+, You
// ==/UserScript==
(function() {
var always = 'alwaysHost';
@sheodox
sheodox / BatchStyler.js
Last active August 29, 2015 14:06
BatchStyler
;(function(){
'use strict';
if (!window.createBatchStyler) {
window.createBatchStyler = createBatchStyler;
}
function createBatchStyler() {
var styles = {};
function createStyleText(styles) {