Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env -S uv run --quiet --script
# /// script
# dependencies = ["prefect"]
# ///
"""
Asset management script for Prefect Cloud.
This script provides CRUD operations for managing assets in Prefect Cloud workspaces.
Assets are created automatically by Prefect when events are emitted, but this script
"""
# how to run this example on your local machine with uv (https://docs.astral.sh/uv/)
# !!! be sure to run against `prefect server start` or Prefect Cloud for a UI
GIST_URL="https://gist.githubusercontent.com/zzstoatzz/3eb9333625d465cb74381c5116be7aee/raw/556d8e1886e5725f383ff6e673681a42eec3f9cf/tour_of_artifacts.py"
curl -L $GIST_URL -o /tmp/artifacts.py
pip install -U uv
uv run --python 3.12 --with 'prefect>=3.0.0rc19' /tmp/artifacts.py
"""
@anthonyray
anthonyray / gist:398fde676a7704c03d6624155ba0011e
Last active May 6, 2024 06:15
Set up OhMyZsh on Amazon EC2 instance running Ubuntu Server 14.04
  1. Connect to your EC2 instance
  2. Install zsh : sudo apt-get update && sudo apt-get install zsh
  3. Edit your passwd configuration file to tell which shell to use for user ubuntu : sudo vim /etc/passwd
  4. Look for ubuntu user, and replace bin/bash by bin/zsh
  5. Install OhMyZsh : sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
  6. Disconnect from your instance and reconnect it.