Skip to content

Instantly share code, notes, and snippets.

View chfour's full-sized avatar
🦊
become fop

chfour

🦊
become fop
  • this giant crater called "poland" or sth like that
  • 11:02 (UTC +02:00)
View GitHub Profile
alert(1)
Promise.all(Array.from(document.querySelectorAll(".foldername"), async a => {
const url = a.href.replace("/view/", "/file/");
let t = await fetch(url).then(r => r.text());
t = t.match(/https:\/\/download[^"]*/)[0];
return t;
})).then(l => {
const floater = document.createElement("textarea");
floater.style = `background-color: #101010; color: white; z-index: 1000;\
font-family: monospace; font-size: 12pt; position: absolute; top: 1em; left:1em;`;
floater.cols=80; floater.rows=24;
@chfour
chfour / list.txt
Created September 28, 2021 14:51
list of my favourite youtube channels, to be used with youtube-dl
# youtube channels list + my personal playlist
# for use with youtube-dl
# by ch4
# might update it, might not, I dunno
# my personal "favourites" playlist
https://www.youtube.com/playlist?list=PLG37rjQynnla-FYpzTBpQQTPk7W3whi7X
# ---- channels
@chfour
chfour / foone-w95-crash-stream.txt
Created August 28, 2021 20:57
Foone Turing's Windows 95 Crash livestream chat backup (see also my download.py gist)
-1:08:02 <Nakashii> Morbid curiosity
-1:07:46 <Nakashii> I mean I saw Win95 crash from lots of things, including using explorer.exe too often, but never saw this one.
-1:07:34 <Nakashii> Kind of an achievement having one up this long :grinning_face:
-1:02:11 <Deville> History in the making
-59:28 <unnamedauthor> ph boy
-59:25 <unnamedauthor> can't wait
-57:15 <Nakashii> Right now I'm just waiting for the stream to start while wandering around the vket worlds before they disappear
-49:20 <Gorokizu> hello beautiful people
-48:48 <alpha LONE> how will it crash? bsod? freeze?
-48:31 <Mattia_98> hyyyyyyyype
@chfour
chfour / download.py
Last active August 28, 2021 20:54
yt live chat downloader
import pytchat, argparse
parser = argparse.ArgumentParser()
parser.add_argument("vid_id", type=str,
help="video ID")
parser.add_argument("output", type=str,
help="output file")
args = parser.parse_args()
chat = pytchat.create(video_id=args.vid_id, processor=pytchat.JsonfileArchiver(args.output))
@chfour
chfour / README.md
Last active August 22, 2021 16:33
fancy script to get info about videos on a youtube channel
(hi=>{tm=chfour=>[chfour/3600
<<0,(chfour%3600)/60<<0||"00"
,Math.round(chfour%60)||"00"]
.filter(Boolean).map(chfour=>
chfour.toString().padStart(2,
"0")).join`:`;all=Array.from(
document.querySelectorAll`sp\
an.ytd-thumbnail-overlay-tim\
e-status-renderer`,eeeeeeee=&gt;
@chfour
chfour / nvmisslow.sh
Created April 14, 2021 18:11
nvmisslow.sh: A shell script that only loads nvm when it's needed
#!/bin/bash
# nvmisslow.sh: loads nvm only when needed
# because nvm is slow
# source from or paste into your shell's .rc
# this is a list of commands that will trigger __initnvm.
# if you have globally installed node modules, add them here
declare -a __node_cmds=('nvm' 'node' 'npm')
__initnvm(){