This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| SIDBlaster USB - Serial Interface Demo | |
| - Demonstrates reading and writing SID registers via serial port. | |
| - The ftdi_sio module should be loaded and presenting on /dev/ttyUSB0. | |
| - Tested on SIDBlaster-USB Tic Tac on Linux. | |
| - Raspberry Pi should work too. | |
| """ | |
| import time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Nostr Feed Test</title> | |
| <style> | |
| body { | |
| background-color: #222; | |
| color: #eee; | |
| font-family: 'Courier New', Courier, monospace; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| if [ "$#" -lt 1 ] || [ "$#" -gt 3 ]; then | |
| echo "Deploys strfry to a fresh Ubuntu VPS." | |
| echo "(Installs nginx, acme.sh, and builds strfry from scratch)" | |
| echo | |
| echo "Usage: $0 HOST [ADMIN_EMAIL] [ADMIN_PUBKEY]" | |
| echo "Example: $0 my-relay.example.com [email protected] <32-byte-hex-pubkey>" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns iconloader | |
| (:require | |
| [promesa.core :as p])) | |
| ;; Atom to store the base URL for SVG icons. | |
| ;; Default is "", meaning relative to the current path. | |
| (defonce svg-base-url (atom "")) | |
| ;; Function to set the base URL for SVG icons. | |
| ;; Call this before load-icon macros are expanded if a custom base URL is needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # You can put these in your .bashrc (or .profile or other shell setup) to setup direnv, pyenv, nvm. | |
| # pyenv setup hook (install it first) | |
| export PYENV_ROOT="$HOME/.pyenv" | |
| [[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH" | |
| eval "$(pyenv init -)" | |
| eval "$(pyenv virtualenv-init -)" | |
| # nvm setup hook (install it first) | |
| export NVM_DIR="$HOME/.nvm" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Scrapes documentation from a URL and converts it to Markdown suitable for aider convention files | |
| # to provide context to the LLM. | |
| if [ $# -eq 0 ]; then | |
| echo "Usage: $(basename "$0") <URL> [URL...]" | |
| echo | |
| echo "Generate aider 'convention' Markdown context from documentation URLs." | |
| echo "suitable for providing LLM context about a project's conventions and style." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns testdemo | |
| (:require | |
| ["playwright$default" :as pw] | |
| [clojure.test :refer [deftest is use-fixtures async] :as t] | |
| [promesa.core :as p])) | |
| (def rig (atom nil)) | |
| ; set up playwright before running and tear it down afterwards | |
| (use-fixtures |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en-us"> | |
| <head> | |
| <title>Scittle Example</title> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <meta name="mobile-web-app-capable" content="yes"> | |
| <meta name="apple-mobile-web-app-capable" content="yes"> | |
| <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/concrete.min.css"> | |
| <script src="https://cdn.jsdelivr.net/npm/scittle@latest/dist/scittle.min.js" type="application/javascript"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns screenshots | |
| (:require ["playwright" :as pw] | |
| [promesa.core :as p])) | |
| ; NOTE: you'll need to npm install `nbb` and `playwright` | |
| (defn wait-for-network-idle [page] | |
| (p/do | |
| (.waitForLoadState page "networkidle") | |
| (p/delay 100))) ;; Add 100ms delay |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns promises | |
| {:clj-kondo/config '{:lint-as {promsea.core/let clojure.core/let | |
| promesa.core/doseq clojure.core/doseq | |
| promesa.core/loop clojure.core/loop | |
| promesa.core/recur clojure.core/recur}}} | |
| (:require [promesa.core :as p])) | |
| (def panel-choices [1 2 3 4 5]) | |
| ; simple test function returns a promise with doubled input |
NewerOlder