Since Mavericks stopped using the deprecated ipfw (as of Mountain Lion), we'll be using pf to allow port forwarding.
####1. anchor file
Create an anchor file under /etc/pf.anchors/<anchor file> with your redirection rule like:
| #!/bin/sh | |
| remove_dangling() { | |
| echo "Removing dangling images ..." | |
| docker rmi $(docker images -f dangling=true -q) | |
| } | |
| remove_stopped_containers() { | |
| echo "Removing stopped containers ..." | |
| docker rm $(docker ps -qa) |
| #!/usr/bin/ruby | |
| # Create display override file to force Mac OS X to use RGB mode for Display | |
| # see http://embdev.net/topic/284710 | |
| require 'base64' | |
| data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
| edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
| vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
| # requires BSD sed | |
| namespace :whitespace do | |
| desc 'Removes trailing whitespace' | |
| task :cleanup do | |
| sh %{for f in `find . -type f | grep -v .git | grep -v ./vendor | grep -v ./tmp | egrep ".(rb|js|haml|html|css|sass)"`; | |
| do sed -i '' 's/ *$//g' "$f"; | |
| done}, {:verbose => false} | |
| puts "Task cleanup done" | |
| end |