Skip to content

Instantly share code, notes, and snippets.

View sjdonado's full-sized avatar
:atom:
The enemy of the art is the absence of limitations - Orson Welles

Juan Rodriguez Donado sjdonado

:atom:
The enemy of the art is the absence of limitations - Orson Welles
View GitHub Profile
@sjdonado
sjdonado / quotes.json
Last active January 4, 2026 09:46
A selection of quotes from my reading sessions
[
{
"id": 1,
"quote": "There are no original ideas. There are only original people",
"author": "Barbara Grizzuti"
},
{
"id": 2,
"quote": "The person who gets 1 shot needs everything to go right, the person who gets 1000 shots is going to score at some point. Find a way to play the game that ensures you get a lot of shots",
"author": "James Clear"
@sjdonado
sjdonado / quieter-social-networking-custom-filters.txt
Last active November 17, 2025 16:58
uBlock Origin custom filters for removing algorithmic recommendation feeds from YouTube and LinkedIn
! === YouTube ===
! Hide related videos section
youtube.com##ytm-item-section-renderer[section-identifier="related-items"]
m.youtube.com##ytm-item-section-renderer[section-identifier="related-items"]
! Hide shorts tab and section
m.youtube.com##ytm-pivot-bar-item-renderer:has(.pivot-shorts)
youtube.com##[role="tab"][class*="pivot-shorts"]
@sjdonado
sjdonado / Editor.tsx
Last active November 29, 2024 12:17
Fabric 2d editor prototype
import React, { useEffect, useRef } from 'react';
import { fabric } from 'fabric';
import { useCanvas } from './useCanvas';
const PVEditor = () => {
const canvasRef = useRef(null);
const { state, addObject, updateObject, deleteObject, selectObject, syncActiveObject } = useCanvas();
useEffect(() => {
const canvas = new fabric.Canvas('canvas', { width: 800, height: 600 });
@sjdonado
sjdonado / sjdonado_feeds.opml
Last active April 16, 2025 13:58
My collection of RSS feeds
<?xml version="1.0" encoding="UTF-8"?>
<!-- OPML generated by NetNewsWire -->
<opml version="1.1">
<head>
<title>sjdonado_feeds.opml</title>
</head>
<body>
<outline text="Allen Pike" title="Allen Pike" description="" type="rss" version="RSS" htmlUrl="" xmlUrl="https://feeds.allenpike.com/feed/"/>
<outline text="furbo.org" title="furbo.org" description="" type="rss" version="RSS" htmlUrl="https://furbo.org/" xmlUrl="https://furbo.org/feed/json"/>
<outline text="jakelazaroff.com" title="jakelazaroff.com" description="" type="rss" version="RSS" htmlUrl="https://jakelazaroff.com/" xmlUrl="https://jakelazaroff.com/rss.xml"/>
@sjdonado
sjdonado / 08.05.23-9.js
Created May 8, 2023 19:02
Tower of Hanoi in P5.js + WASM - Dev.to
const getHanoiMoves = async (n) => new Promise((resolve) => {
wasmWorker.onmessage = (event) => resolve(event.data);
wasmWorker.postMessage({ n });
});
@sjdonado
sjdonado / 08.05.23-8.js
Created May 8, 2023 19:01
Tower of Hanoi in P5.js + WASM - Dev.to
const wasmWorker = new Worker(new URL('../workers/hanoi.js', import.meta.url), {
type: 'module',
});
@sjdonado
sjdonado / 08.05.23-7.js
Created May 8, 2023 19:00
Tower of Hanoi in P5.js + WASM - Dev.to
import { get_moves } from '@wasm/games';
onmessage = (event) => {
const moves = get_moves(event.data.n);
postMessage(moves);
};
@sjdonado
sjdonado / 08.05.23-6.rs
Created May 8, 2023 19:00
Tower of Hanoi in P5.js + WASM - Dev.to
use gloo_utils::format::JsValueSerdeExt;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
pub fn get_moves(n: i32) -> JsValue {
fn move_tower(n: i32, from: i32, to: i32, aux: i32, moves: &mut Vec<String>) {
if n == 1 {
moves.push(format!("{}:{}", from, to));
} else {
move_tower(n - 1, from, aux, to, moves);
@sjdonado
sjdonado / 08.05.23-5.js
Created May 8, 2023 18:59
Tower of Hanoi in P5.js + WASM - Dev.to
import { get_moves } from '@wasm/games';
@sjdonado
sjdonado / 08.05.23-4.diff
Last active May 8, 2023 19:03
Tower of Hanoi in P5.js + WASM - Dev.to
import { defineConfig } from 'vite';
import solidPlugin from 'vite-plugin-solid';
+ import wasm from 'vite-plugin-wasm';
+ import topLevelAwait from 'vite-plugin-top-level-await';
import path from 'path';
export default defineConfig({
plugins: [