Skip to content

Instantly share code, notes, and snippets.

Lee Hinman dakrone

Block or report user

Report or block dakrone

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View foo.json
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 ( 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.


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
# Files: "", Dir: /Users/hinmanm/es-scripts
# Tangled 6 code blocks from
# Set this to the location of your emacs executable
View java.el
;; via
(defun my/point-in-defun-declaration-p ()
(let ((bod (save-excursion (c-beginning-of-defun)
(<= bod
(save-excursion (goto-char bod)
(re-search-forward "{")
View gist:b0de6547e6db6e2a2530
λ ant clean test
Buildfile: /home/hinmanm/src/elisp/jdee/build.xml
[delete] Deleting directory /home/hinmanm/src/elisp/jdee/build
[mkdir] Created dir: /home/hinmanm/src/elisp/jdee/build
View MNDQ.patch
diff --git a/lucene/core/src/java/org/apache/lucene/search/ b/lucene/core/src/java/org/apache/lucene/search/
index 209a6dc..d0f5df0 100644
--- a/lucene/core/src/java/org/apache/lucene/search/
+++ b/lucene/core/src/java/org/apache/lucene/search/
@@ -165,6 +165,9 @@ public class BooleanQuery extends Query implements Iterable<BooleanClause> {
public Query rewrite(IndexReader reader) throws IOException {
+ if (clauses.size() == 0) {
+ return new MatchNoDocsQuery();
View failure.txt
Buildfile: /Users/hinmanm/src/java/lucene_trunk/lucene/queryparser/build.xml
[delete] Deleting directory /Users/hinmanm/src/java/lucene_trunk/lucene/build/queryparser
View foo.el
(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")))))

Since String.format() is not in the whitelist, sometimes it's nice to be able to use string interpretation in scripts. Groovy allows doing this with GString interpretation.

Create an index

DELETE /script
You can’t perform that action at this time.