Skip to content

Instantly share code, notes, and snippets.

View diegows's full-sized avatar
🏡
Working from home!

Diego Woitasen diegows

🏡
Working from home!
View GitHub Profile
@bluegraybox
bluegraybox / .bashrc_ssh
Created March 8, 2012 02:22
Initialize ssh-agent in .bashrc
# Set up ssh-agent
SSH_ENV="$HOME/.ssh/environment"
function start_agent {
echo "Initializing new SSH agent..."
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
echo succeeded
chmod 600 "${SSH_ENV}"
. "${SSH_ENV}" > /dev/null
/usr/bin/ssh-add;
@JohnCEarls
JohnCEarls / get_region.py
Created December 29, 2013 22:25
Get the regions by name for ec2 connection Also a script to rsync with other nodes in starcluster using the alias tag.
import boto.ec2
def get_region(region_name):
for region in boto.ec2.regions():
if region_name == region.name:
return region
conn = boto.connect_ec2(region=get_region( 'us-east-1'))