Skip to content

Instantly share code, notes, and snippets.

View dakrone's full-sized avatar

Lee Hinman dakrone

View GitHub Profile
PUT /_component_template/mappings
{
"template": {
"mappings": {
"properties": {
"@timestamp": {
"type": "date"
}
}
}
PUT /test
{
"settings": {
"index": {
"number_of_shards": 1,
"number_of_replicas": 0,
"analysis": {
"analyzer": {
"my_ngrams": {
"type": "custom",

Keybase proof

I hereby claim:

  • I am dakrone on github.
  • I am dakrone (https://keybase.io/dakrone) on keybase.
  • I have a public key whose fingerprint is 6CA9 E3B2 9F28 FEA8 6750 B6BE 9D64 65D4 3ACE CAE0

To claim this, I am signing this object:

All of them are better then never wrapping the line at all.

Agreed

I'd love to hear about your favorites sometime because I don't really have a favorite.

So, here's my personal list:

  • Don't end lines with (
#!/usr/bin/env zsh
# -*- mode: shell-script -*-
#
# Tangle .org files with org-mode
# Example usage:
# ∴ tangle nested-in-all.org
# Files: "nested-in-all.org", Dir: /Users/hinmanm/es-scripts
# Tangled 6 code blocks from nested-in-all.org
# Set this to the location of your emacs executable
;; via http://emacs.stackexchange.com/questions/17327/how-to-have-c-offset-style-correctly-detect-a-java-constructor-and-change-indent
(defun my/point-in-defun-declaration-p ()
(let ((bod (save-excursion (c-beginning-of-defun)
(point))))
(<= bod
(point)
(save-excursion (goto-char bod)
(re-search-forward "{")
(point)))))
λ ant clean test
Buildfile: /home/hinmanm/src/elisp/jdee/build.xml
init:
clean:
[delete] Deleting directory /home/hinmanm/src/elisp/jdee/build
init:
[mkdir] Created dir: /home/hinmanm/src/elisp/jdee/build
diff --git a/lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java b/lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java
index 209a6dc..d0f5df0 100644
--- a/lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java
@@ -165,6 +165,9 @@ public class BooleanQuery extends Query implements Iterable<BooleanClause> {
@Override
public Query rewrite(IndexReader reader) throws IOException {
+ if (clauses.size() == 0) {
+ return new MatchNoDocsQuery();
Buildfile: /Users/hinmanm/src/java/lucene_trunk/lucene/queryparser/build.xml
clean:
[delete] Deleting directory /Users/hinmanm/src/java/lucene_trunk/lucene/build/queryparser
ivy-availability-check:
ivy-fail:
ivy-configure:
(defun add-to-path (path-element)
"Add the specified path element to the Emacs PATH"
(interactive "DEnter directory to be added to path: ")
(if (file-directory-p path-element)
(setenv "PATH"
(concat (expand-file-name path-element)
path-separator (getenv "PATH")))))