Skip to content

Instantly share code, notes, and snippets.

View divideby0's full-sized avatar

Cedric Hurst divideby0

  • Spantree Technology Group, LLC
  • Chicago, IL
View GitHub Profile
PUPPET_DIR=/etc/puppet/
yum -y --nogpgcheck install "http://yum.puppetlabs.com/el/${RELEASE}/products/x86_64/puppetlabs-release-6-7.noarch.rpm"
yum update -y
yum -y groupinstall "Development Tools"
yum -q -y makecache
yum -q -y install git puppet ruby-rdoc ruby-devel rubygems
gem install rubygems-update
mkdir -p "$PUPPET_DIR"
gem install librarian-puppet
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:*",
"elasticloadbalancing:*",
"cloudwatch:*",
"autoscaling:*",

In the stemming section of mapping & analysis, we refer to a stemmed language called "Lovins" and make an educated guess that this is the language they speak in Lovinia. Lovinia is not a country and Lovins is actually an English-language stemmer that enhances the Snowball stemmer. Using the Lovins option will work with English alone.

http://snowball.tartarus.org/algorithms/lovins/festschrift.html

In response to a performance optimization question during Q&A, we explain that the mlockall option reserves the full amount of heap on startup. While this is true, the option also ensures that all the allocated memory is never swapped or paged.

➜ curl -L --verbose http://7io.r.mailjet.com/link/x09v/o7huxq8/1/Ws4pdbrgrFEEui3rR6oQbw/aHR0cDovL3JzdHlsZS5tZS9uL2t4YzJkamFuZQ
* Adding handle: conn: 0x7fe942804000
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7fe942804000) send_pipe: 1, recv_pipe: 0
* About to connect() to 3 port 80 (#0)
* Trying 0.0.0.3...
* Failed to connect to 0.0.0.3: No route to host
* couldn't connect to host at 3:80
@divideby0
divideby0 / first_name.synonyms.txt
Last active May 20, 2016 18:46
First Name Synonyms for Elasticsearch / Solr / Lucene (generated from Freebase name variations)
aadu => ado
aaliyah => aleaseya, alea, aliya, aliyah, allyiah, alia, aleeya, aleah
aaron => arron, aron, ahron
aarti => arti
aayesha => ayesha, ayasha, ayse, ayisha
aba => abod, abony, abos
abagail => abbe, abby, abbie, abilio, gail, abbey, abigale, abigail, abihail, abigayle
abba => abbot, abbott, absa, abbe
abbe => abba, abbot, abbott, absa, abbey, abby, abigail, abihail, abagail, abigayle, abilio, gail, abigale, abbie
abbey => abbe, abilio, gail, abigale, abigail, abihail, abagail, abigayle, abbie, abby
#!/usr/bin/python
# Retrieves a comma-delimited list of unicasts hosts for Elasticsearch instances
# running on marathon, based on the application name.
import sys, getopt, json, requests
def exit_invalid_args():
print 'usage: marathon-es-hosts.py -m <marathon_url> -a <app_name>'
sys.exit(2)

Pivotal just announced it’s decision to stop sponsoring and funding the development of the popular Groovy and Grails Open Source projects. As a result, both Groovy and Grails are looking for new sponsors willing to further help develop the projects full steam!

The Groovy programming language has been around for a while for more than 11 years. During that time, it has nicely evolved from a side hobby project to the very mature and successful alternative language it is today, used by Fortune 500 companies throughout the world, in various projects and contexts.

With 1.7 million downloads in 2012, 3 million in 2013, and well over 4 million in 2014 (definitive numbers still need to be calculated), Groovy is leading the pack of the JVM language ecosystem, and continues seeing positive growth.

There are many ideas the Groovy team wants to develop further, features we w

#!/bin/bash
IP=`ifconfig en0 inet | grep inet | sed 's/.*inet *//; s/ .*//'`
CN="${IP##*.}"
sed -i "s/node.name: .*/node.name: es-${CN}/" /etc/elasticsearch/elasticsearch.yml
%{IPORHOST:clientip} - - \[%{HTTPDATE:timestamp}\] "%{WORD:verb} %{URIPATHPARAM:request} HTTP/%{NUMBER:httpversion}" %{NUMBER:response} (?:%{NUMBER:bytes}|-) "(?:%{URI:referrer}|-)" %{QS:agent}
{
"took": 7,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0
},
"hits": {
"total": 13,