Skip to content

Instantly share code, notes, and snippets.

View tpsrep0rts's full-sized avatar

TpsReports tpsrep0rts

View GitHub Profile
@tpsrep0rts
tpsrep0rts / README.md
Last active July 12, 2018 08:04
Optimized news aggregator
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
<FilesMatch ".(eot|ttf|otf|woff)">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
<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]
sudo env PATH=$PATH `which passenger-memory-stats`