curl -sSL https://gist.githubusercontent.com/ttimasdf/ef739670ac5d627981c5695adf4c8f98/raw/autossh@host1 | \
sudo tee /etc/default/autossh@example
curl -sSL https://gist.githubusercontent.com/ttimasdf/ef739670ac5d627981c5695adf4c8f98/raw/autossh@.service | \
sudo tee /etc/systemd/system/autossh@.service
sudo useradd -g nogroup -s /bin/false -m tunnel
sudo -u tunnel mkdir -p ~tunnel/.ssh # and copy your private key here
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 | |
| # Read JSON input from stdin | |
| input=$(cat) | |
| # Extract fields from JSON | |
| model=$(echo "$input" | jq -r '.model.display_name // "?"') | |
| context_used=$(echo "$input" | jq -r '.context_window.used_percentage // 0') | |
| cwd=$(echo "$input" | jq -r '.workspace.current_dir // "."') | |
| in_tok=$(echo "$input" | jq -r '.context_window.total_input_tokens // 0') |
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
| echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list | |
| curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add - | |
| cd /tmp # the next part is specific to your setup | |
| # Get it here: https://developer.nvidia.com/cudnn | |
| gsutil cp gs://tn-devel-ds/ubuntu/libcudnn5* . | |
| ls libcudnn*.deb | sort | xargs sudo dpkg -i | |
| sudo apt update | |
| sudo apt install libopenblas-dev liblapack-dev python3-pip python3-pandas python3-venv python3-werkzeug |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |