mkdir nuProject
bower init
npm init -y
touch gulfile.js
mkdir -p public/{css,js,modules,partials}
touch public/css/style.css
touch public/js/script.js
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
var assert = require('assert'); | |
describe('String#split', function(){ | |
it('should return an array', function(){ | |
assert(Array.isArray('a,b,c'.split(','))); | |
}); | |
}); |
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
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) { |
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
(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); | |
}); | |
}); | |
}); |
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
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 |
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 | |
answer_is_yes() { | |
[[ "$REPLY" =~ ^[Yy]$ ]] \ | |
&& return 0 \ | |
|| return 1 | |
} | |
ask() { | |
print_question "$1" |
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
#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 |