Skip to content

Instantly share code, notes, and snippets.

@mistval
mistval / hide.js
Last active October 22, 2025 03:45
TamperMonkey Hide Subs/Subtitles on HIDIVE
// ==UserScript==
// @name HIDIVE Hide Subs
// @namespace https://www.hidive.com/
// @version 2025-10-19
// @description Hides subs on HIDIVE
// @author You
// @match https://www.hidive.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=hidive.com
// @grant none
// ==/UserScript==
@mistval
mistval / convert_perms.js
Last active May 16, 2021 00:08
convert_perms.js
const Permissions = {
createInstantInvite: 1n,
kickMembers: 1n << 1n,
banMembers: 1n << 2n,
administrator: 1n << 3n,
manageChannels: 1n << 4n,
manageGuild: 1n << 5n,
addReactions: 1n << 6n,
viewAuditLog: 1n << 7n, viewAuditLogs: 1n << 7n, // [DEPRECATED]
voicePrioritySpeaker: 1n << 8n,
@mistval
mistval / gist:ce51348ade78389c15a8e3b6afe543fc
Created October 11, 2019 00:26
Use WinMerge with TortoiseSVN
Diff command: C:\Program Files (x86)\WinMerge\WinMergeU.exe -e -ub -dl %bname -dr %yname %base %mine
Merge command: C:\Program Files (x86)\WinMerge\WinMergeU.exe /e /ub /fr /wl /wm /dl %bname /dm %tname /dr %yname %base %theirs %mine /o %merged /ar

1. Integer as key

Array is ~1.5x faster

const obj = {
  0: 0,
};

const arr = [0];
@mistval
mistval / shiritori_spec.md
Last active January 27, 2018 15:40
Shiritori spec for Kotoba

Sequence

  1. Someone commands the bot to start a shiritori game.
  2. The bot notifies the channel that it is starting a Shiritori game in x seconds. The game currently has two players: the person who invoked the command, and the bot.
  3. The bot shows the first word and its reading and says whose turn is next.
  4. The next player has 30 seconds to come up with a valid next word. The bot will tell you why your answer is invalid, unless it thinks your message is chat instead of a shiritori answer, in which case it will be silent.
  5. If you don't say anything in 30 seconds, you are assumed AFK and you get removed from the game (you can rejoin). If you say something but you don't give a valid answer, then you don't get a point and it's the next person's turn.
  6. If you do come up with a valid word, the bot shows: the previous word + reading, the new word that plays off of it + its reading, and whose turn it is next. The bot is a player too and gets a turn like other players. Go back to step 4 and repeat.

When th