Skip to content

Instantly share code, notes, and snippets.

@OrionReed
OrionReed / dom3d.js
Last active December 9, 2025 17:22
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@Quelklef
Quelklef / spotify-export-playlist.js
Created April 13, 2022 04:47
Export a Spotify playlist via the web app
/* USAGE: Go to Spotify page for playlist, copy+paste into console, scroll */
songs = {};
const songCnt = parseInt(document.querySelector('.ebHsEf.RANLXG3qKB61Bh33I0r2').textContent, 10);
console.log(songCnt + ' songs');
id = setInterval(function() {
const nodes = Array.from(document.querySelectorAll('.h4HgbO_Uu1JYg5UGANeQ.wTUruPetkKdWAR1dd6w4'));

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

[In the distant past…]
<alkino> ggVGd: do you know you can short your name?
<alkino> ggdG
<ggVGd> yes
<ggVGd> but I have had this discussion before
<ggVGd> there is a philosophical difference
<ggVGd> it is about feedback of destruction
<alkino> uh?
<alkino> can't see difference
@broluwo
broluwo / #! Bash Prompt
Last active December 19, 2015 23:08
My current #! prompt
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac