Skip to content

Instantly share code, notes, and snippets.

View elmer's full-sized avatar
:octocat:
exploring

Elmer Rivera elmer

:octocat:
exploring
View GitHub Profile
@elmer
elmer / gist:1356977
Created November 11, 2011 02:19
boxgrinder-selinux-log
T, [2011-11-10T20:33:29.483924 #30743] TRACE -- : GFS: /bin/sh -c /usr/sbin/load_policy
T, [2011-11-10T20:34:08.107187 #30743] TRACE -- : GFS: libsepol.policydb_write:
T, [2011-11-10T20:34:08.109158 #30743] TRACE -- : GFS: Discarding booleans and conditional rules
T, [2011-11-10T20:34:08.111421 #30743] TRACE -- : GFS:
T, [2011-11-10T20:34:48.252430 #30743] TRACE -- : GFS: libsepol.policydb_write:
T, [2011-11-10T20:34:48.256352 #30743] TRACE -- : GFS: Discarding booleans and conditional rules
T, [2011-11-10T20:35:02.971213 #30743] TRACE -- : GFS: libsepol.context_read_and_validate: in
T, [2011-11-10T20:35:03.096216 #30743] TRACE -- : GFS: valid security context
libsepol.policydb_to_image: new policy image is invalid
libsepol.policydb_to_ima
@elmer
elmer / gist:1369529
Created November 16, 2011 07:56 — forked from avdi/gist:1026546
A Guardfile for starting Redis
module ::Guard
class Redis < Guard
def start
puts "Starting Redis on port #{port}"
IO.popen("#{executable} -", 'w+') do |server|
server.write(config)
server.close_write
end
puts "Redis is running with PID #{pid}"
$?.success?
@elmer
elmer / logsearch.rb
Created November 29, 2011 10:36 — forked from lusis/log4j.xml
#!/usr/bin/env ruby
require 'rubygems'
require 'bundler/setup'
begin
require 'tire'
require 'slop'
require 'time'
rescue LoadError
puts "You seem to be missing some key libraries"
puts "please run `gem install bundler --no-ri --no-rdoc; bundle install`"
@elmer
elmer / ci_hook.bat
Created December 4, 2011 17:24 — forked from infertux/ci_hook.bat
EC2 Windows CI hackish scripts
@echo off
REM If you edit this file, make sure to run `unix2dos` to fix those fucking CRLF.
REM Let's keep this script as dumb as possible and do all the logic with a true language.
REM Basically, this should be no more than a sort of remote control.
echo Initializing hook...
:begin
@elmer
elmer / *install*
Created December 6, 2011 11:40 — forked from jcrossley3/*install*
$ rvm install jruby && rvm --create jruby@torquebox && jruby -J-Xmx1024m -S gem install torquebox-server --pre && torquebox
jruby-1.6.5 - #fetching
jruby-1.6.5 - #downloading jruby-bin-1.6.5, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 14.6M 100 14.6M 0 0 1868k 0 0:00:08 0:00:08 --:--:-- 2189k
jruby-1.6.5 - #extracting jruby-bin-1.6.5 to /Users/jim/.rvm/src/jruby-1.6.5
jruby-1.6.5 - #extracted to /Users/jim/.rvm/src/jruby-1.6.5
Building Nailgun
jruby-1.6.5 - #installing to /Users/jim/.rvm/rubies/jruby-1.6.5
@elmer
elmer / dnsd.rb
Created December 9, 2011 02:35 — forked from peterc/dnsd.rb
Simple, scrappy UDP DNS server in Ruby (with protocol annotations)
# Simple, scrappy UDP DNS server in Ruby (with protocol annotations)
# By Peter Cooper
#
# MIT license
#
# * Not advised to use in your production environment! ;-)
# * Requires Ruby 1.9
# * Supports A and CNAME records
# * See http://www.ietf.org/rfc/rfc1035.txt for protocol guidance
# * All records get the same TTL
@elmer
elmer / yana.rb
Created May 15, 2012 08:34 — forked from jamtur01/yana.rb
#
# Copyright 2011, James Turnbull
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
#!/usr/bin/env bash
# This script assumes 'deploy' user already exists
RUBY_19_RELEASE='ruby-1.9.2-p290' # if this changes, change the /etc/puppet/puppet.conf below
PUPPET_VERSION='2.7.3'
apt-get update
apt-get install -y linux-headers-`uname -r`
apt-get install -y ntp openssh-server
@elmer
elmer / ideal ops.md
Created May 29, 2012 10:24 — forked from bhenerey/ideal ops.md
ideal ops checklist

In a perfect world, where things are done well, not just quickly, I would expect to find the following when joining the company:

Documentation

  • Accurate / up-to-date systems architecture diagram

  • Accurate / up-to-date network diagram

  • Out-of-hours support plan

  • Incident management plan

@elmer
elmer / A.md
Created June 1, 2012 08:01 — forked from lusis/A.md
dirt simple basic config for talking to an external elasticsearch server

The thing that trips most people up is that the parameters to the web cli (--backend elasticsearch://blah:9300/blah) do NOT set the output destination.

The web app is its own process with its own args. It knows nothing about the agent config file.

Remember that you could simply use the same jar like so:

java -jar logstash.jar web --backend elasticsearch://elasticsearch:9300/clustername

and run the web interface without the agent process.