Skip to content

Instantly share code, notes, and snippets.

View danielo515's full-sized avatar
🏠
Working from home

Daniel Rodríguez Rivero danielo515

🏠
Working from home
View GitHub Profile
@danielo515
danielo515 / moshi-mosh-lxc-banner.md
Last active September 1, 2026 06:55
How a Proxmox LXC login banner broke mosh bootstrap (Moshi)

How a Proxmox LXC login banner broke mosh

Setup

Two Debian 13 servers, both running inside LXC containers on Proxmox, both reachable over a VPN. I wanted to connect to them from my phone using Moshi, a mobile terminal client that supports mosh — the UDP-based remote shell that survives network switches and sleep, which makes it far nicer than plain SSH on a phone.

Mosh works in two phases: the client first connects over regular SSH and runs mosh-server on the remote machine ("the bootstrap"), then switches to its own UDP channel. Both servers had OpenSSH and mosh-server installed and configured identically.

Symptom

@schickling
schickling / effect-httpclient-usage-guide.md
Created December 5, 2025 08:32
Effect HttpClient usage patterns with verified examples (Bun + FetchHttpClient)

Effect HttpClient Usage Guide

Minimal verified recipe (Bun + FetchHttpClient)

  • Tested against httpbin; includes retries, base URL, schema decoding.
import { FetchHttpClient, HttpClient, HttpClientRequest, HttpClientResponse } from "@effect/platform"
import { Effect, Schema, Schedule } from "effect"

const Args = Schema.Record({ key: Schema.String, value: Schema.String })
{
"egen": {
"prefix": "egen",
"body": [
"Effect.gen(function* () {",
" $0",
"})"
],
"description": "Effect.gen"
},
@madyanalj
madyanalj / config.ts
Created August 8, 2024 10:15
Effect RPC with Cloudflare Workers
import { Effect as E, Schema } from "@effect/schema"
import {
BooleanFromSelfOrString,
NonEmptyObject,
ObjectValue,
} from "@o/shared"
import { ConfigProvider, Context, Layer } from "effect"
const WorkerBinding = <T extends object>() =>
NonEmptyObject.pipe(
@x
x / game_images.py
Created December 23, 2023 01:29
Extract game images from OpenEmu with rom-based names
#! python
import argparse
import sqlite3
import os
import shutil
import sys
from urllib.parse import unquote
QUERY = """
SELECT ZGAME.ZNAME, ZIMAGE.ZRELATIVEPATH, ZIMAGE.ZSOURCE, ZROM.ZLOCATION
@MrFunctor
MrFunctor / tsconfig.json
Created November 19, 2023 16:16
tsconfig.json with common fp-ts namespace imports configured with @unsplash/ts-namespace-import-plugin
{
"compilerOptions": {
"plugins": [
{
"name": "@unsplash/ts-namespace-import-plugin",
"namespaces": {
"A": {
"importPath": "fp-ts/Array"
},
"B": {
@kLabz
kLabz / Job.hx
Last active December 11, 2022 10:53
Lua test
#if macro
import haxe.macro.Context;
import haxe.macro.Expr;
import haxe.macro.TypeTools;
#end
@:remove // Doesn't seem to work on lua, eh
interface Job<TJobOpt:{}> {}
@:pure
@dedalodaelus
dedalodaelus / esp32-uptime-preserve-deep-sleep.yaml
Created June 5, 2021 01:41
Esphome uptime preserve during deepsleep
---
substitutions:
devicename: esp32-arduino
friendly_name: Dev Full Board
sleep_time: 20s
wifi_signal_update: 20s
#sensors_update: 1s
uptime_update: 2s
esphome:
@elliot-huffman
elliot-huffman / .gitignore
Last active July 15, 2025 05:40
A gitignore for all of your Apache Cordova needs.
# Cordova Global
plugins/
# iOS Platform
platforms/ios/build/
platforms/ios/www/
platforms/ios/cordova/console.log
*.xcuserdatad
# Android Platform
@haxiomic
haxiomic / Partial.hx
Last active February 26, 2023 11:44
Haxe macro to make all fields of a type optional (similar to Typescript's Partial<T>)
import haxe.macro.Context;
import haxe.macro.Expr;
import haxe.macro.TypeTools;
#if !macro
@:genericBuild(PartialMacro.build())
#end
class Partial<T> {}
class PartialMacro {