If you don't have homebrew installed - get homebrew here
Then run: brew install elasticsearch
Update the elasticsearch configuration file in /usr/local/etc/elasticsearch/elasticsearch.yml.
| """ | |
| A simple proxy server, based on original by gear11: | |
| https://gist.github.com/gear11/8006132 | |
| Modified from original to support both GET and POST, status code passthrough, header and form data passthrough. | |
| Usage: http://hostname:port/p/(URL to be proxied, minus protocol) | |
| For example: http://localhost:5000/p/www.google.com | |
| """ | |
| import re |
| module Animal | |
| def teach_all(technique, &block) | |
| puts "Teaching All #{self.name} the command #{technique}" | |
| define_method technique, block | |
| end | |
| def unteach_all(technique) | |
| puts "Teaching All #{self.name} the command #{technique}" | |
| remove_method technique |
If you don't have homebrew installed - get homebrew here
Then run: brew install elasticsearch
Update the elasticsearch configuration file in /usr/local/etc/elasticsearch/elasticsearch.yml.
| #!/bin/sh | |
| USAGE="Usage: $0 -p <pidfile>" | |
| NEO4J_HOME="`dirname $0`/.." | |
| die() { | |
| echo $1 | |
| exit 1 | |
| } |
| daemon off; | |
| worker_processes 4; | |
| events { | |
| use epoll; | |
| accept_mutex on; | |
| multi_accept on; | |
| worker_connections 1024; | |
| } |
| unless File.exist?('Gemfile') | |
| File.write('Gemfile', <<-GEMFILE) | |
| source 'https://rubygems.org' | |
| gem 'rails', github: 'rails/rails' | |
| gem 'arel', github: 'rails/arel' | |
| gem 'rack', github: 'rack/rack' | |
| gem 'i18n', github: 'svenfuchs/i18n' | |
| gem 'sqlite3' | |
| GEMFILE |
| public class ResizeAnimation extends Animation { | |
| final int startWidth; | |
| final int targetWidth; | |
| View view; | |
| public ResizeAnimation(View view, int targetWidth) { | |
| this.view = view; | |
| this.targetWidth = targetWidth; | |
| startWidth = view.getWidth(); | |
| } |
| # from http://stackoverflow.com/questions/6499654/is-there-an-asynchronous-logging-library-for-ruby/6527134#6527134 | |
| require 'thread' | |
| require 'singleton' | |
| require 'delegate' | |
| require 'monitor' | |
| class Async | |
| include Singleton |
| # note - you may need to split into a before-deploy (stop) and after-deploy (start) depending on your setup | |
| desc "Hot-reload God configuration for the Resque worker" | |
| deploy.task :reload_god_config do | |
| sudo "god stop resque" | |
| sudo "god load #{File.join deploy_to, 'current', 'config', 'resque.god'}" | |
| sudo "god start resque" | |
| end | |
| after 'deploy:update_code', 'deploy:update_shared_symlinks' |