Skip to content

Instantly share code, notes, and snippets.

View tas50's full-sized avatar
🌪️
Producting. That's a thing right?

Tim Smith tas50

🌪️
Producting. That's a thing right?
View GitHub Profile
@tas50
tas50 / gist:2890773
Created June 7, 2012 18:55
Failed chef install
pdxsmitht02:~ smitht$ cd /tmp
pdxsmitht02:tmp smitht$ curl -O http://production.cf.rubygems.org/rubygems/rubygems-1.8.10.tgz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 243k 100 243k 0 0 893k 0 --:--:-- --:--:-- --:--:-- 1207k
pdxsmitht02:tmp smitht$ tar zxf rubygems-1.8.10.tgz
pdxsmitht02:tmp smitht$ cd rubygems-1.8.10
pdxsmitht02:rubygems-1.8.10 smitht$ sudo ruby setup.rb --no-format-executable
Password:
RubyGems 1.8.10 installed
@tas50
tas50 / gist:5060334
Created February 28, 2013 21:37
Ruby 1.9.1 breaking Collectd cookbook
[2013-02-28T20:09:46+00:00] INFO: Processing ruby_block[delete_old_plugins] action create (collectd::default line 74)
================================================================================
Error executing action `create` on resource 'ruby_block[delete_old_plugins]'
================================================================================
NoMethodError
-------------
private method `open' called for Chef::Resource::File:Class
@tas50
tas50 / gist:5463801
Created April 25, 2013 22:36
ark failure on 10.24.4
[2013-04-25T15:23:06-07:00] INFO: Ark light-weight provider already initialized -- overriding!
/usr/lib/ruby/gems/1.8/gems/chef-10.24.4/bin/../lib/chef/provider.rb:215: warning: already initialized constant Ark
================================================================================
Recipe Compile Error in /var/chef/cache/cookbooks/ark/resources/default.rb
================================================================================
ArgumentError
-------------
wrong number of arguments (2 for 1)
@tas50
tas50 / gist:5646038
Created May 24, 2013 19:47
apt failure on chef 11
Compiling Cookbooks...
================================================================================
Recipe Compile Error in /var/chef/cache/cookbooks/apt/resources/preference.rb
================================================================================
ArgumentError
-------------
wrong number of arguments (2 for 1)
@tas50
tas50 / gist:3fe17a6d9fbede0a7669
Created May 7, 2014 01:36
Help an rspec newb
WTF am I doing wrong here?
mdadm ohai plugin:
Ohai.plugin(:Mdadm) do
provides 'mdadm'
def create_raid_device_mash(stdout)
device_mash = Mash.new
device_mash[:device_counts] = Mash.new
cvs diff: Diffing .
cvs diff: Diffing inc
cvs diff: Diffing reverses
Index: reverses/10.12.54
===================================================================
RCS file: /local/cvs/pri/reverses/10.12.54,v
retrieving revision 1.52
diff -u -r1.52 10.12.54
--- reverses/10.12.54 21 May 2014 20:17:03 -0000 1.52
+++ reverses/10.12.54 24 Jul 2014 20:22:23 -0000
@tas50
tas50 / gist:b2f3d9676bc90dd59cc8
Created August 21, 2014 19:23
Add new file for 10.12.17 for syseng usage
This is a new block that was previously allocated for logproc, but had never been used. Wayne is going to rename this for general syseng usage.
tsmith@pridns:~/pri/reverses$ cat 10.12.17
; 10.12.17.0/24 -- syseng servers
;1 router
;2
;3
;4
;5
@tas50
tas50 / gist:cf671e3121efdc669578
Created July 21, 2015 18:19
Chef LWRP for graphing to Librato
# Support whyrun
def whyrun_supported?
true
end
action :graph do
if node.chef_environment == 'production' || node.chef_environment == 'staging'
converge_by("Graph deploy of #{@new_resource.name}") do
graph_deploy
end
#!/usr/bin/env ruby
# encoding: UTF-8
# metrics-nut.rb
#
# DESCRIPTION:
# This plugin uses polls UPS metrics from NUT and produces
# Graphite formated output.
#
# OUTPUT:
# metric data
sensu-plugins Github Organization Report
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┓
┃ Repo Name ┃ Issues ┃ Pull Requests ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━━━━┫
┃ sensu-plugin ┃ 23 ┃ - ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━━━━┫
┃ GIR ┃ 13 ┃ - ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━━━━┫