Skip to content

Instantly share code, notes, and snippets.

Avatar

Michael W. Sherman michaelwsherman

  • Bay Area
View GitHub Profile
View .tmux.conf
# 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'
View keybase.md

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 Mar 23, 2021
Set of commands for working with Google Cloud Notebooks
View notebooks_management.sh
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 \
View install_gotodef_extension.sh
sudo jupyter labextension install @krassowski/jupyterlab_go_to_definition
View gcloud_start_instance.sh
export INSTANCE_NAME="my-instance"
export ZONE="us-west1-b"
gcloud compute instances start $INSTANCE_NAME \
--zone=$ZONE
View gcloud_resize_instance.sh
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 Apr 5, 2019
Creating an iPython kernel
View create_ipython_kernel.sh
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
View remove_venv.sh
export VENV_PATH="venv"
rm -r $VENV_PATH
View activate_venv.sh
export VENV_PATH="venv"
source $VENV_PATH/bin/activate
@michaelwsherman
michaelwsherman / deactivate.sh
Created Apr 5, 2019
Deactivate a virtual environment.