Skip to content

Instantly share code, notes, and snippets.

@alanrsoares
alanrsoares / download-svgrepo-collection.ts
Created May 27, 2025 02:30
Download entire svg collections from svgrepo.com
import { writeFile, mkdir } from "fs/promises";
import { join } from "path";
import { load } from "cheerio"; // install with `bun add cheerio`
const COLLECTION_URLS = [
"https://www.svgrepo.com/collection/finance-6/",
"https://www.svgrepo.com/collection/finance-6/2",
];
const OUTPUT_DIR = "./public/vectors";

Lima Cheatsheet for macOS

I stumbled on an incredible open source solution, Lima. In some ways, it has some of Hashicorp's Vagrant's resemblance, but in my opinion, it's so much superior in many ways as it doesn't use external dependencies such as Oracle's VirtualBox.

If you're used to docker on the command line but wanted to play with VMs rather than containers, then this is for you! No need to fuss with cloud-init as a user account (using your existing username in whoami) with a proper home directory would be auto-generated for you with full passwordless sudo privilege. SSH access to the VMs from the host is seamlessly integrated as well.

This quick guide is for those who need to set up virtual machines with modern Linux OSes (only few selected OSes are best supported) from scratch using only the command line. You can have a VM up and running within minutes from absolutely nothing.

NOTE: This was last tested using:

  • `lima
@itsmikita
itsmikita / macos-iso.md
Last active May 20, 2026 12:39
Extract ISO image from macOS Somona installer
@callemo
callemo / wg.sh
Last active July 4, 2025 11:48
WireGuard for OpenBSD
#!/bin/sh
gw="$(route -n show | awk '$1 == "default" { print $2 }')"
awk -v gw="$gw" '
$1 == "PrivateKey" { key = $3 }
$1 == "Address" {
addr = $3
sub(/,.*/, "", addr)
}
$1 == "DNS" { dns = $3 }
$1 == "PublicKey" { peer = $3 }
@kconner
kconner / macOS Internals.md
Last active June 11, 2026 15:44
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@IgnisDa
IgnisDa / devcontainer.sh
Last active January 11, 2026 07:31
Helix devcontainer
#!/usr/bin/env bash
set -e
remove_flag=""
if [ "$1" = "true" ]; then
remove_flag="--remove-existing-container"
fi
# Generate certificate
@amunchet
amunchet / noVNCCopyPasteProxmox.user.js
Last active June 19, 2026 18:21
Copy/Paste for noVNC Proxmox
// ==UserScript==
// @name noVNC Paste for Proxmox
// @namespace http://tampermonkey.net/
// @version 0.2a
// @description Pastes text into a noVNC window (for use with Proxmox specifically)
// @author Chester Enright
// @match https://*
// @include /^.*novnc.*/
// @require http://code.jquery.com/jquery-3.3.1.min.js
// @grant none
@tomdaley92
tomdaley92 / README.md
Last active June 15, 2026 08:20
Proxmox - SPICE Client setup for MacOS

Proxmox - SPICE client setup for MacOS

  1. Install a working (and compiled) version of virt-viewer. You may view the homebrew package's upstream source on GitHub.

    brew tap jeffreywildman/homebrew-virt-manager
    brew install virt-viewer
  2. Once that's installed should be able make a call remote-viewer with a pve-spice.vv file downloaded from proxmox web interface

@sindresorhus
sindresorhus / esm-package.md
Last active June 20, 2026 16:20
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.