$ 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; | |
} | |
function testAddTwoNumbers() { | |
var x = 5; | |
var y = 1; | |
var sum1 = x + y; | |
var sum2 = addTwoNumbers(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
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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>org.example</groupId> | |
<artifactId>jpademo</artifactId> | |
<version>1.0</version> | |
<packaging>jar</packaging> | |
<scm> |
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
curl https://git.io -F "url=https://gist.githubusercontent.com/gabrielbarros/4e7a81ea0e8694ded9aa0d648aebc231/raw" -F "code=howto" | |
# Then: https://git.io/howto |
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
import json | |
import requests | |
# Authentication for user filing issue (must have read/write access to | |
# repository to add issue to) | |
USERNAME = 'CHANGEME' | |
PASSWORD = 'CHANGEME' | |
# The repository to add this issue to | |
REPO_OWNER = 'CHANGEME' |
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
#!/usr/bin/env bash | |
########################################################################### | |
# Originally written by: Henrik Bengtsson, 2014 | |
# https://github.com/HenrikBengtsson/speedtest-cli-extras | |
# Modified to use IFTTT by: Alasdair Allan, 2015 | |
# License: GPL (>= 2.1) [http://www.gnu.org/licenses/gpl.html] | |
########################################################################### | |
# Character for separating values | |
# (commas are not safe, because some servers return speeds with commas) |
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
#!/usr/bin/perl -w | |
# IFTTT Notification for nagios, | |
# Largely inspired from the Notify My Andoid perl code | |
use strict; | |
use LWP::UserAgent; | |
use Getopt::Long; | |
use Pod::Usage; | |
# Grab our options. |