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
#!/bin/bash | |
echo "*****************************************" | |
echo " Based on information from Google" | |
echo " http://dev.chromium.org/spdy/spdy-best-practices" | |
echo "*****************************************" | |
sudo su | |
yum –y update | |
echo "*****************************************" | |
echo " Changing initcwnd and initrwnd" | |
echo " Step 1: check route settings." |
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
#!/bin/bash | |
############################################### | |
# To use: | |
# https://raw.github.com/gist/2776351/??? | |
# chmod 777 install_postgresql.sh | |
# ./install_postgresql.sh | |
############################################### | |
echo "*****************************************" | |
echo " Installing PostgreSQL" | |
echo "*****************************************" |
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
# Set "Smart" Relay Host | |
sudo sed -i.bak -e 's/DS$/DSsmtp.west.cox.net/' /etc/mail/sendmail.cf | |
# Restart Sendmail | |
/etc/init.d/sendmail restart |
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
#!/bin/bash | |
############################################### | |
# To use: | |
# wget https://raw.github.com/gist/4411254 | |
# chmod 777 github-ubuntu.sh | |
# ./github-ubuntu.sh | |
############################################### | |
echo "*****************************************" | |
echo " Step 1: Check your keys" | |
echo "*****************************************" |
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
#!/bin/bash | |
############################################### | |
# To use: | |
# wget https://raw.github.com/gist/4411254 | |
# chmod 777 setup_nginx.sh | |
# ./setup_nginx.sh | |
############################################### | |
echo "*****************************************" | |
echo " Step 1: Install nngix" | |
echo "*****************************************" |
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
# Example 1 | |
# ------------------------------------------------- | |
# nginx config file for nodejs | |
# | |
# you can put nginx in front of node for two good reasons: | |
# 1) To take some of the load off nodejs for serving | |
# anything static. | |
# 2) To run multiple nodjs sites on one server | |
# domain1:80 -|->nginx-|-> nodejs:3000 | |
# domain2:80 -| |-> nodejs:4000 |
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
// This is for SEO: We *only* want to serve from | |
// either www.domain.com or just domain.com but *not* both. | |
// So we need to choose and then do a 301 redirect to get | |
// traffic where we want it. | |
// | |
// NOTE: Don't hardcode the http:// or https:// in the redirect | |
// URI; this makes life suck when switching between dev and prod | |
// environments - use req.protocol instead as we do below. | |
// | |
// Also note that in order to use req.protocol reliably behind a |
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
❯ jitsu deploy | |
info: Welcome to Nodejitsu dstroot | |
info: jitsu v0.13.16, node v0.10.28 | |
info: It worked if it ends with Nodejitsu ok | |
info: Executing command deploy | |
info: Analyzing application dependencies in node app.js | |
warn: Local package version appears to be old | |
warn: The package.json version will be incremented automatically | |
warn: About to write /Users/Dan/Code/skeleton/package.json | |
data: |
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
Show hidden characters
{ | |
"disallowTrailingComma": true, | |
"requireSpaceAfterLineComment": true, | |
"requireSpacesInConditionalExpression": true | |
} |
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
/** | |
* World's simplest express server | |
* - used to serve index.html from /public | |
*/ | |
var express = require('express'); | |
var serveStatic = require('serve-static'); | |
var app = express(); | |
app.use(serveStatic(__dirname + '/public')); |