$ vagrant box add {title} {url}
$ vagrant init {title}
$ vagrant up
This file contains 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
Vagrant's sftp to be available on port 2222. So, from Filezilla, I use: | |
host: 127.0.0.1 //or your projects IP | |
port: 2222 | |
protocol: sftp | |
logon type: normal (with the default user and password being "vagrant") |
This file contains 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
## Vagrantfile | |
config.vm.provider :virtualbox do |vb| | |
# start windowed (default is headless) | |
vb.gui = true | |
vb.customize [ "modifyvm", :id, "--memory", "512"] | |
vb.name = "#{NAME}" |
This file contains 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.provider :virtualbox do |vb| | |
vb.name = "app.intranet" | |
vb.customize [ 'modifyvm', :id, '--memory', '512' ] | |
vb.customize [ 'modifyvm', :id, '--cpus', '1' ] | |
end |
This file contains 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.ssh.username = "vagrant" | |
config.ssh.password = "vagrant" | |
config.vm.box = "trusty64" |
This file contains 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 addTwoNumbers(x, y) { | |
return x + y; | |
} | |
console.log(addTwoNumbers(5, 1)); |
This file contains 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 addTwoNumbers(x, y) { | |
return x + y; | |
} | |
function testAddTwoNumbers() { | |
var x = 5; | |
var y = 1; | |
var sum1 = x + y; | |
var sum2 = addTwoNumbers(x, y); |
This file contains 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 addTwoNumbers(x, y) { | |
return x + y; | |
} | |
function testAddTwoNumbers() { | |
// 1. ARRANGE | |
var x = 5; | |
var y = 1; | |
var sum1 = x + y; |
This file contains 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 = { | |
equal: function(firstValue, secondValue) { | |
if (firstValue != secondValue) | |
throw new Error('Assert failed, ' + firstValue + ' is not equal to ' + secondValue + '.'); | |
} | |
}; | |
function addTwoNumbers(x, y) { | |
return x + y; | |
} |
This file contains 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'); | |
function addTwoNumbers(x, y) { | |
return x + y; | |
} | |
function testAddTwoNumbers() { | |
var x = 5; | |
var y = 1; | |
var sum1 = x + y; |