Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Mirrors notes from one nostr relay to another.
#
# Example usage:
# nostr-mirror.sh wss://source.relay.example wss://target.relay.example
# Source relay to fetch events from (wss://...).
SOURCE=$1
# Target relay to send these events to (wss://...).
TARGET=$2
@ghuntley
ghuntley / README.md
Last active May 4, 2023 21:16
a rough prototype for running coder.com as a nixos system service

background

  1. Now that coder is in nixpkgs at https://search.nixos.org/packages?channel=22.11&show=coder&from=0&size=50&sort=relevance&type=packages&query=coder
  2. The next step is to enable running coder in NixOS via services.coder.enable = true;
  3. Thus design configuration options such as https://search.nixos.org/options?channel=22.11&show=services.znc.user&from=0&size=50&sort=relevance&type=packages&query=znc
  4. Refer to https://github.com/NixOS/nixpkgs/blob/nixos-22.11/nixos/modules/services/networking/znc/default.nix for an example of what is to be achieved.

next steps

  1. What configuration options should we expose vs encouraging usage of extraFlags?
@swissrouting
swissrouting / amboss-ping.sh
Last active October 29, 2022 00:02 — forked from C-Otto/sh
Shell script that sends a health check ping to the Amboss API
#!/bin/bash
# Sends a health check ping to the Amboss API.
# Docs: https://docs.amboss.space/api/monitoring/health-checks
URL="https://api.amboss.space/graphql"
NOW=$(date -u +%Y-%m-%dT%H:%M:%S%z)
echo "Timestamp: ${NOW}"
SIGNATURE=$(lightning-cli signmessage "$NOW" | jq -r .zbase)
echo "Signature: ${SIGNATURE}"
JSON="{\"query\": \"mutation HealthCheck(\$signature: String!, \$timestamp: String!) { healthCheck(signature: \$signature, timestamp: \$timestamp) }\", \"variables\": {\"signature\": \"$SIGNATURE\", \"timestamp\": \"$NOW\"}}"
echo "Sending ping..."