Skip to content

Instantly share code, notes, and snippets.

@dskvr
dskvr / example.html
Created March 28, 2025 15:34
Radar CSS
<div class="radar"></div>
@dskvr
dskvr / init.d
Last active March 19, 2025 15:18
#!/bin/sh
### BEGIN INIT INFO
# Provides: basic
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts/stops basic service
# Description: A basic init script that starts, stops, and checks status
### END INIT INFO
#!/bin/bash
if [ ! -f /usr/lib/sftp-server ]; then
ln -s /usr/lib/ssh/sftp-server /usr/lib/sftp-server
fi
uci set dropbear.@dropbear[0].PasswordAuth='on'
uci set dropbear.@dropbear[0].RootPasswordAuth='on'
uci set dropbear.@dropbear[0].Port='22'
uci commit dropbear
@dskvr
dskvr / analysis.md
Last active October 30, 2024 02:11
NIP66 NIP50 relays

Issue #1

NOTICE from wss://feeds.nostr.band/: error: unknown feed

nostr.band feeds are tricky because the root domain connects like a relay, but does not actually behave like a relay. Only it's sub paths act like relays, and I'm still trying to figure out how to handle this in a way that doesn't require manual treatment. It would be better if feeds.nostr.band refused to connect.

Issue #2

NOTICE from wss://relay.noswhere.com/: internal error on filter 0

Internal issue it seems.

@dskvr
dskvr / opensats-badge.md
Last active September 23, 2024 16:32
opensats.org badge

OpenSats.org Badge

Easy way to flag OpenSats. Gigi tell me which casing is preferred please. While OpenSats is "correct," badges tend to be all lower. Let me know.

Standard Label / rgb(249,115,22)

opensats.org

[![opensats.org](https://img.shields.io/badge/%3E__-opensats-rgb(249,115,22))](https://opensats.org)
@dskvr
dskvr / fjb.sh
Last active September 5, 2024 23:54
find bitcoin block number with a provided timestamp
#!/bin/bash
# USAGE:
# fjb.sh <timestamp>
# returns: <blocknum>
TIMESTAMP=$1
LOWER=0
UPPER=$(bitcoin-cli getblockcount)
@dskvr
dskvr / nip11.types.ts
Created August 30, 2024 15:21
types generated with NIP-11
export interface Types {
contact: string;
description: string;
fees?: Fees;
icon?: any;
language_tags?: string[];
limitation?: Limitation;
name: string;
payments_url?: any;
posting_policy?: any;
@dskvr
dskvr / nip11.serializer.ts
Last active August 30, 2024 15:21
generated with the nip11 json-schema
// To parse this data:
//
// import { Convert, Nip11 } from "./file";
//
// const nip11 = Convert.toNip11(json);
//
// These functions will throw an error if the JSON doesn't
// match the expected interface, even if the JSON is valid.
export interface Nip11 {
{
"content": "{\"contact\":\"[email protected]\",\"description\":\"Damus strfry relay\",\"name\":\"damus.io \",\"pubkey\":\"32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245\",\"software\":\"git+https://github.com/hoytech/strfry.git\",\"supported_nips\":[1,2,4,9,11,20,22,28,40,70],\"version\":\"0.9.2-88-g1d206d1ce9f2\"}",
"created_at": 1723894146,
"id": "3c2a8bf4f2625ad52b0f7f318a42d6c497f110ddcc3223b376513e1c4714c2fa",
"kind": 30166,
"pubkey": "9bbbb845e5b6c831c29789900769843ab43bb5047abe697870cb50b6fc9bf923",
"sig": "e35b240ed8c3438be0ded977eb528fb4b0490a27b63da38e478034ec0d34e7d72ae8725691de2778b2c2f486bbbb2a992ca0694237a4d43bbc411c15f336113d",
"tags": [
[
"d",
@dskvr
dskvr / bambu_lab-lovelace.yaml
Created June 7, 2024 13:53
Bambu Lab P1S Lovelace Dashboard
type: vertical-stack
cards:
- type: horizontal-stack
cards:
- type: custom:mushroom-title-card
title: Bambu Lab X1C
alignment: start
- type: custom:mod-card
card:
type: custom:mushroom-chips-card