Skip to content

Instantly share code, notes, and snippets.

View Dmitry-N-Medvedev's full-sized avatar
🎯
Focusing

Dmitry N. Medvedev Dmitry-N-Medvedev

🎯
Focusing
View GitHub Profile
@ixs
ixs / document.load_client_injection.js
Created September 5, 2019 10:23
userscript adding the document.load() function in order to make legacy webinterfaces such as the Avocent PM3000 webinterface work again.
// ==UserScript==
// @name document.load client injection
// @namespace http://tampermonkey.net/
// @version 0.1
// @description The Avocent PM1000/2000/3000 PDU runs an old JavaScript interface that relies on the XMLDocument.fetch() function that has been removed. Emulate this.
// @description inject the document.load implementation into real page context.
// @author Andreas Thienemann <[email protected]>, based on a script from [email protected], based on idea from [email protected]
// @match http://172.16.10.64/*
// @match http://172.16.10.65/*
// @run-at document-start
@myyellowshoe
myyellowshoe / AutoScalingSvgSolution.md
Last active February 5, 2025 14:10
Auto Scaling Svg Solution

Autoscaling SVG's

Scaling svgs is annoying and most solutions require tradoffs I don't want. I'm suprised the ammount of solutions out there that are pretty subpar or require extra overhead.

What I don't want:

  • use an image tag
  • use wrappers
  • use weird padding
  • pass down props for width/height or viewBox props.
import { build, files, version } from '$service-worker';
// https://github.com/microsoft/TypeScript/issues/11781 - this is needed for TS and ESLint
/// env serviceworker
const globalThis = /** @type {unknown} */ (self);
/// <reference no-default-lib="true"/>
/// <reference lib="es2020" />
/// <reference lib="WebWorker" />
const sw = /** @type {ServiceWorkerGlobalScope & typeof globalThis} */ (globalThis);
@kamidev
kamidev / zig_install_m3_max_macos.md
Last active April 14, 2025 10:47
zig_macos_m3_max_install

Personal notes building zig 0.15.0-dev.xxxx on Macbook M3 Max

2025014 Sequoia 15.4, latest XCode Commandline Tools, homebrew-installed LLVM 20.1.2 (llvm@20)

This way of building probably works on all Apple Silicon Macs, but you must check other models yourself. Some Intel Macs should also work (the only significant difference is the default homebrew path). But I don't test that anymore.

Here is a list of earlier M3 Max builds