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:
The code and instructions in this gist are from http://peterdowns.com/posts/open-iterm-finder-service.html. I've had to do this a few times and wanted to distill it the basics.
Automator
Application
Actions > Utilities > Run Applescript
open_in_iterm.app
into the window.function convert_to(n, base) { | |
if (base < 2 || base > 16) { | |
throw new Error("Invalid base '" + base + "'. Base must be >= 2 or <= 16"); | |
} | |
if (n === 0) { | |
return 0; | |
} | |
var length = Math.floor(Math.log10(n) / Math.log10(base)) + 1; |
#!/bin/bash | |
# | |
# This is sp, the command-line Spotify controller. It talks to a running | |
# instance of the Spotify Linux client over dbus, providing an interface not | |
# unlike mpc. | |
# | |
# Put differently, it allows you to control Spotify without leaving the comfort | |
# of your command line, and without a custom client or Premium subscription. | |
# |
#!/bin/zsh | |
function stock { | |
if [[ $* == *--clean* ]] | |
then | |
clean=true | |
else | |
clean=false | |
fi | |
html=$(curl -s https://finviz.com/quote.ashx?t=$1); |
-- ********************************************* | |
-- demonstrate how to get the program parameters | |
-- ********************************************* | |
local internal_name = select(1,...); | |
local visible_name = select(2,...); | |
gma.echo("Hello, you loaded the plugin " .. internal_name); -- you will see this message in the system monitor | |
-- ********************************************* |