Skip to content

Instantly share code, notes, and snippets.

@framp
framp / README.md
Created October 14, 2026 14:16
phonecam: Android phone as a USB webcam on Linux (scrcpy + v4l2loopback + systemd user service)

phonecam: Android phone as a webcam over USB (Linux)

A systemd user service that waits for an Android phone to be plugged in over USB, then uses scrcpy to stream the phone's camera into a v4l2loopback device (/dev/video0). Any app (Meet, Zoom, OBS, browser) then sees it as a normal webcam. Unplug the phone and the service goes back to waiting; plug it in again and the camera comes back on its own.

How it works

@framp
framp / 00-semif-vs-laya-vs-jev-vs-gliner.md
Last active October 3, 2026 11:07
laya-rs vs jev vs gliner-rs vs semif-rs: typed-decisions comparison

laya-rs vs jev vs gliner-rs vs semif-rs (Qwen3.5-4B) vs Intern-Decision-4B vs Julia-1 — typed-decisions comparison

Repos: laya-rs, semif-rs, gliner-rs

Not the stock distributions but Rust ports running on CUDA. Laya-rs and gliner-rs are a bit faster than Python official distribution, Semif-rs is 25% slower than llama.cpp so it has space for improvements.

Ran the same jev-questions fixture (3 workflows: resume screening, support-session evaluation, guardrail moderation) through:

  • laya-rs — Rust reimplementation of Laya (laya-typed-decisions checkpoint, ModernBERT-large
@framp
framp / README.md
Last active August 29, 2026 13:55
TabbyAPI + exllamav3 config for RTX 4090 (200k context, MTP, Q4!)
@framp
framp / lenovo-yoga-slim-7-14akp10-guide.md
Last active July 23, 2026 10:50
Installing Arch Linux on Lenovo Yoga Slim 7 14AKP10

Installing Arch Linux on Lenovo Yoga Slim 7 14AKP10

After spending 24 hours across planes and airports I got back home and spent the rest of my weekend trying to get this beautiful laptop to work.

Here are the fixes so you don't have to suffer.

General

Install Arch Linux as usual.

while true; do
v=$(uv run btcli subnet burn-cost --network finney | grep -oE '[0-9]+\.[0-9]+')
echo "[$(date '+%Y-%m-%d %H:%M:%S')] Subnet burn cost: $v"
awk "BEGIN{exit !($v < 225)}" && paplay /usr/share/sounds/freedesktop/stereo/complete.oga
sleep 3600
done
const removeWarnings = (element: HTMLElement) => {
if (element.nodeName === "SPAN") {
const span = element as HTMLSpanElement;
if (span.innerText.trim() === "For development purposes only") {
span.innerText = "";
}
if (
span.innerText.trim() === "For development purposes only" ||
span.innerText.trim() ===
"This page can't load Google Maps correctly."
const jwt = '...'
// Split JWT by dots
const sections = jwt.split('.');
// Function to check if a string is valid base64
function isValidBase64(str) {
try {
// Add padding if needed
{
"last_node_id": 114,
"last_link_id": 225,
"nodes": [
{
"id": 4,
"type": "GroundingDinoModelLoader (segment anything)",
"pos": {
"0": 1287,
"1": -1061

What is covariance?

Covariance describes how lifetimes behave in type substitution. A type is covariant over a lifetime if it can accept shorter lifetimes than originally specified.

📌 Example:

let short: &'short i32 = &5;
let long: &'long i32 = short; // allowed if &'long is covariant over 'short
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>apiplant - AI Software Consultancy</title>
<script src="https://cdn.tailwindcss.com"></script>
<style>
.first-page {
background-image: url('Downloads/image.jpg');