TIL: uv and standalone python scripts

TIL: if you’re using uv everything packs itself you can feed your script to uv with the following she-bang invocation (the --script flag will process the balance of the script as the script. standalone scripts can run in a virtualenv within uv and internally resolve their dependencies. we needed this years ago. #!/usr/bin/env -S uv run --script # /// script # requires-python = ">=3.12" # dependencies = [ "requests" ] # /// uv allows you to package up your dependencies at the top of a script using TOML formatted structures in the comments....

January 30, 2025 · steve ulrich

TIL: marked2 settings for sanity

TIL: sanity preserving marked2 setting i don’t know what took me so long to puzzle out why i was always getting line break behaviors when writing and previewing github markdown in marked2. unchecking this little configuration option allows me to keep my 80-column preference for paragraph wrapping in markdown files without showing line breaks.

January 26, 2025 · steve ulrich

TIL: multipass and cloud-init

TIL: cloud-init will make life easier in multipass world to start a VM and inject my ssh keys into the mix launch the vm with a cloud-init profile that creates your user and injects the right ssh key into the mix. cloud-init.yaml users: - default - name: sulrich sudo: ALL=(ALL) NOPASSWD:ALL ssh_authorized_keys: - ssh-ed25519 AAAA .... invoke with appropriate injection. multipass launch -n sweet-jammy-vm jammy --cloud-init ~/.dotfiles/templates/cloud-init.yaml

January 6, 2025 · steve ulrich

TIL: conditional git config

TIL: git supports conditional config for a situation that requires multiple github accounts. you need to be able to toggle a number of config elements to make life happy. git has support for conditional inclusion in the configuration files. if you structure your config and directory structures appropriately you can use the gitdir status to selectively include git configuration elements into the mix, allowing you to toggle between one profile and another....

December 27, 2024 · steve ulrich

TIL: don't need no rectangle

you can bend macos to your will raycast. (worth the pro subscription for cross device sync and the ability to replace a crapton of individual little apps.) has pretty solid window management functionality built into it these days and it does almost everything that i need it to do in terms of layout and snap-to functionality. there was one thing i kept rectangle pro around for namely the ability to move a window around without having to use the title bar....

December 16, 2024 · steve ulrich