Skip to content

Instantly share code, notes, and snippets.

View mavencode01's full-sized avatar
🏠
Working from home

Philip K. Adetiloye mavencode01

🏠
Working from home
View GitHub Profile
input {
redis {
host => "127.0.0.1"
type => "redis-input"
# these settings should match the output of the agent
data_type => "list"
key => "logstash"
# We use json_event here since the sender is a logstash agent
message_format => "json_event"
}
input {
tcp {
type => "apache"
port => 3333
add_field => { "server" => "prod1" }
}
tcp {
type => "apache"
port => 3334
add_field => { "server" => "prod2" }
{
"title": "Apache and Tomcat Logs",
"services": {
"query": {
"list": {
"0": {
"query": "apache !tomcat !static",
"alias": "",
"color": "#7EB26D",
"id": 0,
@mavencode01
mavencode01 / vertx-maven-goal
Created February 20, 2015 16:12
Run vertx maven
vertx:runMod
// Set up the UIRefreshControl.
self.refreshControl = [[UIRefreshControl alloc] init];
[self.refreshControl addTarget:self
action:@selector(refreshInvoked:forState:)
forControlEvents:UIControlEventValueChanged];
// Create a UITableViewController so we can use a UIRefreshControl.
UITableViewController *tvc = [[UITableViewController alloc] initWithStyle:self.tableView.style];
tvc.tableView = self.tableView;
tvc.refreshControl = self.refreshControl;
@mavencode01
mavencode01 / style.css
Created April 7, 2015 01:11
Responsive CSS tables - Reference http://codepen.io/anon/pen/QwPVNW
body {
font-family: arial;
}
table {
border: 1px solid #ccc;
width: 100%;
margin:0;
padding:0;
border-collapse: collapse;
// Copyright 2014 BrightTag, Inc. All rights reserved.
package com.brighttag.storm.utils;
import static com.google.common.base.Preconditions.checkArgument;
/**
* Computes the parallelism for a particular topology and machine configuration.
*
* @author codyaray
* @since 4/21/2014
package com.mycompany.ssl;
import java.net.Socket;
import java.security.Principal;
import java.security.PrivateKey;
import java.security.cert.X509Certificate;
import java.util.List;
import javax.annotation.Nullable;
import javax.net.ssl.X509KeyManager;

Install, Setup, and Test Spark and Cassandra on Mac OS X

This Gist assumes you already followed the instructions to install Cassandra, created a keyspace and table, and added some data.

Install Apache Spark

brew install apache-spark