Skip to content

Instantly share code, notes, and snippets.

View jnywong's full-sized avatar

Jenny Wong jnywong

View GitHub Profile
@jnywong
jnywong / get_pod_mem_cpu_clusters.sh
Last active October 2, 2025 17:03
Use 2i2c deployer helper to get pod memory and cpu usage across a list of clusters
#!/bin/bash
export FILE="cluster_list.txt"
arr_memory=()
arr_cpu=()
for i in $(cat ${FILE}); do
echo "Processing cluster: $i"
@jnywong
jnywong / gh-cli-add-remove-user-list-to-team
Last active July 22, 2025 08:09
Use the GH CLI to add or remove a list of users to or from a GH team with a CSV file delimited with new lines '/'
#!/bin/bash
if [ $# -lt "4" ]; then
echo "Usage: $0 <add/delete> <users.csv> <gh-org> <gh-team-slug>"
exit 1
fi
if [ $1 != "add" ] && [ $1 != "delete" ]; then
echo "'$1' is invalid: choose either 'add' or 'delete' as the first argument."
exit 1
@jnywong
jnywong / carpentries-template.sh
Created July 25, 2022 11:33
Add Carpentries style repository as remote
git remote add template https://github.com/carpentries/styles.git
git config --local remote.template.tagOpt --no-tags
@jnywong
jnywong / baskerville-rapids.sh
Last active March 16, 2022 22:23
Run a Jupyter Notebook with RAPIDS on Baskerville
#!/bin/bash
# Run a Jupyter Notebook with RAPIDS on Baskerville
# Launch interactive session
salloc --time=1:00:00 --qos=arc
# Run interactive pseudo bash terminal
srun --pty /bin/bash -i
@jnywong
jnywong / helloworld.sh
Last active January 26, 2022 10:38
Run job with output to scratch
#!/bin/bash -l
#SBATCH --output=/scratch/$USER/filename.out
echo "Hello, World! From $HOSTNAME"
sleep 15
echo "Goodbye, World! From $HOSTNAME"