Skip to content

Instantly share code, notes, and snippets.

View domofactor's full-sized avatar
🥞
Eating Pancakes

Terrell Broomer domofactor

🥞
Eating Pancakes
  • GitHub Staff
  • Yokohama, Japan
  • 07:15 (UTC +09:00)
  • X @domofactor
View GitHub Profile
@domofactor
domofactor / datatypes.rb
Created June 1, 2018 07:07
ayako learns about data types
#variables
## simple data types
myname = 'terrell' #string
puts 'im #{myname}' #just one big string
puts "i'm #{myname}" #variable expansion and '
myage = 0 #integer
myheight = 6.0 #float
deadday = nil #nil
alive = true #boolean
@domofactor
domofactor / pluginlist.groovy
Created September 18, 2017 18:01
Script Console cmd for generating a list of installed plugins(and deps) on a Jenkins instance
def plugins = jenkins.model.Jenkins.instance.getPluginManager().getPlugins()
plugins.each {
println "${it.getShortName()}:(${it.getVersion()}):${it.getDependencies()}"
}

#GlusterFS prep procedure

  • clone disk from 01
  • on 02 and 01,add gluster:server_install recipe
  • on 02, apt-get install glusterfs-server
  • on 01, service glusterfs-server stop
  • on 01, killall glusterfsd updates the brick-port from 24009(3.1.x) to 49152(3.4.x)
  • test+verify connection to 02(if fail, start 01 service)
  • on 01, apt-get install glusterfs-server
  • test+verify connection by writing a temp file
  • on 02, apt-get install glusterfs-server
Kitchen::UserError: Could not load or activate Berkshelf (Could not open library '/pipeline/cache/bundle-install/ruby/2.2.0/gems/dep_selector-1.0.3/lib/dep_gecode.so': /pipeline/cache/bundle-install/ruby/2.2.0/gems/dep-selector-libgecode-1.0.2/lib/dep-selector-libgecode/vendored-gecode/lib/libgecodesearch.so.32: file too short)
/pipeline/cache/bundle-install/ruby/2.2.0/gems/test-kitchen-1.5.0/lib/kitchen/provisioner/chef/berkshelf.rb:108:in `rescue in load_berkshelf!'
/pipeline/cache/bundle-install/ruby/2.2.0/gems/test-kitchen-1.5.0/lib/kitchen/provisioner/chef/berkshelf.rb:95:in `load_berkshelf!'
/pipeline/cache/bundle-install/ruby/2.2.0/gems/test-kitchen-1.5.0/lib/kitchen/provisioner/chef/berkshelf.rb:54:in `load!'
/pipeline/cache/bundle-install/ruby/2.2.0/gems/test-kitchen-1.5.0/lib/kitchen/provisioner/chef_base.rb:268:in `load_needed_dependencies!'
/pipeline/cache/bundle-install/ruby/2.2.0/gems/test-kitchen-1.5.0/lib/kitchen/configurable.rb:56:in `finalize_config!'
/pipeline/cache/bundle-install/ruby/2.2.
#!/usr/bin/ruby
iostat=`iostat -xdm 30 2| grep -B1 sda| tail -2`.split("\n")
iostat_keys=iostat[0].split("\s")
iostat_values=iostat[1].split("\s")
iostat_hash=Hash[iostat_keys.zip(iostat_values)]
iostat_hash.each do |k,v|
sender=`zabbix_sender -v -c /etc/zabbix/zabbix_agentd.conf -k "iostat-#{k}" -o "#{v}"`
## DEBUG ##