####1. anchor file
Create an anchor file under /etc/pf.anchors/<anchor file>
with your redirection rule like:
rdr pass on lo0 inet proto tcp from any to 127.0.0.2 port 80 -> 127.0.0.1 port 40070
#!/bin/bash | |
CONTENT_TYPE="application/json" | |
DESCRIPTION="bad things™ are happening" | |
URL="https://events.pagerduty.com/generic/2010-04-15/create_event.json" | |
if [ $# -ne 3 ]; then | |
echo "Usage: pd-event.sh [TYPE] [SERVICE KEY] [INCIDENT KEY]" | |
echo " - TYPE: [t]rigger | [a]cknowledge | [r]esolve" | |
echo " - SERVICE KEY: unique identifier for service" |
#!/bin/bash | |
set -eo pipefail | |
cert_file="$1" | |
if [ -z "$cert_file" ]; then | |
echo "Usage: create-startssl-cert-bundle CERTIFICATE_FILE" >&2 | |
echo >&2 | |
echo "Bundles StartSSL's intermediate certs and writes combined certificate to stdout" >&2 | |
exit 1 |
/** | |
* DUMP | |
* | |
* Dumps a variable in a readable form to the console, this is a recursive function | |
* so be careful of nested references that may cause it to overflow... (untested for that) | |
* | |
* @v ANYTHING [Any variable] | |
* @name STRING [The name of the variable, optional, used internally when looping objects and arrays] | |
* @spacing STRING [The prefix spacing, used internally when looping objects and arrays] | |
*/ |
#!/bin/bash | |
# http://archives.postgresql.org/pgsql-admin/2010-05/msg00285.php | |
# Gera linhas de configuração que podem ser adicionadas ao sysctl | |
# com base no total de RAM do sistema. A saída | |
# permite até 50% da memória física para ser alocada como | |
# shared memory. | |
# No Linux, você pode usar desta forma (como root): | |
# | |
# ./shmsetup >> /etc/sysctl.conf |
#!/bin/bash | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java7-installer oracle-java7-set-default |