mkdir -p /usr/local/etc/nginx/sites-available
File locations:
nginx.confto/usr/local/etc/nginx/defaultanddefault-sslto/usr/local/etc/nginx/sites-available
#STOP APACHE
sudo apachectl stop
| var page = require('webpage').create(); | |
| page.open('http://net.tutsplus.com', function () { | |
| var title = page.evaluate(function () { | |
| var posts = document.getElementsByClassName("post"); | |
| posts[0].style.backgroundColor = "#000000"; | |
| return document.title; | |
| }); | |
| page.clipRect = { top: 0, left: 0, width: 600, height: 700 }; | |
| page.render(title + ".png"); |
mkdir -p /usr/local/etc/nginx/sites-available
File locations:
nginx.conf to /usr/local/etc/nginx/default and default-ssl to /usr/local/etc/nginx/sites-available #STOP APACHE
sudo apachectl stop
| # Guide | |
| # Configure the essential configurations below and do the following: | |
| # | |
| # Repository Creation: | |
| # cap deploy:repository:create | |
| # git add . | |
| # git commit -am "initial commit" | |
| # git push origin master | |
| # | |
| # Initial Deployment: |
| #clear all the npms | |
| npm -g ls | grep -v 'npm@' | awk '/@/ {print $2}' | awk -F@ '{print $1}' | xargs npm -g rm | |
| #remove all the binaries | |
| sudo rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/{npm*,node*,man1/node*} | |
| #compile | |
| wget http://nodejs.org/dist/v0.10.40/node-v0.10.40.tar.gz | |
| tar -xzf node-v0.10.40.tar.gz | |
| ./configure |
| #!/bin/bash | |
| answer_is_yes() { | |
| [[ "$REPLY" =~ ^[Yy]$ ]] \ | |
| && return 0 \ | |
| || return 1 | |
| } | |
| ask() { | |
| print_question "$1" |
| yum update -y; reboot; | |
| yum install kernel-devel -y; reboot; | |
| cd /tmp/; | |
| wget http://download.virtualbox.org/virtualbox/5.0.10/VBoxGuestAdditions_5.0.10.iso; | |
| sudo mkdir /mnt/ | |
| sudo mount -o loop VBoxGuestAdditions_5.0.10.iso /mnt | |
| sudo /mnt/VBoxLinuxAdditions.run |
| (function () { | |
| 'use strict'; | |
| describe('Give it some context', function () { | |
| describe('maybe a bit more context here', function () { | |
| it('should run here few assertions', function () { | |
| expect(true).toBe(true); | |
| }); | |
| }); | |
| }); |
| var express = require('express'); | |
| var bodyParser = require('body-parser'); | |
| var app = express(); | |
| app.use(bodyParser.json()); // for parsing application/json | |
| app.use(bodyParser.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded | |
| app.get("/", function(req, res) { |