-
update_interface_config
to prevent new interface is added when stop/start instance in EC2 classic or create imaage with existing interface -
add_new_serial_if || log_failure_msg "can't add serial interfaces"
no serial interface in EC2
| # If you're looking into the C10M problem (10 million concurrent connections) | |
| # you might want to play with DPDK (Originally proprietry Intel, now open source) | |
| # | |
| # C10M: http://c10m.robertgraham.com/ | |
| # DPDK: http://dpdk.org/ | |
| # | |
| # This is a quick summary how to install dpdk on ubuntu | |
| # running inside virtualbox on a mac | |
| # On my Mac: |
| # place the contents of this file in, e.g., spec/re_run_friendly_formatter.rb | |
| # | |
| # and in .rspec: | |
| # | |
| # --format ReRunFriendlyFormatter | |
| require "rspec/core/formatters/progress_formatter" | |
| class ReRunFriendlyFormatter < RSpec::Core::Formatters::ProgressFormatter | |
| RSpec::Core::Formatters.register self, :dump_summary |
The MBP is my development machine, so I needed all of my tools installed with the ability to update them with ease. In the past, I used MacPorts to take care of my MySQL, Memcached, and Ruby installions and it worked just fine. This time around however, I wanted something new and fun. Homebrew.
Homebrew is a new package manager for OS X. Unlike Fink or MacPorts, Homebrew integrates with the core operating system, reducing the number of extra libraries to install etc. Another neat feature is the ability to write software package recipes in Ruby, awesome.
Here are some raw installation instructions (clean system). I like to keep everything under user ownership to make life more enjoyable, say no to sudo.
You will need the latest version of xcode, you can get it here. After the installation is complete, you may continue.
sudo mkdir /usr/local| # Credit to http://unix.stackexchange.com/a/4291 for the cd() implementation. | |
| alias dc='popd' | |
| alias flip='pushd' | |
| function cd() | |
| { | |
| if [ $# -eq 0 ]; then | |
| DIR="${HOME}" | |
| else |
| #!/bin/bash | |
| echo '#!/bin/bash' | |
| echo '' | |
| echo 'failed_items=""' | |
| echo 'function install_package() {' | |
| echo 'echo EXECUTING: brew install $1 $2' | |
| echo 'brew install $1 $2' | |
| echo '[ $? -ne 0 ] && $failed_items="$failed_items $1" # package failed to install.' | |
| echo '}' |
| # URI of the local (caching) HTTP proxy | |
| LOCAL_HTTP_PROXY = 'http://192.168.33.200:8123' | |
| # Configures vagrant-cachier and vagrant-proxyconf. | |
| # Should be called only on "local machine" providers. | |
| def configure_caching(config) | |
| if Vagrant.has_plugin?('vagrant-cachier') | |
| config.cache.enable_nfs = true | |
| config.cache.enable :gem | |
| config.cache.enable :npm |
| #!/bin/sh | |
| # create custom fact to identify the role of this server | |
| mkdir -p /etc/facter/facts.d/ | |
| echo "server_role=puppetmaster" >> /etc/facter/facts.d/server_role.txt | |
| # make sure everything is up to date | |
| wget http://apt.puppetlabs.com/puppetlabs-release-raring.deb | |
| dpkg -i puppetlabs-release-raring.deb | |
| apt-get update |
| #!/bin/sh | |
| [[ -n "$1" && -n "$2" ]] || { echo "Usage: $0 <interface to grab multicast packets from> <interface to send modified packets to> [target MAC address 1] [target MAC address 2] ..."; exit 0 ; } | |
| IIF=$1 | |
| OIF=$2 | |
| shift | |
| shift | |
| SRC_MACADDR=`ip link show $OIF | awk '/ether/ {print $2}' | tr -d :` |
| #!/usr/bin/ruby | |
| require 'rubygems' | |
| require 'packetfu' | |
| dev = ARGV[0] | |
| mac=`ip link show #{dev} | awk '/ether/ {print $2}'` | |
| ARGV.shift | |
| dests = ARGV | |
| cap = PacketFu::Capture.new( |