Brew install all available AWS tools

If you happen to find yourself using a decent number of AWS services, you might find this useful. If there are any errata, please let me know.

As of this writing, this should install all of the formulas that inherit from AmazonWebServicesFormula:

brew install auto-scaling aws-cfn-tools aws-elasticache aws-elasticbeanstalk aws-iam-tools aws-sns-cli cloud-watch ec2-ami-tools ec2-api-tools elb-tools rds-command-line-tools

You’ll get some errors about failing to link service, which is the same file for all of the formulas which try to link it. You’ll have to force the link, but let’s make sure the files are all the same.

clay@laptop:1.9.3: ~ $ which service
/usr/local/bin/service

clay@laptop:1.9.3: ~ $ ls -alht /usr/local/bin/service
lrwxr-xr-x  1 clay  admin    43B Mar 29 04:11 /usr/local/bin/service -> ../Cellar/auto-scaling/1.0.61.1/bin/service

clay@laptop:1.9.3: ~ $ shasum /usr/local/bin/service
2b8c2f25d30db009b04fc2b7ae27591d07c07d7a  /usr/local/bin/service

clay@laptop:1.9.3: ~ $ shasum /usr/local/Cellar/aws-cfn-tools/1.0.12/bin/service
2b8c2f25d30db009b04fc2b7ae27591d07c07d7a  /usr/local/Cellar/aws-cfn-tools/1.0.12/bin/service

clay@laptop:1.9.3: ~ $ shasum /usr/local/Cellar/cloud-watch/1.0.13.4/bin/service
2b8c2f25d30db009b04fc2b7ae27591d07c07d7a  /usr/local/Cellar/cloud-watch/1.0.13.4/bin/service

clay@laptop:1.9.3: ~ $ shasum /usr/local/Cellar/elb-tools/1.0.17.0/bin/service
2b8c2f25d30db009b04fc2b7ae27591d07c07d7a  /usr/local/Cellar/elb-tools/1.0.17.0/bin/service

So, now that we see they’re all the same, we can go on and force the links:

brew link --overwrite elb-tools cloud-watch aws-cfn-tools

You might be able to get a a more up-to-date list by grepping for the AmazonWebServicesFormula class in the Homebrew repository.

grep -irI AmazonWebServicesFormula ./* | awk '{print "brew install " $1}' | sed 's/.\/Library\/Formula\///g' | sed 's/.rb:class//g' | grep -ve 'Library'

That should give you something similar to:


brew install auto-scaling
brew install aws-cfn-tools
brew install aws-elasticache
brew install aws-elasticbeanstalk
brew install aws-iam-tools
brew install aws-sns-cli
brew install cloud-watch
brew install ec2-ami-tools
brew install ec2-api-tools
brew install elb-tools
brew install rds-command-line-tools

Tagged , , , ,

Create JPEGs with random content using Python multiprocessing

Recently, I had a need to quickly generate a large number of JPEGs. I wrote this python script to generate JPEG images with random dimensions and content, as well as uuid4 filenames:

Continue reading

Tagged , , , , , ,

Python multiprocessing queues and pipes

I’m currently working on something that requires the use of parallel processing, so I decided to write a sample implementation to become familiar with Python’s Multiprocessing module.

Continue reading

Tagged , , , , , ,

TI LaunchPad development on Ubuntu 11.10 running in VirtualBox

VirtualBox Logo

In my previous post, I was having trouble debugging and writing the binary files to the TI LaunchPad from Ubuntu 11.10 running in VirtualBox on Mac OS X Lion. I also tried using the VirtualBox ExtensionPack with USB 2.0 support to no avail.

This is an extension of the previous post if you’re running Ubuntu 11.10 in VirtualBox 4.1.10 on OS X Lion.

So I’ve figured out how to program and debug the Launchpad from within the guest OS. Albeit with a couple of caveats:

  1. The driver from osx-launchpad will need to be installed on the host OS.
  2. You have to use remote debugging via the GDB remote stub that mspdebug creates.
  3. When you use “target remote” from msp430-gdb, it will segfault, yeay!
  4. There will be some compiling from source to avoid the segfault party.

Continue reading

Tagged , , , , , , , , ,

TI LaunchPad development on Ubuntu 11.10

Image from TI: CC(BY-SA)

I got my hands on a couple of TI LaunchPads and was surprised there is no official support for Linux. Sad day. Regardless, at $4.30 each + shipping, they’re a steal.

Interested in getting development running on Ubuntu, I was reading Hack A Day’s LaunchPad on Ubuntu article until I got to the mspgcc4 project page and noticed, “mspgcc4 is no longer supported. All contributions have been incorporated into mspgcc, which has newer versions of all components.” Following the link to the GCC toolchain for MSP430 Web Site, you’ll find install instructions for “Ubuntu and other Debian-derived distributions” which will tell you “mspgcc will be available in Ubuntu Oneiric. Packages are listed here, and were shepherded by Luca Bruno.”

tl;dr: Seeing the Hack A Day article was from August of 2010, I figured I would try to go with the more updated toolchain.

Continue reading

Tagged , , , ,

TIL: Java double and Double are quite different things

TIL: Today I Learned.

So I was happily tinkering away with Java when I got the error: double cannot be dereferenced.

Well, that certainly threw a wrench in things, so I did some searching. Apparently, double and Double, beginning with a capital ‘D’, are quite different things.

// this is a primitive datatype
double thisNumber = 1.0;

// this will give a dereferencing error
System.out.println(thisNumber.getClass());

// this is a wrapper class
Double thatNumber = 1.0;

// this will print: class java.lang.Double
System.out.println(thatNumber.getClass());

For more on primitive datatypes: Language Basics: Primitive Datatypes

For more on the wrapper classes: Numbers and Strings: The Numbers Classes

Tagged , , ,

How to get latest stable version of Nginx on Ubuntu

I’ve got a couple of technical posts in the pipeline, and due to their complexity and my obsession of making sure everything is absolutely spot-on, it’s taking a bit longer than I originally planned. So I figured I’d draw up something simple to go ahead and get the content rolling.

You can install the Nginx package from the regular Ubuntu repositories, but the versions there are generally lagging behind the current stable releases. Here I’ll show you how to install the latest stable version through Ubuntu’s package manager without having to compile from source!

 

Continue reading

Tagged , ,
Follow

Get every new post delivered to your Inbox.

Join 783 other followers