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 |
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" | |
}} | |
] |
View pom.xml
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.amazon</groupId> | |
<artifactId>spark</artifactId> | |
<version>1.0-SNAPSHOT</version> |
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 https://github.com/alexa/skill-sample-nodejs-trivia |
View ExceptionUtils.java
public class ExceptionUtils { | |
public static String stackTraceAsString(Exception ex) { | |
if (ex == null) { | |
return ""; | |
} | |
return Arrays.asList(ex.getStackTrace()) | |
.stream() | |
.reduce( | |
new StringBuilder(), |
View CommonsCmdParser.java
/* package whatever; // don't place package name! */ | |
import java.util.*; | |
import java.lang.*; | |
import java.io.*; | |
/* 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 |
NewerOlder