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:
| /* | |
| requires libgit2 | |
| */ | |
| package main | |
| import ( |
| function ParsedUrl(url) { | |
| var parser = document.createElement("a"); | |
| parser.href = url; | |
| // IE 8 and 9 dont load the attributes "protocol" and "host" in case the source URL | |
| // is just a pathname, that is, "/example" and not "http://domain.com/example". | |
| parser.href = parser.href; | |
| // IE 7 and 6 wont load "protocol" and "host" even with the above workaround, | |
| // so we take the protocol/host from window.location and place them manually |
| [unix_http_server] | |
| file=/var/run/supervisor.sock | |
| chmod=0770 | |
| chown=root:supervisor | |
| [supervisord] | |
| pidfile=/var/run/supervisord.pid | |
| nodaemon=false | |
| logfile=/var/log/supervisord/supervisord.log | |
| loglevel=error |
| FROM ubuntu:13.10 | |
| RUN apt-get update | |
| RUN DEBIAN_FRONTEND=noninteractive apt-get -y install golang | |
| RUN mkdir /go | |
| RUN export GOPATH=/go | |
| ENV GOPATH /go | |
| RUN export PATH=$PATH:$GOPATH/bin |
| var gulp = require('gulp'); | |
| var browserify = require('gulp-browserify'); | |
| var concat = require('gulp-concat'); | |
| var styl = require('gulp-styl'); | |
| var refresh = require('gulp-livereload'); | |
| var lr = require('tiny-lr'); | |
| var server = lr(); | |
| var paths = { | |
| js: 'src/**/*.js', |
| var message = "hello, how are you Tal?"; | |
| if (~message.indexOf('Tal')) { | |
| console.log('found matching text'); | |
| } |
WARNING: If you're reading this in 2021 or later, you're likely better served by reading:
(This gist was created in 2013 and targeted the legacy GOPATH mode.)
$ ssh -A vm
$ git config --global url."[email protected]:".insteadOf "https://github.com/"| p { | |
| font-size:18px; | |
| line-height:24px; | |
| text-align: justify; | |
| background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAbCAYAAAC5rTVJAAAA3ElEQVQY0wXBwU3CABQA0Oe3IVgarFpDwYNH41GvLuMYzuQ4boBKiqGBptbCoQHf8+b19C4/vb44RWElmTdWEyJXaUuqMZFaO1zykxCJ2nDBJoghoxnjeCv6lHqEYSaaKdsc+4WoMz5nN/QLsZ7wcXjkrxSrCdvjE10hqjG+zmlz8ZOgSehTsQkcS7pEON6yD4VBGGa0Y6Ve2C/YPptrhH7h+vvgTi38lR7USmuhK9zrZZZCm7uy1VkKfSrVoRa6xJmdQisKA1qjlCj1Er/SjJhrDCrNlLhTK+3UGf/2IVZs3eANJQAAAABJRU5ErkJggg==); | |
| background-size:100% 72px; | |
| -webkit-background-clip:text; | |
| -webkit-text-fill-color:transparent | |
| } |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
| <title>Stripe Getting Started Form</title> | |
| <!-- The required Stripe lib --> | |
| <script type="text/javascript" src="https://js.stripe.com/v2/"></script> | |
| <!-- jQuery is used only for this example; it isn't required to use Stripe --> |