Skip to content

Instantly share code, notes, and snippets.

View epugh's full-sized avatar

Eric Pugh epugh

View GitHub Profile
@epugh
epugh / gist:6691303
Last active December 23, 2015 20:39
InsecureHttpClient allows you to access using BASIC authentication and over SSL a HTTP server. I am using it in conjunction with SolrJ. Blog at http://www.opensourceconnections.com/2013/09/24/using-solrj-wi…l-wrapped-solr/
package com.o19s.http;
import java.io.IOException;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLException;
import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocket;
@epugh
epugh / gist:1627515
Created January 17, 2012 17:05
SolrInputDocument AVro Schema
{
"type": "record",
"name": "SolrInputDocument",
"namespace": "org.apache.solr.common",
"fields": [
{
"name": "_fields",
"type": {
"type": "map",
"values": {
[
{
"artist": {
"name": "Enigma",
"image_url": "http://thm-a01.yimg.com/image/238379f10d683a30",
"updated_at": "2009-04-21T16:46:00Z",
"group_type": "2",
"id": 116,
"release_date": "2006-09-22T04:00:00Z",
"created_at": "2009-04-21T00:33:06Z"
require 'singleton'
begin
require 'daemon_controller'
rescue LoadError
raise('FATAL: sudo gem install FooBarWidget-daemon_controller -s http://gems.github.com')
end
##
# sudo port install memcached
class DaemonBackgroundrb