Skip to content

Instantly share code, notes, and snippets.

// Don't ask about this one. I have no idea what this magic is.
// Copied from https://github.com/microsoft/TypeScript/issues/13298#issuecomment-724542300.
type UnionToIntersection<U> = (
U extends any ? (arg: U) => any : never
) extends (arg: infer I) => void
? I
: never;
// Continuation of above.
type UnionToTuple<T> = UnionToIntersection<(T extends any ? (t: T) => T : never)> extends (_: any) => infer W
@alexreardon
alexreardon / drag-and-drop-notes.md
Last active December 17, 2024 05:31
An explanation of the timing of drag and drop events

Drag and drop

This is a collection of knowledge I have built up regarding browser powered drag and drop functionality

Events

dragstart

  • timing: once as drag is starting
  • event.target: draggable Element
@marvinrabe
marvinrabe / Request.php
Created May 14, 2019 06:56
Nuwave Lighthouse Resolve function changes
<?php
namespace App\GraphQL;
use GraphQL\Type\Definition\ResolveInfo;
use Illuminate\Support\Facades\Validator;
use Nuwave\Lighthouse\Support\Contracts\GraphQLContext;
class Request
{
@ggs67
ggs67 / roundedcube.scad
Last active December 17, 2024 05:28 — forked from groovenectar/roundedcube.scad
roundedcube.scad - Fork me and make me better!
// More information on original version: https://danielupshaw.com/openscad-rounded-corners/
//
// Changed by GGS67 to remove some limitations:
//
// 1. Allow radius>length for rounded corners in one axis only (problem reported on original page in 2015)
// 2. Remove limitation where for apply_to=(x|y|z)max or (x|y|z)min the dimension of the corresponding perpendicular
// axis had to be at least 3 times the radius because of fixed cylinder height. Now cylinder height is always computed not
// to interferr with opposite corner
@lifeutilityapps
lifeutilityapps / StandardCopyMenu.swift
Last active December 17, 2024 05:24
A reusable SwiftUI context menu component for programmatically creating a menu of user-copiable values
//
// StandardCopyMenu.swift
// DownPay for iOS
// lifeutilityapps.com/downpay
//
// Created by Life Utility Apps on 12/15/24.
//
import SwiftUI
@yoavg
yoavg / multi-llm-agents.md
Last active December 17, 2024 05:22
What makes multi-agent LLM systems multi-agent?

Are multi-LLM-agent systems a thing? Yes they are. But.

Yoav Goldberg, Nov 24, 2024

This piece started with a pair of twitter and bluesky posts:

let's talk about "agents" (in the LLM sense). there's a lot of buzz around "multi-agent" systems where agents collaborate but... i don't really get how it differs from a thinking of a single agent with multiple modes of operation. what are the benefits of modeling as multi-agent?

— (((ل()(ل() 'yoav))))👾 (@yoavgo) November 23, 2024
@JustinGrote
JustinGrote / settings.json
Last active December 17, 2024 05:18
Justin Grote's Visual Studio Code Settings
{
"[bicep]": {
"editor.defaultFormatter": "ms-azuretools.vscode-bicep",
"editor.suggest.showWords": false,
"editor.suggest.snippetsPreventQuickSuggestions": false,
"editor.suggestSelection": "first",
"editor.wordBasedSuggestions": false,
"files.insertFinalNewline": true
},
"[csharp]": {
@KEINOS
KEINOS / README.md
Last active December 17, 2024 05:18
References for OKdo Nano C100 Developer Kit (a NVIDIA Jetson Nano Developer Kit B01 - The Jetson Nano Computing Module Compatible Board)

OKdo Nano C100 Developer Kit 情報

TL;DR:

  • この gist は sudo apt upgrade を行ったばかりに、悪夢にうなされはじめた、私の備忘録です。
    もしこのキットの購入を考えているのであれば、オススメしません。基本的な Ubuntu/Debian の知識だけでなく、LINUX カーネルそのものや UART 接続などのシリアル接続にも精通している必要があるためです。正直なところ、Raspi ほど初心者向きではありません。NVIDIA のモジュールではあるものの、純正のNVIDIA製品ではないし、ややマニアックな仕様のため、NVIDIA のサポートは受けられません。NVIDIA のフォーラムでも、経験者でなければメーカーの OKdo に問い合わせることを勧められています。OKdo も製品が成熟する前に ORIN ベースの後継に注力したため、情報が圧倒的に不足しています。安物買いの銭失いとならないよう奮闘している方の参考になれば幸いです。 sudoアップグレードを行ったばかりに、毎晩悪夢を見るようになった。

  • This gist is a memorandum of the cause of my nightmares because of sudo apt upgrade.
    If you are thinking of purchasing this kit, I suggest you don't. As it requires not only basic Ubuntu/Debian knowledge, but also familiarity with the LINUX kernel itself and serial connections such as UART connections. To be honest, it is not as suitable for beginners as Raspi: although it is an NVIDIA module, it is not a true NVIDIA product, and due to its somewhat geeky specifications, NVIDIA support is not ava

@vasanthk
vasanthk / System Design.md
Last active December 17, 2024 05:15
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@citrusui
citrusui / ___favorite-presets.md
Last active December 17, 2024 05:15
My favorite patches from various hardware synthesizers, software synths, sound banks, effects plug-ins, etc.