<commit_before>HEI Workshop
===

Table of Contents
---

1. [Dev Tools Pre-Requisites](#dev-pre-requisites)
1. [Dev Tools Installation](#dev-tools-installation)
  - 1a. [Windows](#windows)
  - 1b. [Linux](#linux)
  - 1c. [OSX](#osx)
1. [Getting Started](#getting-started)
1. [Blog App Backend](#blog-app-back-end)
1. [Blog App WebUI](#blog-app-front-end)
1. [Workshop Schedule](#workshop-schedule)


## Dev Pre-Requisites

- Java SE Development Kit 8
- Git `>= v2.x.x`
- Node.js `>= 4.x.x || >= 5.x.x`
- Maven `>= 3.2.5`
- Eclipse, NetBeans or any preferred IDE

## Dev Tools Installation

### Windows

To make tool installations a breeze, PowerShell 3.0 comes in handy accompanied
by [Scoop](http://scoop.sh/) a command-line installer for windows.


> **Installing PowerShell 3.0**
>
> For detailed instructions on installing Windows PowerShell 3.0 please head to
> this [link](https://technet.microsoft.com/en-us/library/hh847837.aspx).
> If you're running Windows 8.1 or Windows 10, you may now jump to the
> instructions below.

**Installing Scoop**

Open Windows PowerShell and type in the command below:

```bash
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')

# As per Scoop's page: if you get an error you might need to
# change the execution policy (i.e. enable Powershell) with:
set-executionpolicy unrestricted -s cu

# After Scoop has installed, we'll also need the extras to access
# components that aren't available in scoop's default bucket.
scoop bucket add extras https://github.com/lukesampson/scoop-extras.git
```

**Installing Dev Pre-Requisites**

```bash
# Install JDK 8
scoop install oraclejdk

# Install Git
scoop install git

# Install Node.js
scoop install nodejs

# Install Maven
scoop install maven
```

### Linux

If you're a `*nix`, you probably know this already or have a better method in
doing it (please create a PR!).

```bash
## Prepare repositories
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo add-apt-repository ppa:git-core/ppa
$ curl -sL https://deb.nodesource.com/setup | sudo bash -
$ sudo apt-get update

## Install JDK 8
$ sudo apt-get install oracle-java8-installer

# Verify installation
$ java -version

## Install Git
$ sudo apt-get install git

## Install nodejs
# Setup for Ubuntu info from https://github.com/joyent/node/wiki/installing-node.js-via-package-manager
$ sudo apt-get install nodejs

# Install Packages
npm install -g npm bower

# Cleanup package cache (optional)
$ sudo apt-get clean

## Install Maven
$ sudo apt-get install maven
```

### OSX

```bash
# Install Homebrew
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

# Tap into caskroom and homebrew-versions
$ brew tap caskroom/cask
$ brew tap homebrew/versions

# Install Pre-requisites
$ brew cask install java
$ brew install git
$ brew install node
$ brew install maven
```

## Getting Started

To follow through the entire workshop or just run app to your local environment,
you may clone this repository

```bash
$ git clone --depth=1 --branch=master --recurse-submodules https://github.com/toro-io/hei-workshop.git
```

## Blog App Back-end<commit_msg>Add instructions to init mvn deps<commit_after>HEI Workshop
===

Table of Contents
---

1. [Dev Tools Pre-Requisites](#dev-pre-requisites)
1. [Dev Tools Installation](#dev-tools-installation)
  - 1a. [Windows](#windows)
  - 1b. [Linux](#linux)
  - 1c. [OSX](#osx)
1. [Getting Started](#getting-started)
1. [Blog App Backend](#blog-app-back-end)
1. [Blog App WebUI](#blog-app-front-end)
1. [Workshop Schedule](#workshop-schedule)


## Dev Pre-Requisites

- Java SE Development Kit 8
- Git `>= v2.x.x`
- Node.js `>= 4.x.x || >= 5.x.x`
- Maven `>= 3.2.5`
- Eclipse, NetBeans or any preferred IDE

## Dev Tools Installation

### Windows

To make tool installations a breeze, PowerShell 3.0 comes in handy accompanied
by [Scoop](http://scoop.sh/) a command-line installer for windows.


> **Installing PowerShell 3.0**
>
> For detailed instructions on installing Windows PowerShell 3.0 please head to
> this [link](https://technet.microsoft.com/en-us/library/hh847837.aspx).
> If you're running Windows 8.1 or Windows 10, you may now jump to the
> instructions below.

**Installing Scoop**

Open Windows PowerShell and type in the command below:

```bash
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')

# As per Scoop's page: if you get an error you might need to
# change the execution policy (i.e. enable Powershell) with:
set-executionpolicy unrestricted -s cu

# After Scoop has installed, we'll also need the extras to access
# components that aren't available in scoop's default bucket.
scoop bucket add extras https://github.com/lukesampson/scoop-extras.git
```

**Installing Dev Pre-Requisites**

```bash
# Install JDK 8
scoop install oraclejdk

# Install Git
scoop install git

# Install Node.js
scoop install nodejs

# Install Maven
scoop install maven
```

### Linux

If you're a `*nix`, you probably know this already or have a better method in
doing it (please create a PR!).

```bash
## Prepare repositories
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo add-apt-repository ppa:git-core/ppa
$ curl -sL https://deb.nodesource.com/setup | sudo bash -
$ sudo apt-get update

## Install JDK 8
$ sudo apt-get install oracle-java8-installer

# Verify installation
$ java -version

## Install Git
$ sudo apt-get install git

## Install nodejs
# Setup for Ubuntu info from https://github.com/joyent/node/wiki/installing-node.js-via-package-manager
$ sudo apt-get install nodejs

# Install Packages
npm install -g npm bower

# Cleanup package cache (optional)
$ sudo apt-get clean

## Install Maven
$ sudo apt-get install maven
```

### OSX

```bash
# Install Homebrew
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

# Tap into caskroom and homebrew-versions
$ brew tap caskroom/cask
$ brew tap homebrew/versions

# Install Pre-requisites
$ brew cask install java
$ brew install git
$ brew install node
$ brew install maven
```

Verify that prerequisites are installed:

```
$ mvn -v
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.8.0_74, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_PH, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-37-generic", arch: "amd64", family: "unix"
$ npm -v # versions may vary
3.7.2
```

To reduce waiting time for the workshop, it is recommended that you initialize your *maven* repository. You can do this by downloading this [pom.xml](https://gist.githubusercontent.com/devcsrj/5b921a3b83b9975a3d14/raw/920badec76e5563a738c60de30ab8d832662d95f/pom.xml) to your file system. Then, on your terminal run:

```
$ mvn install
```

While not required, it is also recommended that you install:

- [Postman](http://www.getpostman.com/) - tool to create and send HTTP requests
- JSONView ([firefox](https://addons.mozilla.org/en-US/firefox/addon/jsonview/) | [chrome](https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc)) - pretty view for json content on your browser


## Getting Started

To follow through the entire workshop or just run app to your local environment,
you may clone this repository

```bash
$ git clone --depth=1 --branch=master --recurse-submodules https://github.com/toro-io/hei-workshop.git
```

## Blog App Back-end
{'fraction_non_alphanumeric': 0.12159106026340295, 'fraction_numerical': 0.01875748303844619, 'mean_word_length': 4.163461538461538, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 23, 'https://': 17, 'lorem ipsum': 0, 'www.': 1, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2287108', 'n_tokens_mistral': 2692, 'n_tokens_neox': 2427, 'n_words': 827}