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:
#!/custom/ree/bin/ruby | |
# USAGE: | |
# | |
# echo "|/path/to/core_helper.rb %p %s %u %g" > /proc/sys/kernel/core_pattern | |
# | |
require 'etc' | |
require 'net/smtp' |
function git_prompt_info() { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$ZSH_THEME_GIT_PROMPT_SUFFIX" | |
} |
Adam | |
Albert | |
Andre | |
Arnaud | |
Aubert | |
Aubry | |
Bailly | |
Barbier | |
Baron | |
Barre |
Agathe | |
Alexandra | |
Alexia | |
Alice | |
Alicia | |
Amandine | |
Ambre | |
Amélie | |
Anaël | |
Anaëlle |
Aaron | |
Adam | |
Adrian | |
Adrien | |
Alexandre | |
Alexis | |
Amine | |
Anthony | |
Antoine | |
Antonin |
# Install dependencies | |
# | |
# * checkinstall: package the .deb | |
# * libpcre3, libpcre3-dev: required for HTTP rewrite module | |
# * zlib1g zlib1g-dbg zlib1g-dev: required for HTTP gzip module | |
apt-get install checkinstall libpcre3 libpcre3-dev zlib1g zlib1g-dbg zlib1g-dev && \ | |
mkdir -p ~/sources/ && \ | |
# Compile against OpenSSL to enable NPN |
curl --include \ | |
--no-buffer \ | |
--header "Connection: Upgrade" \ | |
--header "Upgrade: websocket" \ | |
--header "Host: example.com:80" \ | |
--header "Origin: http://example.com:80" \ | |
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \ | |
--header "Sec-WebSocket-Version: 13" \ | |
http://example.com:80/ |
This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.
While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.