Skip to content

Instantly share code, notes, and snippets.

View Hans5958's full-sized avatar

Hans5958 Hans5958

View GitHub Profile
@Hans5958
Hans5958 / static-data.json
Created January 15, 2026 13:19
PreMiD Presence Stats static data for testing (published for testing and archival purposes)
This file has been truncated, but you can view the full file.
{
"网易云音乐": {
"name": "网易云音乐",
"users": 150,
"activeNow": 0,
"metadata": {
"logo": "https://cdn.rcd.gg/PreMiD/websites/%23/%E7%BD%91%E6%98%93%E4%BA%91%E9%9F%B3%E4%B9%90/assets/logo.png",
"thumbnail": "https://cdn.rcd.gg/PreMiD/websites/%23/%E7%BD%91%E6%98%93%E4%BA%91%E9%9F%B3%E4%B9%90/assets/thumbnail.png",
"color": "#E30000",
"category": "music",
@Hans5958
Hans5958 / yt_channel_discovery.ipynb
Last active November 29, 2025 13:01
yt_channel_discovery.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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 January 4, 2026 00:03
VocaDB Name Filler: Fills VocaDB/UtaiteDB/TouhouDB song name and shows the aliases and the artists from the linked original entry. Licensed under MIT. More info: https://gitlab.com/Hans5958-MWS/vocadb-docs/-/wikis/notes/web-scripts#name-filler
(async () => {
// Fetching and caching
const originalId = document.querySelector("a.btn-nomargin:nth-child(1)").href.split("S/")[1]
const cacheKey = "nf:" + originalId
const cachedRaw = sessionStorage.getItem(cacheKey)
const data = cachedRaw?.includes('{') ? JSON.parse(cachedRaw) : await fetch("//" + location.host + "/api/songs/" + originalId + "/for-edit").then((response) => response.json())
sessionStorage.setItem(cacheKey, 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