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
function addTwoNumbers(x, y) {
return x + y;
}
function testAddTwoNumbers() {
var x = 5;
var y = 1;
var sum1 = x + y;
var sum2 = addTwoNumbers(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?

@hemanth22
hemanth22 / pom.xml
Created November 4, 2018 12:30 — forked from 13yo/pom.xml
Example pom.xml
<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>
@hemanth22
hemanth22 / git.io.sh
Created November 18, 2018 07:09
Git.io custom url
curl https://git.io -F "url=https://gist.githubusercontent.com/gabrielbarros/4e7a81ea0e8694ded9aa0d648aebc231/raw" -F "code=howto"
# Then: https://git.io/howto
@hemanth22
hemanth22 / make_github_issue.py
Created January 19, 2019 13:44 — forked from JeffPaine/make_github_issue.py
Make an issue on github using API V3 and Python
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'
@hemanth22
hemanth22 / speedtest-ifttt.sh
Created January 19, 2019 16:10 — forked from aallan/speedtest-ifttt.sh
Modified version of Henrik Bengtsson's speedtest-cli code which will dispatch the test results to the IFTTT Maker Channel.
#!/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)
@hemanth22
hemanth22 / notify_by_ifttt.pl
Created January 19, 2019 16:42 — forked from stefb69/notify_by_ifttt.pl
Nagios / Shinken notification script to trigger ifttt receipes via Maker Channel
#!/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.