Skip to content

Instantly share code, notes, and snippets.

View leafac's full-sized avatar

Leandro Facchinetti leafac

View GitHub Profile
@leafac
leafac / Tailwind.clr
Last active December 1, 2023 23:39
Create macOS Color Palette (.clr) with JavaScript
@leafac
leafac / notes.md
Created February 17, 2023 12:05
Sortable Lists (Drag-and-Drop API)
@leafac
leafac / notes.md
Created February 3, 2023 19:36
Image/Video Proxy
- Use Got hook
- Use Transform in pipeline
  • Approaches
    • Question about current approach: sindresorhus/got#2060
    • Alternative approach that doesn’t work: Using Caddy. That would be nice because it would reduce the load on the application. But it could be limiting moving forward because it’d be more difficult to do HMAC, and so forth. But none of this matters, Caddy doesn’t seem to support proxying to arbitrary upstreams.
    • Alternative approach: Use a standalone image proxy & fire it up behind Caddy, alongside the main application.
    • Alternative approach: await on headers & only pipe the body?
  • Tests:
// DVD Logo
colorspace = 'RGBA';
background = input_track(0);
overlay = 0;
gfx_blit(background, 0);
input_info(overlay, overlay_width, overlay_height);
slider1:frequency=0<20,20000,1>Frequency
@init
zero_crossing_state = 0;
period.samples = 0;
sample.previous = 0;
@sample
@leafac
leafac / notes.md
Last active November 24, 2022 15:31
Performance Measurement

Notes on Performance Measurement

  • Measurement of interest: The response time of the 99%ile under normal load (which tends to be a relatively low load for the time being)

  • Difference in terminology:

    • Me

      ------------------ RESPONSE TIME ---------------------------------
      

--------- LATENCY ---------------------