Skip to content

Instantly share code, notes, and snippets.

View chekoopa's full-sized avatar
🐈‍⬛

Mikhail Chekan chekoopa

🐈‍⬛
View GitHub Profile
@bgadrian
bgadrian / set.go
Last active April 18, 2025 04:34
How to implement a simple set data structure in golang
type Set struct {
list map[int]struct{} //empty structs occupy 0 memory
}
func (s *Set) Has(v int) bool {
_, ok := s.list[v]
return ok
}
@qoomon
qoomon / youtube_clean_watch_later_videos.js
Last active May 10, 2025 07:25
Clean YouTube Watch Later Videos
// Version 2.0.1
// This script will remove all videos from watch later list
//
// Usage
//
// #1 go to https://www.youtube.com/playlist?list=WL
// #2 run following script in your browser console
(async function() {
const playlistName = document.querySelector('.metadata-wrapper #container #text')?.textContent || document.querySelector('#text')?.textContent