Skip to content

Instantly share code, notes, and snippets.

@drew-harris
drew-harris / incredible.ts
Created January 19, 2025 08:04
raycast incredible thing
import fs from "fs";
import { KarabinerRules } from "./types";
import { createHyperSubLayers, app, open, rectangle, shell, generateUnsetForEveryKey } from "./utils";
const rules: KarabinerRules[] = [
{
description: "Hyper Key (⌃⌥⇧⌘)",
manipulators: [
{
description: "Right_CMd -> Hyper Key",
from: {
@buananetpbun
buananetpbun / Load Balancing LB PCC 3 Line ISP Failover - Mikrotik Script RouterOS
Last active November 3, 2026 15:51
Load Balancing LB PCC 3 Line ISP Failover - Mikrotik Script RouterOS
Load balance PCC 3 ISP on mikrotik is a technique for distributing traffic load on two or more connection lines in a balanced way,
so that traffic can run optimally, maximize throughput, reduce response time and avoid overloading one of the connection lines.
################################################
# LOAD BALANCING (LB) PCC SCRIPT GENERATOR
# Date/Time: 2/13/2021, 9:19:38 PM
# https://fb.me/buananet.pbun
# Load Balancing Metode -> PCC
################################################
@yanyaoer
yanyaoer / Llama.lua
Created July 10, 2024 03:49
Run Llama.cpp inside neovim
local function get_visual_selection()
local s_start = vim.fn.getpos("'<")
local s_end = vim.fn.getpos("'>")
local n_lines = math.abs(s_end[2] - s_start[2]) + 1
local lines = vim.api.nvim_buf_get_lines(0, s_start[2] - 1, s_end[2], false)
lines[1] = string.sub(lines[1], s_start[3], -1)
if n_lines == 1 then
lines[n_lines] = string.sub(lines[n_lines], 1, s_end[3] - s_start[3] + 1)
else
lines[n_lines] = string.sub(lines[n_lines], 1, s_end[3])

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

FROM ubuntu:22.04
WORKDIR /build
# Update build system
RUN apt-get update && \
apt-get install -y mingw-w64 gcc-mingw-w64 curl libtool build-essential zip
# Build bdb
RUN curl -L -O http://depends.dogecoincore.org/db-5.3.28.NC.tar.gz && \
@dantetemplar
dantetemplar / TASK.md
Last active November 3, 2026 15:10
OrcaSlicer slice via API

Project: OrcaSlicer HTTP API Wrapper

Contact: https://t.me/dantetemplar

Background

We need a way to slice 3D models programmatically from a Python backend, without any manual GUI interaction. Initially this was attempted with CuraEngine, but in practice it turned out to be hard to configure, debug, and run reliably in a headless environment.

OrcaSlicer, on the other hand, provides a modern slicing pipeline, good default profiles, and an active community. However, it is primarily a desktop GUI tool. The goal of this project is to wrap OrcaSlicer into a small, well-documented HTTP service that can be called from other systems, especially Python-based backends.

"""
Large-scale deduplication using Ray Data with Spark-like operations.
Based on the approach from: https://huggingface.co/blog/dedup
This implementation uses Ray Data's native operations (map_batches, groupby, etc.)
to implement MinHash + LSH deduplication, similar to the Spark approach.
Architecture:
1. MinHash signature generation (map_batches)

Building a Todo Application with Bob

Overview

In this lab, you'll learn to use Bob's AI-powered features to build a complete full-stack todo application from scratch. You'll experience Bob's different modes, auto-approvals, and Git and GitHub integration.

Duration: 45 minutes Difficulty: Beginner to Intermediate

What You'll Build

@Pavel-Demidyuk
Pavel-Demidyuk / frigate_telegram_notification.yaml
Last active November 3, 2026 14:34 — forked from NdR91/frigate_telegram_notification.yaml
Frigate - Telegram Notification
blueprint:
name: Frigate - Telegram Notification (русский), 2026.10.01
description: >-
Фото и видео из Frigate в Telegram. Ожидание конца события запускается
сразу, параллельно с отправкой фото, поэтому короткие события не теряются.
domain: automation
source_url: https://gist.github.com/Pavel-Demidyuk/1907e78e2c1fb5842d8c17774a9b37bc
homeassistant:
min_version: "2024.10.0"
input: