W. Andrew Loe III loe

View gist:2501773
1 2 3 4 5 6 7 8 9 10
sudo xfs_growfs -d /dev/md0
meta-data=/dev/md0 isize=256 agcount=17, agsize=6553536 blks
= sectsz=512 attr=0
data = bsize=4096 blocks=104857344, imaxpct=25
= sunit=64 swidth=256 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal bsize=4096 blocks=32768, version=1
= sectsz=512 sunit=0 blks, lazy-count=0
realtime =none extsz=1048576 blocks=0, rtextents=0
data size unchanged, skipping
View reset_session_fix.rb
1 2 3 4 5 6 7
class ActionController::Request
def reset_session
by = session.instance_variable_get(:@by)
session.destroy if session and session.respond_to?(:destroy)
self.session = ActionController::Session::AbstractStore::SessionHash.new(by, @env)
end
end
View rabbitmq_info.py
1 2 3 4 5 6 7 8 9 10
# rabbitmq-collectd-plugin - rabbitmq_info.py
#
# Author: Daniel Maher (http://www.dark.ca/)
# Description: This plugin uses collectd's Python plugin to obtain Rabbitmq metrics.
#
# Loosely based on Garret Heaton's "redis-collectd-plugin"
# https://github.com/powdahound/redis-collectd-plugin
 
 
import collectd
View foreman.rb
1 2 3 4 5 6 7 8 9 10
require 'puppet'
require 'net/http'
require 'net/https'
 
FOREMAN_HOST = 'your.domain.com'
FOREMAN_PORT = 443
 
Puppet::Reports.register_report(:foreman) do
Puppet.settings.use(:reporting)
desc "Sends reports directly to Foreman"
View foreman.rb
1 2 3 4 5 6 7 8 9 10
# Query Foreman
# example usage:
#
# query for hosts
# ~~~~~~~~~~~~~~~
# $myhosts = foreman("hosts","facts.domain ~ lab")
# returns all hosts which have lab as part of their domain.
#
# or a more complex search term
# $myhosts = foreman("hosts", "hostgroup ~ web and environment = production and status.failed = 0 and facts.timezone = EST and last_report < \"1 hour ago\""
View thinking_sphinx.rb
1 2 3 4 5 6 7 8 9 10
# Have the Source use the main_search database if it exists.
module ThinkingSphinx
class Source
def set_source_database_settings(source)
config = @database_configuration
 
source.sql_host = config[:main_search] || config[:host] || "localhost"
source.sql_user = config[:username] || config[:user] || 'root'
source.sql_pass = (config[:password].to_s || "").gsub('#', '\#')
source.sql_db = config[:database]
View my.cf
1 2 3 4 5 6 7 8 9
[client]
loose-default-character-set = utf8
 
[server]
max_allowed_packet = 128M
default-character-set = utf8
default-collation = utf8_general_ci
innodb_buffer_pool_size = 256M
innodb_file_per_table
View crashreport.txt
1 2 3 4 5 6 7 8 9 10
Rubinius Crash Report #rbxcrashreport
 
Error: signal SIGILL
 
[[Backtrace]]
0 rbx 0x0000000100022511 _ZN8rubiniusL12segv_handlerEi + 241
1 libSystem.B.dylib 0x00007fff803da1ba _sigtramp + 26
2 ??? 0x70080cc000000000 0x0 + 8072716350834868224
3 rbx 0x000000010013d7d6 _ZN8rubinius7Channel4sendEPNS_2VMEPNS_6ObjectE + 422
4 rbx 0x0000000100082232 _ZN8rubinius10Primitives12channel_sendEPNS_2VMEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE + 242
View 20-ufw.conf
1 2 3 4 5 6 7
# Log kernel generated UFW log messages to file
:msg,contains,"[UFW " /var/log/ufw.log
 
# Uncomment the following to stop logging anything that matches the last rule.
# Doing this will stop logging kernel generated UFW log messages to the file
# normally containing kern.* messages (eg, /var/log/kern.log)
#& ~
View gist:1015400
1 2 3 4 5 6 7
Jun 8 21:05:49 domU-12-31-39-0C-CD-A3 postfix/smtpd[5618]: connect from domU-12-31-39-0C-CD-A3.onehub.com[127.0.0.1]
Jun 8 21:05:49 domU-12-31-39-0C-CD-A3 postfix/smtpd[5618]: 5A0E2746B9: client=domU-12-31-39-0C-CD-A3.onehub.com[127.0.0.1]
Jun 8 21:05:49 domU-12-31-39-0C-CD-A3 postfix/cleanup[5672]: 5A0E2746B9: message-id=<4defe42d42e4c_cfd8473e4a172b@domU-12-31-39-0C-CD-A3.tmail>
Jun 8 21:05:49 domU-12-31-39-0C-CD-A3 postfix/qmgr[5531]: 5A0E2746B9: from=<ws@reply.onehubmaster.com>, size=5186, nrcpt=1 (queue active)
Jun 8 21:05:49 domU-12-31-39-0C-CD-A3 postfix/smtpd[5618]: disconnect from domU-12-31-39-0C-CD-A3.onehub.com[127.0.0.1]
Jun 8 21:05:51 domU-12-31-39-0C-CD-A3 postfix/smtp[5675]: 5A0E2746B9: to=<loe+messages@onehub.com>, relay=aspmx.l.google.com[74.125.93.27]:25, delay=1.7, delays=0.11/0/0.04/1.5, dsn=2.0.0, status=sent (250 2.0.0 OK 1307567151 f11si1758327qck.134)
Jun 8 21:05:51 domU-12-31-39-0C-CD-A3 postfix/qmgr[5531]: 5A0E2746B9: removed
Something went wrong with that request. Please try again.