Skip to content

Instantly share code, notes, and snippets.

Jacob Benny John jacobben85

Block or report user

Report or block jacobben85

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View wildfly.conf.sh
#!/bin/sh -e
sed -i "s/# JAVA_HOME=\"\/usr\/lib\/jvm\/default-java\"/JAVA_HOME=\"\/usr\/lib\/jvm\/java-8-oracle\"/" ./wildfly.conf.bk
sed -i "s/# JBOSS_HOME=\"\/opt\/wildfly\"/JBOSS_HOME=\"\/opt\/wildfly\"/" ./wildfly.conf.bk
sed -i "s/# JBOSS_USER=wildfly/JBOSS_USER=wildfly/" ./wildfly.conf.bk
sed -i "s/# JBOSS_MODE=standalone/JBOSS_MODE=standalone/" ./wildfly.conf.bk
sed -i "s/# JBOSS_CONFIG=standalone.xml/JBOSS_CONFIG=standalone.xml/" ./wildfly.conf.bk
sed -i "s/# STARTUP_WAIT=60/STARTUP_WAIT=60/" ./wildfly.conf.bk
sed -i "s/# SHUTDOWN_WAIT=60/SHUTDOWN_WAIT=60/" ./wildfly.conf.bk
sed -i "s/# JBOSS_CONSOLE_LOG=\"\/var\/log\/wildfly\/console.log\"/JBOSS_CONSOLE_LOG=\"\/var\/log\/wildfly\/console.log\"/" ./wildfly.conf.bk
@jacobben85
jacobben85 / ubuntu.sh
Created Sep 8, 2016
Ubuntu bootstrapping
View ubuntu.sh
#!/usr/bin/env bash
echo "Installing Java 8"
sudo apt-get --assume-yes update
sudo apt-get install -y python-software-properties debconf-utils
sudo add-apt-repository ppa:webupd8team/java -y
sudo apt-get --assume-yes update
echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | sudo debconf-set-selections
sudo apt-get install -y oracle-java8-installer
@jacobben85
jacobben85 / Self-service.txt
Last active Aug 4, 2016
Self-service business intelligence
View Self-service.txt
Self-service business intelligence (SSBI) is an approach to data analytics that enables business users to access and work with corporate data without having to have a background in statistical analysis, business intelligence (BI) or data mining. This helps the bussiness users to make reports and decisions based on their own queries and analyses.
http://www.information-management.com/news/big-data-analytics/4-requirements-for-self-service-big-data-analytics-10027589-1.html
The current trend in the industry is to add a data discovery framework on top of big data analytics platforms to enable even the Decision Scientists to experiment with data or sometimes insights to arrive at better and deeper intelligence while significantly reducing the time taken to get at those decisions. Data Scientists and Analysts would still be required to create algorithms, analytics models and event parsers, however these would be packaged for data discovery, with configurable input data sources, event parsing logic, KPIs and model
View locust.py
from locust import HttpLocust, TaskSet, task
# https://httpbin.org/post
# locust -f loadtest.py --host=https://httpbin.org
class WebsiteTasks(TaskSet):
# def on_start(self):
# self.client.post("/login", {
# "username": "test_user",
# "password": ""
View searchWrapper.java
private String elasticsearch = "http://localhost:9200/boeing4/_search";
public final String getResponse(final String searchString)
throws IOException, URISyntaxException {
String url = elasticsearch + "?q=" + searchString;
URI uri = URI.create(url);
HttpClient client = HttpClientBuilder.create().build();
HttpGet httpGet = new HttpGet();
httpGet.setURI(uri);
View default.css
body {
background-attachment: scroll;
background-clip: border-box;
background-color: #222;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkAgMAAAANjH3HAAAACVBMVEUaGhohISElJSUh9lebAAAB20lEQVRIx4XWuZXDMAwE0C0SAQtggIIYoAAEU+aKOHhYojTrYP2+QfOW/5QIJOih/q8HwF/pb3EX+UPIveYcQGgEHiu9hI+ihEc5Jz5KBIlRRRaJ1JtoSAl5Hw96hLB1/up1tnIXOck5jZQy+3iU2hAOKSH1JvwxHsp+5TLF5MOl1/MQXsVs1miXc+KDbYydyMeUgpPQreZ7fWidbNhkXNJSeAhc6qHmHD8AYovunYyEACWEbyIhNeB9fRrH3hFi0bGPLuEW7xCNaohw1vAlS805nfsrTspclB/hVdoqusg53eH7FWot+wjYpOViX8KbFFKTwlnzvj65P9H/vD0/hibYBGhPwlPO8TmxRsaxsNnrUmUXpNhirlJMPr6Hqq9k5Xn/8iYQHYIuQsWFC6Z87IOxLxHphSY4SpuiU87xJnJr5axfeRd+lnMExXpEWPpuZ1v7qZdNBOjiHzDREHX5fs5Zz9p6X0vVKbKKchlSl5rv+3p//FJ/PYvoKryI8vs+2G9lzRmnEKkh+BU8yDk515jDj/HAswu7CCz6U/Mxb/PnC9N41ndpU4hUU7JGk/C9PmP/M2xZYdvBW2PObyf1IUiIzoHmHW9yTncliYs9A9tVNppdShfgQaTLMf+j3X723tLeHgAAAABJRU5ErkJggg==);
background-origin: padding-box;
background-position: left top;
background-repeat: repeat;
background-size: auto;
}
View brew.sh
# Brew scripts - make life easier
echo "Brew doctor"
brew doctor
echo "Updating permissions"
sudo chown -R $(whoami) /usr/local/bin
sudo chown -R $(whoami) /usr/local/share
sudo chown -R $(whoami) /usr/local/share/man
sudo chown -R $(whoami) /usr/local/share/man/man1
@jacobben85
jacobben85 / jarvis.sh
Last active Jun 30, 2016
Jarvis deployment script
View jarvis.sh
service=mysql
projectDir=/Users/jbjohn/Documents/misc/univision-push-alerts
tomcatDir=/Users/jbjohn/misc/apache-tomcat-8.0.27
projectVersion=1.3-SNAPSHOT
# If mysql server is not running start the service
if (( $(ps -ef | grep -v grep | grep $service | wc -l) > 0 ))
then
echo "$service is already running"
else
You can’t perform that action at this time.