Skip to content

Instantly share code, notes, and snippets.

View kfox's full-sized avatar

Kelly Fox kfox

  • Unity Technologies
  • Austin, TX, USA
View GitHub Profile
@kfox
kfox / apply_environment_variables.sh
Created September 9, 2022 15:17
Apply environment variables to your current shell context, useful for when you SSH into a server and need your user to operate in the same context as a service already running as that user, e.g. Celery, etc.
eval $(xargs -0 -L1 -a /proc/1/environ | grep -E '^[A-Z].*' | sed -e 's/=/="/' -e 's/$/"/')
@kfox
kfox / Active Status Bar Components.png
Last active September 9, 2022 15:48
Define and set dynamic variables for iTerm2 badges and status bar components
Active Status Bar Components.png
@kfox
kfox / README.md
Last active December 4, 2023 11:08
TCP echo server for Node.js

TCP echo server for Node.js

Usage

  1. Make sure you have a modern-ish version of Node.js installed.
  2. Type npx https://gist.github.com/kfox/1280c2f0ee8324067dba15300e0f2fd3
  3. Connect to it from a client, e.g. netcat or similar: nc localhost 9000
@kfox
kfox / README.md
Last active October 4, 2024 21:24
MacOS command line to convert a binary C64 character set to comma-delimited hex

Convert a binary C64 character set to comma-delimited hex

  1. Replace raw c64 character set with the file name of your raw binary Commodore 64 character set.
  2. Paste the results into the dialog for the "import raw byte stream" prompt on the PETSCII Editor site by Krisztián Tóth.
cat "raw c64 character set" | \
  od -v -j 2 -t xC | \
  sed \
 -e 's/^.......//g' \