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/bash | |
| ### ABOUT | |
| ### Runs rsync, retrying on errors up to a maximum number of tries. | |
| ### Simply edit the rsync line in the script to whatever parameters you need. | |
| # Trap interrupts and exit instead of continuing the loop | |
| trap "echo Exited!; exit;" SIGINT SIGTERM | |
| MAX_RETRIES=50 |
| /* | |
| * ptarget.h | |
| * | |
| * Coded by Stefan Vogt, revised Feb 18, 2011. | |
| * Released under the FreeBSD license. | |
| * http://www.byteproject.net | |
| * | |
| * header for compiler and OS detection | |
| * | |
| */ |
| /* | |
| author: jbenet | |
| os x, compile with: gcc -o testo test.c | |
| linux, compile with: gcc -o testo test.c -lrt | |
| */ | |
| #include <time.h> | |
| #include <sys/time.h> | |
| #include <stdio.h> |
| # coding: utf-8 | |
| # Original File: https://github.com/mojombo/jekyll/blob/master/lib/jekyll/migrators/wordpress.rb | |
| # Modified by Yu-Cheng Chuang <[email protected]> | |
| # Licensed under MIT License (same as the original file) | |
| # This version of wordpressdotcom.rb is compatible | |
| # with the real-world Wordpress.com export file, which: | |
| # | |
| # - Makes paragraphs (<p>) and line breaks (<br>) |
| /* | |
| 12306 Auto Login => A javascript snippet to help you auto login 12306.com. | |
| Copyright (C) 2011 Kevintop | |
| Includes jQuery | |
| Copyright 2011, John Resig | |
| Dual licensed under the MIT or GPL Version 2 licenses. | |
| http://jquery.org/license | |
| Includes 12306.user.js |
| /* | |
| 12306 Auto Submit => A javascript snippet to help you auto submit. | |
| Copyright (C) 2011 Kevintop | |
| Includes jQuery | |
| Copyright 2011, John Resig | |
| Dual licensed under the MIT or GPL Version 2 licenses. | |
| http://jquery.org/license | |
| Includes 12306.user.js |
| #!/usr/bin/env python | |
| # From http://stackoverflow.com/questions/3085153/how-to-parse-the-manifest-mbdb-file-in-an-ios-4-0-itunes-backup | |
| import sys | |
| import hashlib | |
| mbdx = {} | |
| def getint(data, offset, intsize): | |
| """Retrieve an integer (big-endian) and new offset from the current offset""" | |
| value = 0 |
| #!/usr/bin/env python | |
| # -*- coding:utf-8 -*- | |
| import re | |
| import requests | |
| class Spider(object): | |
| def __init__(self, url, pattern, encoding): | |
| self.url = url | |
| self.pattern = pattern |
| ### UI controls | |
| q quit | |
| Q quit_watch_later | |
| t show_text ${track-list} | |
| i show_text "Title: ${media-title}\nFilename: ${filename}" | |
| p show_progress | |
| P osd | |
| f cycle fullscreen | |
| F cycle ontop | |
| g screenshot window |