Install HomeBrew first
brew update
brew tap caskroom/cask
brew install brew-caskIf you get the error "already installed", follow the instructions to unlink it, then install again:
| #!/bin/sh | |
| # Build Zsh from sources on Ubuntu. | |
| # From http://zsh.sourceforge.net/Arc/git.html and sources INSTALL file. | |
| # Some packages may be missing | |
| sudo apt-get install -y git-core gcc make autoconf yodl libncursesw5-dev texinfo | |
| git clone git://zsh.git.sf.net/gitroot/zsh/zsh | |
| cd zsh |
| # Something in lines of http://stackoverflow.com/questions/348630/how-can-i-download-all-emails-with-attachments-from-gmail | |
| # Make sure you have IMAP enabled in your gmail settings. | |
| # Right now it won't download same file name twice even if their contents are different. | |
| import email | |
| import getpass, imaplib | |
| import os | |
| import sys | |
| detach_dir = '.' |
| #!/usr/bin/env python | |
| """Merge multiple JUnit XML results files into a single results file.""" | |
| # MIT License | |
| # | |
| # Copyright (c) 2012 Corey Goldberg | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Disabled</key> | |
| <false/> | |
| <key>Label</key> | |
| <string>com.nateofnine.FlaggedMailToReminders</string> | |
| <key>Program</key> | |
| <string>/usr/bin/osascript</string> |
| wget http://stedolan.github.io/jq/download/linux64/jq | |
| aws ec2 describe-instances --filters "Name=tag:Name,Values=$NAME" \ | |
| "Name=instance-state-name,Values=running" \ | |
| | jq -r \ | |
| ".Reservations[] | .Instances[] | .InstanceId" \ | |
| aws ec2 describe-volumes --filters \ | |
| "Name=status,Values=available" \ | |
| | jq -r ".Volumes[] | .VolumeId" \ |
Install HomeBrew first
brew update
brew tap caskroom/cask
brew install brew-caskIf you get the error "already installed", follow the instructions to unlink it, then install again:
| # Copy AWS credentials and config from host to guest | |
| $aws_credentials_path = ENV['HOME'] + "/.aws/credentials" | |
| $aws_config_path = ENV['HOME'] + "/.aws/config" | |
| if File.file?($aws_credentials_path) && File.file?($aws_config_path) then | |
| config.vm.provision "shell", | |
| inline: "mkdir -p /root/.aws", | |
| privileged: true | |
| config.vm.provision "shell", | |
| inline: "mkdir -p /home/nginx/.aws", |
| #!/bin/bash | |
| DOMAIN=$1 | |
| PORT=$2 | |
| TYPES=(A CNAME) | |
| # resolve zone id | |
| ZONE=$(aws route53 list-hosted-zones --query 'HostedZones[?Name==`'$DOMAIN'.`].Id' --output text) | |
| if [[ -z "$ZONE" ]]; then | |
| echo "Unrecognized domain: $1" >&2 |
As an example query AWS for a list of all NAT Instance AMIs:
aws ec2 describe-images --filter Name="owner-alias",Values="amazon" --filter Name="name",Values="amzn-ami-vpc-nat*" --region us-west-2 | jq '.Images | sort_by(.CreationDate)'
If only specific fields are required to print into output: