Improvements to source made available on pythonprogramming.net tutorial series. Original source can be found here: https://pythonprogramming.net/go/concurrency-web-app-go-language-programming-tutorial/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add these to: ~/.bash_profile | |
function getServerIp() { | |
SERVER_NAME="$1" | |
grep "^$SERVER_NAME," ~/servers/ips | awk -F, '{ print $2 }' | |
} | |
function ssh_connect() { | |
IP=$(getServerIp "$1") | |
if [ -z "$IP" ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<FilesMatch ".(eot|ttf|otf|woff)"> | |
Header set Access-Control-Allow-Origin "*" | |
</FilesMatch> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
ProxyPreserveHost On | |
ProxyRequests Off | |
ServerName localhost | |
ServerAlias localhost | |
RewriteEngine on | |
RewriteRule "^/origami/(.*)$" "http://localhost:9000/$1" [P,L] | |
RewriteRule "^/$" "http://localhost:9000/" [P,L] | |
RewriteRule "^/(.*\.html)$" "http://localhost:9000/$1" [P,L] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo env PATH=$PATH `which passenger-memory-stats` |