One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| #!/bin/bash -x | |
| set -e | |
| # https://www.digitalocean.com/community/tutorials/how-to-use-floating-ips-on-digitalocean | |
| DESTINATION_IP=$1 | |
| shift || (echo "E: Destination IP is not provided. Aborting"; exit 1) | |
| ANCHOR_GW=$(curl -s http://169.254.169.254/metadata/v1/interfaces/public/0/anchor_ipv4/gateway) |
| # Download latest archlinux bootstrap package, see https://www.archlinux.org/download/ | |
| wget 'ftp://ftp.nluug.nl/pub/os/Linux/distr/archlinux/iso/latest/archlinux-bootstrap-*-x86_64.tar.gz' | |
| # Make sure you'll have enough entropy for pacman-key later. | |
| apt-get install haveged | |
| # Install the arch bootstrap image in a tmpfs. | |
| mount -t tmpfs none /mnt | |
| cd /mnt | |
| tar xvf ~/archlinux-bootstrap-*-x86_64.tar.gz --strip-components=1 |
| BLOCKS=$(nslookup -q=TXT _cloud-netblocks.googleusercontent.com 8.8.8.8 | awk -F "spf1 " '{print $2}' | sed -e "s/include:/\n/g" | sed -e "s/?all\"//g" | grep -v ^$) | |
| echo "$BLOCKS" | while read block; do nslookup -q=TXT $block 8.8.8.8 | awk -F "spf1 " '{print $2}' | sed -e "s/ip4:/\n/g" | sed -e "s/?all\"//g" |grep -v "^ip6:" | grep -v ^$; done ; |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>PayloadContent</key> | |
| <array> | |
| <dict> | |
| <key>IKEv2</key> | |
| <dict> | |
| <key>AuthName</key> |
| #!/bin/bash | |
| # https://cloud.google.com/compute/docs/faq#find_ip_range | |
| # nslookup -q=TXT _cloud-netblocks.googleusercontent.com 8.8.8.8 | |
| myarray=() | |
| for LINE in `dig txt _cloud-netblocks.googleusercontent.com +short | tr " " "\n" | grep include | cut -f 2 -d :` | |
| do | |
| myarray+=($LINE) | |
| for LINE2 in `dig txt $LINE +short | tr " " "\n" | grep include | cut -f 2 -d :` |
| #!/bin/bash | |
| # You need: curl, jq, and ipcalc to run this. | |
| # You should already have cut, sort and uniq if you're on OS X or Linux. | |
| RANGES=$(curl -s https://ip-ranges.amazonaws.com/ip-ranges.json | jq .prefixes | jq '.[] | select(.region=="us-east-1")' | jq 'select(.service=="EC2")' | jq .ip_prefix | cut -d '"' -f 2 | sort | uniq) | |
| for range in $RANGES | |
| do | |
| MIN=$(ipcalc -bn $range | grep "HostMin" | cut -d ':' -f 2) |
| #!/bin/sh | |
| set -e | |
| set -x | |
| for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3) | |
| do | |
| npm -g install "$package" | |
| done |
Full blog post can be found here: http://pnommensen.com/2014/09/07/high-performance-ghost-configuration-with-nginx/
Ghost is an open source platform for blogging founded by John O'Nolan and Hannah Wolfe. It's a node.js application and therefore works great in conjunction with nginx. This guide will will help you create a high performance nginx virtual host configuration for Ghost.
"Don't use #nodejs for static content" - @trevnorris. If #nginx isn't sitting in front of your node server, you're probably doing it wrong.
— Bryan Hughes (@nebrius) August 30, 2014
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
The node.js application runs on a port on your server