Skip to content

Instantly share code, notes, and snippets.

View Hans5958's full-sized avatar
🏫
Uni and uni and uni and... (limited availability!)

Hans5958 Hans5958

🏫
Uni and uni and uni and... (limited availability!)
View GitHub Profile
@Hans5958
Hans5958 / Simulated Live Concept.js
Created March 27, 2025 04:33
A concept/prototype to simulate a real-time video/live stream from a static video using an Invidious embed. Try it by opening the embed URL and running the script.
// Try it on https://inv.nadeko.net/embed/JRMOMjCoR58
function getTime() {
const date = new Date()
return (date.getMilliseconds() / 1000) + date.getSeconds() + date.getMinutes() * 60
}
var toSync = true
player.on(['canplay'], e => {
if (Math.abs(player.currentTime() - getTime()) > 0.1) {
player.currentTime(getTime())
@Hans5958
Hans5958 / Tamawashi QS filter list.txt
Created March 14, 2025 16:17
Quick filter list to block accounts of Tamawashi listed on https://www.wikidata.org/wiki/Category:Wikidata_sockpuppets_of_Tamawashi from QuickStatements.
quickstatements.toolforge.org##tr:has(a[href*="User:Tamawashi"])
quickstatements.toolforge.org##tr:has(a[href*="User:5678fghj"])
quickstatements.toolforge.org##tr:has(a[href*="User:Addids"])
quickstatements.toolforge.org##tr:has(a[href*="User:Alexander Wrangel"])
quickstatements.toolforge.org##tr:has(a[href*="User:Andrea Shan"])
quickstatements.toolforge.org##tr:has(a[href*="User:Andres Ollino"])
quickstatements.toolforge.org##tr:has(a[href*="User:Anton Dannenberg"])
quickstatements.toolforge.org##tr:has(a[href*="User:Asterix2023"])
quickstatements.toolforge.org##tr:has(a[href*="User:BergwachtBern"])
quickstatements.toolforge.org##tr:has(a[href*="User:Bernhard Friedrich"])
@Hans5958
Hans5958 / extra-A-2.json
Created February 19, 2025 15:14
Few save data when trying Club Penguin Island (which I couldn't access anymore after restarting 😢)
{"UserName":"A","BreadCrumbs":{"breadcrumbs":[{"breadcrumbType":0,"id":"0"}]},"ClaimableRewards":{"ClimedRewards":[23,34]},"ConsumableInventory":{"Inventory":{}},"Equipment":{"Equipment":[{"equipmentId":-3545113412020191031,"dateTimeCreated":1739974071020,"definitionId":80,"parts":[{"slotIndex":8,"customizations":[{"type":1,"definitionId":5,"index":0,"scale":10,"uoffset":-0.1065876,"voffset":-0.1654857,"rotation":0,"repeat":false},{"type":1,"definitionId":25,"index":1,"scale":10,"uoffset":0.1428142,"voffset":-0.1059622,"rotation":0,"repeat":false}]}]},{"equipmentId":-6811150125261387441,"dateTimeCreated":1739974291306,"definitionId":352,"parts":[]},{"equipmentId":5622482265587076610,"dateTimeCreated":1739974291322,"definitionId":392,"parts":[]}]},"DailySpinData":{"EarnedRepeatableRewardIds":[],"EarnedNonRepeatableRewardIds":[],"NumSpinsSinceReceivedChest":0,"NumSpinsSinceReceivedExtraSpin":1,"TimeOfLastSpinInMilliseconds":1739974163482,"CurrentChestId":0,"NumPunchesOnCurrentChest":2,"NumChestsReceivedOfCurren
@Hans5958
Hans5958 / VocaDB Name Filler.js
Last active March 12, 2025 16:14
Fills VocaDB song name from the original version. Licensed under MIT. More info: https://gitlab.com/Hans5958-MWS/vocadb-docs/-/wikis/notes/web-scripts#name-filler
(async () => {
const sameElStr = "div.editor-field > table > tbody"
const valueEl = i => document.querySelector(sameElStr + `> tr:nth-child(${i}) input:nth-child(1)`)
const keyEl = i => document.querySelector(sameElStr + `> tr:nth-child(${i}) > td`)
const choiceEl = i => document.querySelector(`div.editor-field:nth-child(2) > select > option:nth-child(${i})`)
const originalId = document.querySelector("a.btn-nomargin:nth-child(1)").href.split("S/")[1]
const data = sessionStorage.getItem("cache_orig_" + originalId)?.includes('{') ? JSON.parse(sessionStorage.getItem("cache_orig_" + originalId)) : await fetch("//" + location.host + "/api/songs/" + originalId + "/for-edit").then((response) => response.json())
sessionStorage.setItem("cache_orig_" + originalId, JSON.stringify(data))
allVideos = [...document.querySelectorAll('ytd-playlist-video-renderer')]
videosToRemove = allVideos.filter(current => {
const videoLink = current.querySelector("#video-title").href.split("&")[0].split("?")[1]
const foundElements = allVideos.filter(el => el.querySelector(`a[href*="${videoLink}"]`))
return foundElements[1] === current
})
console.log(videosToRemove.length)
;(async () => {
[...document.querySelectorAll('#anchor-watch-on-yt')].map(el => el.href.split('=')[1]).join('\r\n')
// reversed
[...document.querySelectorAll('#anchor-watch-on-yt')].map(el => el.href.split('=')[1]).reverse().join('\r\n')
@Hans5958
Hans5958 / proof.md
Last active August 20, 2024 00:50
Keyoxide proof, using the Keybase format, changed slightly

Keyoxide proof

I hereby claim:

  • I am Hans5958 on GitHub.
  • I am Hans5958 (aspe:keyoxide.org:DSEBK7DQQNRHNOQQBZM65AFYC4) on Keyoxide.

And finally, I am proving ownership of the GitHub account by posting this as a gist.

My publicly-auditable identity:

@Hans5958
Hans5958 / _techinfo-bmcb-2408.md
Last active December 7, 2024 17:42
Information regarding Black MIDI Comparison Block (August 2024 - Temp. Office PC Edition)
Next
Timeline of Black MIDI Comparison Block
◀️ Previous
@Hans5958
Hans5958 / _techinfo-bmcb-2407.md
Last active August 14, 2024 06:06
Information regarding Black MIDI Comparison Block (July 2024)
Next
Timeline of Black MIDI Comparison Block
◀️ Previous
@Hans5958
Hans5958 / TouhouDB Reverse Search Bookmarklet.txt
Last active February 16, 2025 15:54
Simple script to find VocaDB/TouhouDB/UtaiteDB entries from URLs; a reverse search tool. Licensed under MIT.
javascript:fetch('https://touhoudb.com/api/songs/findDuplicate?pv[]='+document.location).then((t=>t.json())).then((t=>{t.matches.length>0&&(document.location='https://touhoudb.com/S/'+t.matches[0].entry.id)}));