Skip to content

Instantly share code, notes, and snippets.

lorgio / elasticsearch1.7.rb
Last active January 6, 2019 00:36
HomeBrew Elasticsearch 1.7.6
# in the terminal run brew install elasticsearch1.7.rb
class Elasticsearch17 < Formula
desc "Distributed search & analytics engine"
homepage ""
url ""
sha256 "78affc30353730ec245dad1f17de242a4ad12cf808eaa87dd878e1ca10ed77df"
revision 1
bottle :unneeded
lorgio / 0_reuse_code.js
Last active August 29, 2015 14:26
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
WebSite.all.each do |web_site|
next if web_site.s_id == 'evan_site_test'
puts "checking for actual index..."
response = UserSession.__elasticsearch__.client.perform_request('HEAD',web_site.namespaced_user_session_index_name,{})
UserSession.__elasticsearch__.client.perform_request('POST', '_aliases',{}, {actions: [{ add: { index: web_site.namespaced_user_session_index_name, alias: UserSession.index_name}}]})
puts "index not found"
puts "checking for alias"
var values = []
var map = function() {
emit(key, value);
var emit = function(key,value){
// print("key: "+ tojsononeline(key) +" value: "+ tojsononeline(value));
output = {"_id": key, value: value}
language: ruby
bundler_args: --without development --quiet --path=~/.bundle
- 2.0.0
- elasticsearch
- chmod -R 777 ./script/travis
- 'echo ''gem: --no-ri --no-rdoc'' > ~/.gemrc'
h2. Feature Development
h3. Basic Steps
<li>Pull to update your local Release Branch</li>
<li>Check out a feature branch</li>
<li>Do work in your feature branch, committing early and often</li>
<li>Rebase frequently to incorporate upstream changes</li>
<li>Interactive rebase (squash) your commits</li>