Skip to content

Instantly share code, notes, and snippets.

View ravindranathakila's full-sized avatar

Ravindranath Akila ravindranathakila

View GitHub Profile
@ravindranathakila
ravindranathakila / SmartLogger.java
Created January 29, 2012 17:06
Smart Logger (Accumulative Logger)
package ai.ilikeplaces.util;
import ai.ilikeplaces.doc.*;
import java.io.PrintWriter;
import java.io.StringWriter;
import static ai.ilikeplaces.util.Loggers.LEVEL;
/**
@ravindranathakila
ravindranathakila / Memory.jsp
Created January 29, 2012 17:13
Simple Memroy Status Display JSP
<%@page import="java.lang.management.*" %>
<%@page import="java.util.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="refresh" content="10" />
</head>
<body>
JVM Memory Monitor
@ravindranathakila
ravindranathakila / StringBuilderHelper.java
Created February 9, 2012 03:10
StringBuilder Helper
package ai.ilikeplaces.util;
import ai.ilikeplaces.doc.License;
/**
* Just a wrapper around StringBuilder, which gives 2 additional features.
* New line in HTML, and Java.
* <p/>
* <p/>
* Example Usage:
http://gist.io
@ravindranathakila
ravindranathakila / summarize-webpage.js
Created November 12, 2012 06:27
Easy Tool To Summarise Webpages On The Fly
javascript: (function userSel(){if(document.getElementById('ilp_summarize_box') == undefined){ilp_para_id = 0;ilp_box = document.createElement('div');ilp_box.id = 'ilp_summarize_box';ilp_box.style.position='absolute';ilp_box.style.backgroundColor='#ffffff';ilp_box.style.zIndex = 99999;document.childNodes[1].insertBefore(ilp_box,document.childNodes[1].firstChild);ilp_button = document.createElement('a');ilp_button.appendChild(document.createTextNode('[close]'));ilp_button.name='close';ilp_closed = 'Done';ilp_button.href ='javascript:(function(){document.childNodes[1].removeChild(ilp_box)})();';ilp_box.appendChild(document.createElement('hr'));ilp_box.appendChild(ilp_button);ilp_box.appendChild(document.createElement('hr'));} if (window.getSelection) { txt = window.getSelection(); } else if (document.getSelection) { txt = document.getSelection(); } else if (document.selection) { txt = document.selection.createRange().text; } e
#!/usr/bin/env bash
#
# ===================================
# Experiments with the HBase REST API
# ===================================
#
# <http://hbase.apache.org/docs/r0.20.4/api/org/apache/hadoop/hbase/rest/package-summary.html>
#
# Usage:
#

Stargate Scanner Filter Examples

Introduction

So yeah... no documentation for the HBase REST API in regards to what should a filter look like...

So I installed Eclipse, got the library, and took some time to find some of the (seemingly) most useful filters you could use. I'm very green at anything regarding HBase, and I hope this will help anyone trying to get started with it.

What I discovered is that basically, attributes of the filter object follow the same naming than in the documentation. For this reason, I have made the link clickable and direct them to the HBase Class documentation attached to it; check for the instantiation argument names, and you will have your attribute list (more or less).

Intro

Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Author: Chris Jacob @_chrisjacob

Tutorial (Gist): https://gist.github.com/833223

The Result

@ravindranathakila
ravindranathakila / es.sh
Last active December 20, 2015 14:19
Updated to 0.90.2. Yet to test.
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below
## NEW WAY / EASY WAY
#wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.2.deb
#sudo dpkg -i elasticsearch-0.90.2.deb

Introduction to Kafka

Kafka acts as a kind of write-ahead log (WAL) that records messages to a persistent store (disk) and allows subscribers to read and apply these changes to their own stores in a system appropriate time-frame.

Terminology:

  • Producers send messages to brokers
  • Consumers read messages from brokers
  • Messages are sent to a topic