Skip to content

Instantly share code, notes, and snippets.

View ciddennis's full-sized avatar

Cid Dennis ciddennis

View GitHub Profile
@ciddennis
ciddennis / gist:e41451d06accd8b6d0c8
Created May 14, 2015 19:27
Get Recurly JS Token from Ruby
def generate_recurly_token(cc = "4111 1111 1111 1111", cvv = "123")
begin
uri = URI("https://api.recurly.com/js/v1/token?key=#{ENV['RECURLY_JS_PRIVATE_KEY']}")
# Create client
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
These are from a book called Disorder in the American Courts and are things people actually said in court,... word for word, taken down and published by court reporters that had the torment of staying calm while the exchanges were taking place.
ATTORNEY: What was the first thing your husband said to you that morning?
WITNESS: He said, 'Where am I, Cathy?'
ATTORNEY: And why did that upset you?
WITNESS: My name is Susan!
_______________________________
ATTORNEY: What gear were you in at the moment of the impact?
WITNESS: Gucci sweats and Reeboks.
____________________________________________
// Query
{:filtered=>
{:query=>{:multi_match=>{:query=>"Test", :fields=>["title"]}},
:filter=>
{:bool=>
{:must=>
[{:term=>{:publisher_id=>1169}}, {:term=>{:latest_version=>true}}],
:must_not=>[{:term=>{:state=>2}}]}}}}
@ciddennis
ciddennis / gist:2296669
Created April 4, 2012 00:29
Slow Search Help
Status
=============================
{
"cluster_name" : "elasticsearchdp",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 10,
"active_shards" : 10,