Skip to content
View gist:2501818
$ sudo mdadm --grow /dev/md0
mdadm: metadata format 01.01 unknown, ignored.
mdadm: no changes to --grow
View gist:2501788
Personalities : [raid0]
md0 : active raid0 sdh[0] sdi[3] sdg[2] sdf[1]
419429376 blocks super 1.1 256k chunks
unused devices: <none>
View gist:2501773
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
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
# 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
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
# 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
# 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
[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
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
Something went wrong with that request. Please try again.