Skip to content

Instantly share code, notes, and snippets.

@jmsktm
jmsktm / aws-instance-info.sh
Created August 30, 2013 07:01
AWS instance information
#/bin/bash
echo "AMI ID: $(curl http://169.254.169.254/latest/meta-data/ami-id)\n"
echo "AMI LAUNCH INDEX: $(curl http://169.254.169.254/latest/meta-data/ami-launch-index)\n"
echo "AMI MANIFEST PATH: $(curl http://169.254.169.254/latest/meta-data/ami-manifest-path)\n"
echo "BLOCK DEVICE MAPPING: $(curl http://169.254.169.254/latest/meta-data/block-device-mapping/)\n"
echo "HOSTNAME: $(curl http://169.254.169.254/latest/meta-data/hostname)\n"
echo "INSTANCE ACTION: $(curl http://169.254.169.254/latest/meta-data/instance-action)\n"
echo "INSTANCE ID: $(curl http://169.254.169.254/latest/meta-data/instance-id)\n"
echo "INSTANCE TYPE: $(curl http://169.254.169.254/latest/meta-data/instance-type)\n"
echo "KERNEL ID: $(curl http://169.254.169.254/latest/meta-data/kernel-id)\n"
@davejlong
davejlong / archive.applescript
Created January 27, 2015 00:22
Rebuilding Quick Actions in Outlook for Mac
(*
Script to Mark Item as Read and Move to folder "Archive"
For Microsoft Outlook 15
*)
tell application "Microsoft Outlook"
activate
set msgSet to current messages
if msgSet = {} then
error "No Messages selected. Select at least one message."
@aws-scripting-guy
aws-scripting-guy / gist:884ffa9d44bd14f7493a670543284552
Created April 2, 2016 18:33
AWS EC2 metadata. Check attached IAM role from EC2 instance. Get temporary credentials.
# Get IAM Role name from Instance Profile Id
curl http://169.254.169.254/latest/meta-data/iam/info
# Get credentials
curl http://169.254.169.254/latest/meta-data/iam/security-credentials/<role-name>
# More info
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html
@umrashrf
umrashrf / aws_ses.bash
Created July 26, 2016 19:05
Amazon AWS CLI - SES SEND EMAIL
sudo pip install awscli
aws configure
aws ses send-email \
--from "john@gmail.com" \
--destination "ToAddresses=mike@gmail.com" \
--message "Subject={Data=from ses,Charset=utf8},Body={Text={Data=ses says hi,Charset=utf8},Html={Data=,Charset=utf8}}"
@marclamberti
marclamberti / Airflow Version
Last active November 27, 2022 06:54
the_complete_hands_on_introduction_to_apache_airflow
2.1.0