This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo '[default]' > .s3cfg | |
if [ -n "$ACCESS_KEY" ] && [ -n "$SECRET_KEY" ] ; then | |
echo access_key=$ACCESS_KEY >> .s3cfg | |
echo secret_key=$SECRET_KEY >> .s3cfg | |
else | |
echo access_key=$AWS_ACCESS_KEY_ID >> .s3cfg | |
echo secret_key=$AWS_SECRET_ACCESS_KEY >> .s3cfg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -x | |
S3DIR=s3://fgassert.com/old/ | |
FILENAME=old | |
PUTDIR=s3://fgassert.com/ | |
sudo apt-get install git -y | |
git clone https://github.com/s3tools/s3cmd.git | |
cd s3cmd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# gets iam security credentials from instance metadata and writes them to | |
# awscli environment variables and .s3cfg (for s3cmd) | |
# Usage: ec2-get-security-credentials ROLENAME DEFAULT_REGION | |
# ROLE=$1 | |
# DEFAULT_REGION=$2 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Created on Jan 26, 2012 | |
@author: Francis.Gassert | |
''' | |
''' | |
Welcome to Python! | |
Python is a simple scripting language that allows you to harness the power of your computer. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os | |
import sys | |
import subprocess | |
import string | |
import fnmatch | |
def tree(indir, func, pattern, max_level, l=0): | |
if l>max_level: |
NewerOlder