Skip to content

Instantly share code, notes, and snippets.

Alex Staravoitau navoshta

Block or report user

Report or block navoshta

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
navoshta /
Last active Feb 24, 2017
Routines for SSH-ing to remote machine, mount its file system and attach to a persistent tmux session. Check out my post about building and configuring my remote machine:
# Connects to remote server, mounts its file system or attaches to a tmux session.
if [ $# -eq 0 ]; then
navoshta /
Last active Nov 23, 2016
Stops your AWS instance. Check out my post about usage of this script:
# Checks current AWS instance state and stops it if it's running.
AWS_INSTANCE_ID="<Your instance ID here>"
AWS_STATE=$(aws ec2 describe-instances --instance-ids $AWS_INSTANCE_ID --query "Reservations[*].Instances[*].State.Name" --output text)
if [ "$AWS_STATE" == "running" ]; then
aws ec2 stop-instances --instance-ids $AWS_INSTANCE_ID >/dev/null
echo -n "The AWS instance is now stopping. It usually takes a while, so feel free to CTRL+C if you don't want to wait till the instance has fully stopped."
navoshta /
Last active May 2, 2017
Starts your AWS instance. Check out my post about usage of this script:
# Starts your AWS instance, connects via SSH and launches Chrome with the remote Jupyter Notebook page open.
# Usage is as follows:
# 1. Run this script, so that Chrome has launched and SSH connection is established.
# 2. Execute 'jupyter notebook' on the AWS instance.
# 3. Reload the page in Chrome and log in to Jupyter Notebook.
# Note: we use Chrome, as there's a known issue with Safari that won't let Jupyter Notebook connect to a remote kernel.
You can’t perform that action at this time.