Skip to content

Instantly share code, notes, and snippets.

@tylerneylon
tylerneylon / copy.lua
Last active May 13, 2025 13:44
How to deep copy Lua values.
-- copy.lua
--
-- Lua functions of varying complexity to deep copy tables.
--
-- 1. The Problem.
--
-- Here's an example to see why deep copies are useful. Let's
-- say function f receives a table parameter t, and it wants to
@iain-fraser
iain-fraser / dragdrop.webview2.polyfill.js
Last active May 13, 2025 13:39
JavaScript polyfill to address a known issue in WebView2 where native drag and drop functionalities are not implemented. It also modifies some default cursor behaviors to ensure that draggable elements have a 'pointer' cursor, mimicking expected browser defaults. This aims to be a "good enough" solution for most scenarios, but it might not cover…
/**
* Polyfill for WebView2 Drag and Drop Bug
*
* This polyfill patches a known bug in WebView2 where drag and drop functionalities are
* not working as expected. This script provides a mock implementation to temporarily
* overcome the issue.
*
* More information:
* - https://github.com/MicrosoftEdge/WebView2Feedback/issues/2805
* - https://github.com/dotnet/maui/issues/2205
@joske
joske / arch-yoga.md
Last active May 13, 2025 13:37
Arch Linux Arm on Lenovo Yoga Slim 7x (X elite)

Arch

This is the method I used to install Arch on the yoga slim 7x. This is from memory so I may have forgotten things

prerequisites

  • disable bitlocker in windows
  • resize the windows partition
  • disable secure boot in BIOS

installation

@ntamvl
ntamvl / Increasing-the-amount-of-inotify-watchers.md
Created August 16, 2017 03:10
Increasing the amount of inotify watchers

Increasing the amount of inotify watchers

If you are not interested in the technical details and only want to get Listen to work:

  • If you are running Debian, RedHat, or another similar Linux distribution, run the following in a terminal:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
@davidfowl
davidfowl / ResourceModel.md
Last active May 13, 2025 13:35
Aspire Resource Model: Concepts, Design, and Authoring Guidance

Aspire Resource Model: Concepts, Design, and Authoring Guidance

Audience – Aspire integrators, advanced users, and contributors who are defining custom resource types, implementing publishers, or working across both runtime and publish workflows.
Just getting started? Jump straight to Quick Start and come back later for the deep‑dive.


Quick Start

A two‑minute "hello‑world" that shows the happy path.

@ConstantinHvber
ConstantinHvber / TailwindCSS_LLMs.txt
Created April 21, 2025 09:52
AI generated LLMs.txt for the Tailwind CSS docs (April 21, 2025)
# Tailwind CSS LLMs.txt Documentation
> This document provides a comprehensive overview of Tailwind CSS utility classes, examples, and customization options. It covers various CSS properties like layout, spacing, typography, backgrounds, borders, effects, transitions, transforms, and more, explaining how to use Tailwind's utility classes to style web elements effectively and responsively.
This document details the documentation of Tailwind CSS utilities. It explains how Tailwind scans source files for classes, the importance of using complete class names, and how utility classes can be applied conditionally using variants for states (hover, focus), responsive breakpoints, dark mode, and other conditions. It also covers customization via theme variables and adding custom styles.
**Core Concepts (from styling-with-utility-classes.mdx & responsive-design.mdx):**
* **Utility-First:** Style elements by combining many single-purpose utility classes directly in HTML.
* **Constraint-Based:** Utilities general
@Jatapiaro
Jatapiaro / qemu_ubuntu.md
Last active May 13, 2025 13:34
How to install QEMU on OSX and install an Ubuntu VM

Install QEMU on OSX

QEMU requires brew in OSX, so we need to install brew first.

Installing Brew

To install brew we need to have the developer tools enabled in our system. In order to install those tools, we have two options.

  1. Download Xcode form the AppStore
  2. In your terminal run the following command: xcode-select --install
@bmc08gt
bmc08gt / 1_Keyboard.kt
Last active May 13, 2025 13:34
KMP Software Keyboard Controller
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import androidx.compose.ui.platform.SoftwareKeyboardController
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
public abstract class KeyboardController(
@seongminhwan
seongminhwan / README.md
Last active May 13, 2025 13:32
vless+reality一键安装脚本

VLESS + Reality 代理服务配置脚本

这是一个用于快速部署 VLESS + Reality 代理服务的一键式脚本,支持无需域名的 IP 直连和 UUID 白名单访问控制功能。

特性

  • 无需域名:直接使用服务器 IP 连接,无需注册域名
  • Reality 协议:最新的 TLS 伪装技术,拥有更强的抗检测能力
  • UUID 白名单:支持多用户访问控制,只有特定的 UUID 才能连接
  • 自动生成密钥:自动生成所有必要的密钥、UUID 和配置信息
@DavidAce
DavidAce / nvidia-tdp.service
Last active May 13, 2025 13:31
Nvidia power limit at boot
[Unit]
Description=Set NVIDIA power limit above default
[Service]
Type=oneshot
ExecStartPre=/usr/bin/nvidia-smi -pm 1
ExecStart=/usr/bin/nvidia-smi -pl 275