Skip to content

Instantly share code, notes, and snippets.

View hemanth22's full-sized avatar

Hemanth B hemanth22

View GitHub Profile
@hemanth22
hemanth22 / Vagrantfile
Created October 9, 2018 06:56 — forked from musaid/Vagrantfile
Vagrants
# -*- 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"
@hemanth22
hemanth22 / VAGRANT-Cheat-Sheet.md
Created October 9, 2018 07:30 — forked from carlessanagustin/VAGRANT-Cheat-Sheet.md
This is a VAGRANT cheat sheet

Vagrant Cheat Sheet

add image

local

$ vagrant box add {title} {url}
$ vagrant init {title}
$ vagrant up
@hemanth22
hemanth22 / addition.js
Last active May 6, 2024 16:46 — forked from adnanrahic/addition.js
js additionscript
function addTwoNumbers(x, y) {
return x + y;
}
console.log(addTwoNumbers(5, 1));
function addTwoNumbers(x, y) {
return x + y;
}
function testAddTwoNumbers() {
var x = 5;
var y = 1;
var sum1 = x + y;
var sum2 = addTwoNumbers(x, y);
function addTwoNumbers(x, y) {
return x + y;
}
function testAddTwoNumbers() {
// 1. ARRANGE
var x = 5;
var y = 1;
var sum1 = x + y;
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;
}
@hemanth22
hemanth22 / additionWithAssertions.js
Last active May 6, 2024 16:47 — forked from adnanrahic/additionWithAssertions.js
additionWithAssertionsjs
var assert = require('assert');
function addTwoNumbers(x, y) {
return x + y;
}
function testAddTwoNumbers() {
var x = 5;
var y = 1;
var sum1 = x + y;
@hemanth22
hemanth22 / addTwoNumbersTest.js
Last active May 6, 2024 16:47 — forked from adnanrahic/addTwoNumbersTest.js
addTwoNumbersTestjs
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;
@hemanth22
hemanth22 / README.md
Created October 22, 2018 18:12 — forked from hallazzang/README.md
Deploy JSP website using Docker + Apache Tomcat from scratch(without IDEs like Eclipse, IntelliJ, etc.)

Docker + Apache Tomcat + JSP

This article describes how to deploy a JSP website using Docker, Apache Tomcat.

Directory structure

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:

@hemanth22
hemanth22 / README.md
Created October 28, 2018 07:57 — forked from figaw/README.md
Setup for labs.play-with-k8s

From 0 to 100 w/ one command and 4ish minutes, in labs.k8s

tl;dr

  1. Click the raw button to get the raw-url of the fig-play-with-k8s.sh-file and, in a VM from labs.play-with-k8s.com,
  2. Run bash -x <( curl -L url-to-raw-gist )
  3. Copy the "blue-port-url" and change http to https
  4. Goto url in Firefox

What happens?