Skip to content

Instantly share code, notes, and snippets.

@ulternate
ulternate / dedOrNotJellyfin.js
Last active January 23, 2024 03:15
How many of the top billed cast are dead?
// This is a silly little project created after a friend mentioned a movie and I saw
// that most of the cast photos were black and white. That got me thinking, how many
// of the top billed cast are still alive? Or how many are now dead?
//
// This will use the TMDB API to get the cast list for the movie/tv show
// and then if they're dead, it'll display that.
//
// This is untested, written in little time instead of focussing on other things I should be doing.
//
// No warranty provided. Feel free to do with this what you want.
@ulternate
ulternate / tweakBitbucket.js
Last active February 9, 2022 03:36
Tweak bitbucket comments bookmarklet
javascript:(function() { const editorWrapper = document.getElementsByClassName('ak-editor-content-area')[0]; const editor = editorWrapper.querySelectorAll('[contenteditable="true"]')[0]; const existingText = editor.textContent; const charArray = [...existingText]; const newCharArray = []; charArray.forEach((char) => { if (/[a-zA-Z]/.test(char)) { newCharArray.push(`:regional_indicator_${char.toLowerCase()}:`) } else if (/[0-9#]|10/.test(char))%20{%20switch%20(char.toLowerCase())%20{%20case%20'0':%20newCharArray.push(':zero:');%20break;%20case%20'1':%20newCharArray.push(':one:');%20break;%20case%20'2':%20newCharArray.push(':two:');%20break;%20case%20'3':%20newCharArray.push(':three:');%20break;%20case%20'4':%20newCharArray.push(':four:');%20break;%20case%20'5':%20newCharArray.push(':five:');%20break;%20case%20'6':%20newCharArray.push(':six:');%20break;%20case%20'7':%20newCharArray.push(':seven:');%20break;%20case%20'8':%20newCharArray.push(':eight:');%20break;%20case%20'9':%20newCharArray.push(':nine:');%20bre
@ulternate
ulternate / commentChanger.js
Created February 10, 2020 04:38
Convert text to emoji in open Bitbucket editor.
// Use as a bookmarklet by saving a bookmark with `javascript:${codeBelow}`.
// Will change all characters from `a` to `:regional_indicator_a` in an open Bitbucket editor.
// [a-zA-Z0-9#] supported.
// Working in the bitbucket editor at the time this gist was created (10/02/2020).
(function() {
'use strict';
// Get the open editor.
const editorWrapper = document.getElementsByClassName('ak-editor-content-area')[0];
const editor = editorWrapper.querySelectorAll('[contenteditable="true"]')[0];

Keybase proof

I hereby claim:

  • I am ulternate on github.
  • I am ulternate (https://keybase.io/ulternate) on keybase.
  • I have a public key ASBE4_lACy-uzugenMrqVAh8JArcCUuxIgBJSjFpDEm0Ywo

To claim this, I am signing this object: