Skip to content

Instantly share code, notes, and snippets.

@jeffweiss
jeffweiss / gist:4027768
Created November 6, 2012 21:40
Live Management stack
Stomp::Error::NoCurrentConnection - no current connection exists:
/opt/puppet/lib/gems/1.8/gems/stomp-1.2.3/lib/stomp/connection.rb:334:in `publish'
/opt/puppet/libexec/mcollective/mcollective/connector/stomp.rb:189:in `send'
/opt/puppet/lib/site_ruby/1.8/mcollective/client.rb:65:in `sendreq'
/opt/puppet/lib/ruby/1.8/timeout.rb:67:in `timeout'
/opt/puppet/lib/site_ruby/1.8/mcollective/client.rb:64:in `sendreq'
/opt/puppet/lib/site_ruby/1.8/mcollective/client.rb:105:in `discover'
/opt/puppet/lib/ruby/1.8/timeout.rb:67:in `timeout'
/opt/puppet/lib/site_ruby/1.8/mcollective/client.rb:104:in `discover'
/opt/puppet/lib/site_ruby/1.8/mcollective/rpc/client.rb:331:in `discover'
@jeffweiss
jeffweiss / dev-env-create.sh
Created November 9, 2012 18:13
Dev env bootstrap script
#!/bin/bash
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
# First try to load from a user install
source $HOME/.rvm/scripts/rvm
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
# Then try to load from a root install
source "/usr/local/rvm/scripts/rvm"
else
printf "ERROR: An RVM installation was not found.\n"
fi
@jeffweiss
jeffweiss / gist:4157483
Created November 27, 2012 22:09
puppetlabs-auth_conf Example
class my_custom_auth_conf_rule {
include auth_conf
auth_conf::acl { '/my_modified_endpoint':
auth => 'yes',
acl_method => ['find','search'],
allow => 'my_custom_cert_name',
}
}
{
"checksums": {
"tests/site.pp": "c094d16be278f045311fafb85d1806e3",
"spec/defines/jenkins_plugin_install_spec.rb": "f7e3588ee424091e05f2fdb1e4be9916",
"spec/classes/jenkins_spec.rb": "08ea3092e7b38375e5e1ab3087236fc0",
"features/deb_support.feature": "14789ecdb4e8ffd58195972969a652ce",
"features/support/boxes/deb/install-puppet-module.sh": "79dda31c04877e19075829f3540d1e31",
"features/support/boxes/deb/verify-jenkins-install": "7ac9d96ae93d0fa83b3343f17a0015bc",
"spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c",
"Rakefile": "aaa0fe1993278f346063b22c15385b3b",
@jeffweiss
jeffweiss / diffstats.html
Last active December 11, 2015 22:58
Commit Calendar View Incantation
<!DOCTYPE html>
<meta charset="utf-8">
<link type="text/css" rel="stylesheet" href="colorbrewer.css"/>
<style>
body {
font: 10px sans-serif;
shape-rendering: crispEdges;
}
@jeffweiss
jeffweiss / gist:5249169
Last active December 15, 2015 10:58 — forked from ploubser/gist:5213863
require 'facter/lsb'
f = File.open('/tmp/file', 'a')
Facter.add(:operatingsystem) do
confine :kernel => :sunos
setcode do "Solaris" end
end
Facter.add(:operatingsystem) do
confine :kernel => :linux
@jeffweiss
jeffweiss / fetchgems.rb
Last active December 16, 2015 16:29
If bundler had a `fetch` command
require 'bundler'
require 'rubygems'
require 'rubygems/gem_runner'
require 'fileutils'
without = [:development, :test]
runner = Gem::GemRunner.new
definition = Bundler::Definition.build('Gemfile', 'Gemfile.lock', nil)
resolver = definition.resolve
@jeffweiss
jeffweiss / gist:6057646
Last active December 20, 2015 02:39
Recently updated gems that don't specify a license
require 'gems'
require 'pp'
pp Gems.latest.map {|g| g["name"]}.
sort.
map {|n| {n => Gems.versions(n) } }.
reject {|elem| elem.has_value? "This rubygem could not be found."}.
map {|elem| {elem.keys.first => elem.values.first.all? {|h| h["licenses"].empty?}}}.
reject {|h| h.has_value? false}
@jeffweiss
jeffweiss / curl.sh
Created January 18, 2014 06:06
Proof that I'm not the @MaxMartinPDX troll
curl --get 'https://api.twitter.com/1.1/users/show.json' --data 'screen_name=MaxMartinPDX'
@jeffweiss
jeffweiss / keybase.md
Created April 7, 2014 18:07
keybase.md

Keybase proof

I hereby claim:

  • I am jeffweiss on github.
  • I am jeffweiss (https://keybase.io/jeffweiss) on keybase.
  • I have a public key whose fingerprint is 0423 A21C FCFF 2A10 E536 F7EA 8C24 30AF 024A C4E9

To claim this, I am signing this object: