Skip to content

Instantly share code, notes, and snippets.

View coderobe's full-sized avatar
🎩
i know a thing or two about a thing or two

Mara Robin B. coderobe

🎩
i know a thing or two about a thing or two
View GitHub Profile
@coderobe
coderobe / soundcloud-scrub-fix.js
Created March 23, 2024 20:20
enables scrubbing through long tracks on soundcloud without having to be logged in
// ==UserScript==
// @name Soundcloud scrub fix
// @namespace https://coderobe.net/
// @version 0.1
// @description enables scrubbing through long tracks on soundcloud without having to be logged in
// @author Mara Broda (coderobe)
// @match https://soundcloud.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=soundcloud.com
// @grant none
// ==/UserScript==
@coderobe
coderobe / yt-playlist-total-length.js
Last active March 23, 2024 20:28
get total content play time of a youtube playlist in seconds
// open a playlist, or Watch Later (https://www.youtube.com/playlist?list=WL)
// run. doesn't work? that means the playlist is truncated. scroll all the way down and try again.
// output is in seconds. divide by 3600 for fractional hours.
ytInitialData[b="contents"]["twoColumnBrowseResults"+(i="Renderer")]
.tabs[0]["tab"+i]
.content["sectionList"+i][b][0]["itemSection"+i][b][0][(g="playlistVideo")+"List"+i][b]
.reduce((N,y,_,a)=>a[(z=y[g+i]).videoId]??=N+=+z.lengthSeconds,0)
// authors: coderobe, ilbelkyr
@coderobe
coderobe / crgl.cr
Created January 26, 2024 16:32
basic ray tracing in crystal, renders to terminal. (2020)
#!/usr/bin/env crystal
TERM = `stty size`.split(" ").map { |x| x.to_i }
WIDTH = TERM.last
HEIGHT = TERM.first - 3
FOV = 45.0
MAX_DEPTH = 6
struct Vec3
@coderobe
coderobe / glsh.sh
Created January 26, 2024 16:03
software rendered "shadertoy" lol
#!/usr/bin/env bash
# This program was written by Mara Broda (coderobe) in 2020
printf "\033c"
trap "tput cnorm" EXIT
trap "exec bash "$(readlink -f "$0")"" SIGWINCH
tput civis
echo "starting bc coproc"
@coderobe
coderobe / gleis6.sh
Last active November 16, 2023 14:04
Renders mp4 to the demo format used by DB FIA passenger information displays - https://twitter.com/coderobe/status/1724915339513716922
#!/bin/bash
# Check if the input argument (MP4 file) is provided
if [ "$#" -ne 1 ]; then
echo "coderobe's gleis6.sh <3"
echo "Usage: $0 <inputfile.mp4>"
exit 1
fi
# Input MP4 file
@coderobe
coderobe / keybase.md
Last active December 29, 2015 23:01
keybase.md

Keybase proof

I hereby claim:

  • I am coderobe on github.
  • I am coderobe (https://keybase.io/coderobe) on keybase.
  • I have a public key whose fingerprint is 54EB 4D6D B209 862C 8945 CACC ED84 945B 35B2 555C

To claim this, I am signing this object: