Skip to content

Instantly share code, notes, and snippets.

View didier's full-sized avatar
🌍
Focused on ethical, sustainable and accessible digital experiences.

Didier Catz didier

🌍
Focused on ethical, sustainable and accessible digital experiences.
View GitHub Profile
@OrionReed
OrionReed / dom3d.js
Last active May 7, 2024 01:36
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; // ¯\\_(ツ)_/¯
@wilsonowilson
wilsonowilson / settings.json
Created January 2, 2024 14:56
Minimal Vscode w/ APC extension
{
"workbench.colorTheme": "Aura Dark",
"workbench.iconTheme": "material-icon-theme",
"editor.fontFamily": "'Geist Mono', Menlo, Monaco, 'Courier New', monospace",
"apc.listRow": {
"height": 24,
"fontSize": 11
},
"window.titleBarStyle": "native",
"apc.font.family": "Geist Mono",
class PathMe {
moves: string[] = [];
constructor() {
this.moves = [];
return this;
}
moveTo(x: number, y: number) {
@kesor
kesor / 1-voice-synthesis.js
Last active March 7, 2024 00:19
Making chat OpenAI use TTS
// paste this into your chrome dev console for Speech Synthesis
const originalFetch = window.fetch
const patchedFetch = (...args) => {
if (args[1].method == 'POST' && args[1].body.length > 0 && /moderations$/.test(args[0])) {
const aiResponse = JSON.parse(args[1].body)["input"].split("\n\n\n")
if (aiResponse.length > 1) {
const text = aiResponse.slice(1).join(". ").trim()
console.log(text)
by Manuel Gutiérrez Nájera
I want to die as the day declines,
at high sea and facing the sky,
while agony seems like a dream
and my soul like a bird that can fly.
To hear not, at this last moment,
once alone with sky and sea,
any more voices nor weeping prayers