$ 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
# -*- 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; |
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 expect = require('chai').expect; | |
var addTwoNumbers = require('../addTwoNumbers'); | |
describe('addTwoNumbers()', function () { | |
it('should add two numbers', function () { | |
// 1. ARRANGE | |
var x = 5; | |
var y = 1; | |
var sum1 = x + y; |
This article describes how to deploy a JSP website using Docker, Apache Tomcat.
I found a way to make a minimal JSP web application from scratch, without any IDE. (ref: https://www.youtube.com/watch?v=JEBR_KJdzSk)
First, organize your working directory like this:
- Click the
raw
button to get the raw-url of thefig-play-with-k8s.sh
-file and, in a VM from labs.play-with-k8s.com, - Run
bash -x <( curl -L url-to-raw-gist )
- Copy the "blue-port-url" and change
http
tohttps
- Goto url in Firefox