Skip to content

Instantly share code, notes, and snippets.

@kaeverens
kaeverens / gist:0cbcb18247d29d4bb173fdaab144bfcf
Last active April 22, 2022 16:15
tampermonkey script for music.youtube.com
// ==UserScript==
// @name Remove music.youtube.com popup reminders
// @namespace http://tampermonkey.net/
// @version 4
// @description removes the "are you still there?" annoyances
// @author You
// @match https://music.youtube.com/*
// @grant none
// ==/UserScript==
@kaeverens
kaeverens / gist:edf8f2c928dd8c0c2732b3117d351360
Last active October 7, 2020 19:18
script to play DecisionProblem's Paperclip game. stick into web inspector, then call makeDecision() to start it going
// https://www.decisionproblem.com/paperclips/index2.html
function makeDecision() {
var pp_step=window.pp_step||0;
clipClick(1);
var lastUnsold=window.lastUnsold||0, qtot=0;
if (unsoldClips>avgSales*2.1 && margin>0.01 && unsoldClips>lastUnsold) lowerPrice();
else if (unsoldClips<avgSales*2 && unsoldClips<=lastUnsold) raisePrice();
window.lastUnsold=unsoldClips;
if (!btnMakeClipper.disabled && funds>clipperCost+wireCost && document.querySelector('#megaClipperDiv').style.display=='none') makeClipper();
if (!btnMakeMegaClipper.disabled && funds>megaClipperCost+wireCost) makeMegaClipper();
@kaeverens
kaeverens / gist:82d4d1edf105ebc6c52d8ed8dbcbe4a3
Created May 24, 2020 08:51
script to play Kevin Lyda's 2048 game version
GameManager.prototype.actuateOld = GameManager.prototype.actuate;
GameManager.prototype.actuate = function() {
this.actuateOld();
var lowest= 0;
this.grid.eachCell(function(x, y, tile) {
if (tile && tile.value) lowest= lowest? Math.min(lowest, tile.value) : tile.value;
});
var dirBest = 0, dirGood=0;
for (var i = 0; i < this.grid.size; ++i) {
var c = [], dirHoriz=Math.random()>=0.5?1:3;