Skip to content

Instantly share code, notes, and snippets.

View notdaniel's full-sized avatar

Daniel Keywan Hollister notdaniel

View GitHub Profile
@notdaniel
notdaniel / simpleishserver.py
Last active March 9, 2025 07:15
Slightly improved version of Python's simple HTTP server enabling threading, CORS, and custom headers.
#!/usr/bin/env python3
"""
Slightly improved version of the simple HTTP server from the Python stdlib.
Provides options for a threaded server, CORS headers, and custom headers.
"""
from argparse import ArgumentParser, Namespace
from http.server import HTTPServer, SimpleHTTPRequestHandler, ThreadingHTTPServer
from pathlib import Path
@notdaniel
notdaniel / dedent_text.py
Last active February 27, 2025 01:37
removes excess indentation from clipboard text on macos
#!/usr/bin/python3
import shutil
import subprocess
import textwrap
def check_commands():
"""Ensure `pbcopy` and `pbpaste` are available."""
if not all(map(shutil.which, ("pbcopy", "pbpaste"))):
@notdaniel
notdaniel / cursor.sh
Created February 26, 2025 04:37
Script to properly execute the Cursor AppImage, which is broken on v0.46
#!/usr/bin/env bash
#
# Launches Cursor AppImage with proper path handling
#
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
LOGFILE="/tmp/cursor.log"

Keybase proof

I hereby claim:

  • I am notdaniel on github.
  • I am notdaniel (https://keybase.io/notdaniel) on keybase.
  • I have a public key whose fingerprint is 75B1 5E27 2DE2 B3EC EC70 2054 5A76 E912 C4DA 496E

To claim this, I am signing this object: