Skip to content

Instantly share code, notes, and snippets.

View dsmiley's full-sized avatar

David Smiley dsmiley

View GitHub Profile
@roberocity
roberocity / copy-ssh-key-to-server.sh
Created February 5, 2012 02:24
Copy ssh pub key from local to server
ssh username@host "echo `cat ~/.ssh/id_rsa.pub` >> ~/.ssh/authorized_keys"
@softwaredoug
softwaredoug / localparams.md
Last active September 6, 2017 15:24
Solr Local Params -- Secret Manual

Infinite Recursion Errors

What's wrong with this?

q=cats&bq={!edismax qf=title v=$q}

Well it turns out that the local params carries the external params with it. So the bq will get applied to itself, resulting in "Infinite Recursion Errors".

@waldoj
waldoj / elasticsearch.sh
Last active August 29, 2015 14:10
A demonstration of the Elasticsearch query that yields the error "Failed to find geo_shape field [location]]." This is a search of a collection of documents—each of which contain a pair of coordinates—against a pre-indexed collection of shapes. For simplicity's sake, I've included just one shape and just one document. This is with Elasticsearch …
# Remove old data
curl -XDELETE "http://localhost:9200/shapes"
curl -XDELETE "http://localhost:9200/businesses"
# Create shapes index, with mapping
curl -XPOST "http://localhost:9200/shapes/" -d '
{
"shapes" : {
"mappings" : {
"municipalities" : {