Skip to content

Instantly share code, notes, and snippets.


Ranjit ranjitiyer

View GitHub Profile
View gist:a056da16a7da95a3e4aba96bc2a73404
> help
** command list **
connectors -- list available connectors and transports in this VM
run [class [args]] -- start execution of application's main class
threads [threadgroup] -- list threads
thread <thread id> -- set default thread
suspend [thread id(s)] -- suspend threads (default: all)
resume [thread id(s)] -- resume threads (default: all)
View gist:d021a28bb15bd8fe6986d18d623be0b5
basic 'find file' commands
find / -name foo.txt -type f -print # full command
find / -name foo.txt -type f # -print isn't necessary
find / -name foo.txt # don't have to specify "type==file"
find . -name foo.txt # search under the current dir
find . -name "foo.*" # wildcard
find . -name "*.txt" # wildcard
find /users/al -name Cookbook -type d # search '/users/al' dir
ranjitiyer / elastic-search-queries
Last active Nov 15, 2017
Elastic Search Cheat Sheet
View elastic-search-queries
# Delete docs that do not exactly match a phrase
POST audiobooks/book/_delete_by_query
"query": {
"bool": {
"must_not": [
{"match_phrase": {
"language": "English"
ranjitiyer / pom.xml
Created Nov 10, 2017
Create Maven fat jar
View pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns=""
ranjitiyer / spiritualQuote.js
Created Nov 6, 2017
Alexa skill for your daily spiritual quote
View spiritualQuote.js
/* eslint-disable func-names */
/* eslint-disable dot-notation */
/* eslint-disable new-cap */
/* eslint quote-props: ['error', 'consistent']*/
* This sample demonstrates a simple skill built with the Amazon Alexa Skills
* nodejs skill development kit.
* This sample supports en-US lauguage.
* The Intent Schema, Custom Slots and Sample Utterances for this skill, as well
* as testing instructions are located at
public class ExceptionUtils {
public static String stackTraceAsString(Exception ex) {
if (ex == null) {
return "";
return Arrays.asList(ex.getStackTrace())
new StringBuilder(),
/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
public static void main (String[] args) throws java.lang.Exception