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.
{"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 |
(async () => { | |
const sameElStr = "div.editor-field:nth-child(4) > table:nth-child(1) > tbody:nth-child(1)" | |
const valueEl = i => document.querySelector(sameElStr + `> tr:nth-child(${i}) > td:nth-child(2) > input:nth-child(1)`) | |
const keyEl = i => document.querySelector(sameElStr + `> tr:nth-child(${i}) > td:nth-child(1)`) | |
const choiceEl = i => document.querySelector(`div.editor-field:nth-child(2) > select:nth-child(1) > option:nth-child(${i})`) | |
const originalId = document.querySelector("a.btn-nomargin:nth-child(1)").href.split("S/")[1] | |
const data = sessionStorage.getItem ? 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') |
Timeline of Black MIDI Comparison Block | |||
---|---|---|---|
Previous |
Timeline of Black MIDI Comparison Block | |||
---|---|---|---|
Previous |
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)})); |
This script rips (protected/view-only) PDFs from Google Drive by copying all the page images provided by Google Drive, and then put it on a PDF. It is a ripper (not a downloader) because it does not download the PDF file directly, and it involves some sort of conversion (PDF > images > PDF).
This script is based on https://gist.github.com/dpaluy/74258794f7930401cc27262e0ea794dd and https://gist.github.com/cirippo/86edfbddc3125eb64ee4b2d8faa52caa, with updates made since I was quite bored, and didn't want to adjust parts of the code to my own when I'm using it.
Convert from template literal format.
Find: chalk`(.*)\{([a-z]+) (.+)\}
Replace: $1${chalk.$2(`$3`)}
sed syntax: s/chalk`(.*)\{([a-z]+) (.+)\}/$1${chalk.$2(`$3`)}/g
Convert chalk.foo(`${bar}`)
to chalk.foo(bar)
.
Find: \(`\$\{([^`{}]+)\}`\)
Replace: ($1)