Skip to content

Instantly share code, notes, and snippets.

View michaelwsherman's full-sized avatar

Michael W. Sherman michaelwsherman

View GitHub Profile
@michaelwsherman
michaelwsherman / .tmux.conf
Created April 1, 2020 20:29
tmux configuration
# Make Ctrl-A the prefix key.
unbind C-b
set -g prefix C-a
# Set y to copy tmux selected to system clipboard.
bind -T copy-mode y send-keys -X copy-pipe-and-cancel 'xclip -selection clipboard,primary >/dev/null'

Keybase proof

I hereby claim:

  • I am michaelwsherman on github.
  • I am michaelwsherman (https://keybase.io/michaelwsherman) on keybase.
  • I have a public key ASC0zOswalF3tCJL_6ZCBKugOw--j9JxuFfu6ylfnvDMrQo

To claim this, I am signing this object:

@michaelwsherman
michaelwsherman / notebooks_management.sh
Last active March 23, 2021 19:52
Set of commands for working with Google Cloud Notebooks
export ZONE="us-west1-b"
export INSTANCE_NAME="my-instance"
export SSH_RULE_NAME="allow-ssh"
export SSH_TAG="ssh"
function create_notebook() {
export IMAGE_FAMILY="tf-latest-gpu"
export CREATION_INSTANCE_TYPE="n1-standard-4"
gcloud compute instances create $INSTANCE_NAME \
--zone=$ZONE \
sudo jupyter labextension install @krassowski/jupyterlab_go_to_definition
@michaelwsherman
michaelwsherman / gcloud_start_instance.sh
Last active April 8, 2019 21:33
Start a stopped VM.
export INSTANCE_NAME="my-instance"
export ZONE="us-west1-b"
gcloud compute instances start $INSTANCE_NAME \
--zone=$ZONE
@michaelwsherman
michaelwsherman / gcloud_resize_instance.sh
Last active April 8, 2019 21:34
Resize a stopped VM.
export INSTANCE_NAME="my-instance"
export ZONE="us-west1-b"
export NEW_MACHINE_TYPE="n1-standard-8"
gcloud compute instances set-machine-type $INSTANCE_NAME \
--machine-type=$NEW_MACHINE_TYPE \
--zone=$ZONE
@michaelwsherman
michaelwsherman / create_ipython_kernel.sh
Last active April 5, 2019 23:52
Creating an iPython kernel
export KERNEL_NAME="my_kernel"
export DISPLAY_NAME="Project Foo"
pip install ipykernel
python -m ipykernel install --name $KERNEL_NAME --display-name "$DISPLAY_NAME" --user
export VENV_PATH="venv"
rm -r $VENV_PATH
export VENV_PATH="venv"
source $VENV_PATH/bin/activate
@michaelwsherman
michaelwsherman / deactivate.sh
Created April 5, 2019 22:29
Deactivate a virtual environment.
deactivate