Skip to content

Instantly share code, notes, and snippets.

Avatar

Lee Hinman dakrone

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

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:

View indent.md

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 (
View tangle.sh
#!/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
View java.el
;; 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)))))
View gist:b0de6547e6db6e2a2530
λ 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
View MNDQ.patch
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();
View failure.txt
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:
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")))))