#
# ~/.bashrc
#
[[ $- != *i* ]] && return
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# simple match all query with term facet | |
ejs.Request() | |
.indices("myindex") | |
.types("mytype") | |
.query(ejs.MatchAllQuery()) | |
.facet( | |
ejs.TermsFacet('url') | |
.field('url') | |
.size(20)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
S=Struct.new(:a,:b) | |
ss = [S.new(1,2), S.new(3,4)] | |
p ss.map{|a,b| "#{a} #{b}" } | |
# => ["#<struct S a=1, b=2> ", "#<struct S a=3, b=4> "] | |
class S ; def to_ary ; to_a ; end ; end | |
p ss.map{|a,b| "#{a} #{b}" } | |
# => ["1 2", "3 4"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.List; | |
import org.apache.http.conn.ssl.NoopHostnameVerifier; | |
import org.apache.http.impl.client.CloseableHttpClient; | |
import org.apache.http.impl.client.HttpClients; | |
import org.springframework.http.MediaType; | |
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; | |
import org.springframework.http.converter.ByteArrayHttpMessageConverter; | |
import org.springframework.web.client.RestTemplate; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ext/bluecloth.h b/ext/bluecloth.h | |
index 230618b..97053b5 100644 | |
--- a/ext/bluecloth.h | |
+++ b/ext/bluecloth.h | |
@@ -7,20 +7,21 @@ | |
#ifndef BLUECLOTH_H | |
#define BLUECLOTH_H | |
+#include "ruby.h" | |
+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************************* | |
* Copyright (c) 2013,2014 Rüdiger Herrmann | |
* All rights reserved. This program and the accompanying materials | |
* are made available under the terms of the Eclipse Public License v1.0 | |
* which accompanies this distribution, and is available at | |
* http://www.eclipse.org/legal/epl-v10.html | |
* | |
* Contributors: | |
* Rüdiger Herrmann - initial API and implementation | |
* Matt Morrissette - allow to use non-static inner IgnoreConditions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"context" | |
"fmt" | |
"log" | |
"os" | |
"time" | |
) |