This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Started GET "/search" for 127.0.0.1 at 2014-06-11 19:20:08 +0000 | |
ActiveRecord::SchemaMigration Load (5.5ms) SELECT "schema_migrations".* FROM "schema_migrations" | |
AccessToken Load (2.6ms) SELECT "access_tokens".* FROM "access_tokens" WHERE "access_tokens"."token" = 'O2_A6iGept7Ibgxd80rWUIV7g5txf_E9h90YNUFmb9BSujoIXQPAS24fLMAGIjHBTBgefcIv21GsokkTGCdfyA' LIMIT 1 | |
Client Load (1.9ms) SELECT "clients".* FROM "clients" WHERE "clients"."id" = $1 LIMIT 1 [["id", 1]] | |
AccessToken Exists (2.0ms) SELECT 1 AS one FROM "access_tokens" WHERE ("access_tokens"."token" = 'O2_A6iGept7Ibgxd80rWUIV7g5txf_E9h90YNUFmb9BSujoIXQPAS24fLMAGIjHBTBgefcIv21GsokkTGCdfyA' AND "access_tokens"."id" != 4) LIMIT 1 | |
Processing by SearchController#index as */* | |
AccessToken Load (5.4ms) SELECT "access_tokens".* FROM "access_tokens" WHERE "access_tokens"."token" = 4 LIMIT 1 | |
PG::UndefinedFunction: ERROR: operator does not exist: character varying = integer | |
LINE 1: ...OM "access_tokens" WHERE "access_tokens"."token" = 4 LIMIT . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am jrgns on github. | |
* I am jrgns (https://keybase.io/jrgns) on keybase. | |
* I have a public key whose fingerprint is 509D 730E 6927 2855 1A7C B932 8158 85AA 28F9 EF79 | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'dotenv' | |
require 'win32/service' | |
require 'logger' | |
Dotenv.load | |
include Win32 | |
LOGGER = Logger.new(ENV['LOG_FILE'] || STDOUT) | |
LOGGER.level = Logger::WARN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: UTF-8 | |
require 'elasticsearch' | |
require 'rest-client' | |
require 'json' | |
require 'pp' | |
require 'hashie' | |
# Default options | |
def params | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def indices | |
client.cat.indices.split("\n").map do |line| | |
line = Hash[*[ | |
:health, | |
:state, | |
:index, | |
:primaries , | |
:replicas, | |
:count, | |
:deleted, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'date' | |
require 'json' | |
require 'logger' | |
require 'elasticsearch' | |
class SlackToElasticsearch | |
attr_reader :folder | |
def initialize(folder) | |
@folder = folder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# deploybot/commands/ansible-play.rb | |
module Deploybot | |
module Commands | |
class AnsiblePlay < SlackRubyBot::Commands::Base | |
class AnsibleRunner | |
attr_reader :playbook | |
def initialize(playbook) | |
@playbook = playbook | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def multi_receive_encoded(encoded_events) | |
bytes = 0 | |
entries = [] | |
# Split the events into multiple batches to ensure that no single batch | |
# exceeds `@message_max_size` bytes. | |
encoded_events.each_with_index do |encoded_event, index| | |
event, encoded = encoded_event | |
if encoded.bytesize > @message_max_size |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Dependencies / Utilities | |
sudo apt-get update | |
sudo apt-get install -y screen curl git build-essential libssl-dev | |
# Install RVM for Ruby | |
if [ ! -f ~/.rvm/scripts/rvm ] | |
then | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 | |
\\curl -sSL https://get.rvm.io | bash | |
fi |