Skip to content

Instantly share code, notes, and snippets.

View jessereynolds's full-sized avatar

Jesse Reynolds jessereynolds

View GitHub Profile
@jessereynolds
jessereynolds / gist:9781193
Created March 26, 2014 11:26
compile error building rrdtool within omnibus
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Failed to build rrdtool while running `make -j 3` with cwd=/var/cache/omnibus/src/rrdtool-1.4.8,timeout=5400,env="LDFLAGS=-L/opt/bp-collectd-server/embedded/lib -I/opt/bp-collectd-server/embedded/include -I/opt/bp-collectd-server/embedded/include/glib-2.0 CFLAGS=-L/opt/bp-collectd-server/embedded/lib -I/opt/bp-collectd-server/embedded/include -I/opt/bp-collectd-server/embedded/include/glib-2.0 CPPFLAGS=-L/opt/bp-collectd-server/embedded/lib -I/opt/bp-collectd-server/embedded/include -I/opt/bp-collectd-server/embedded/include/glib-2.0 LD_RUN_PATH=/opt/bp-collectd-server/embedded/lib PKG_CONFIG_PATH=/opt/bp-collectd-server/embedded/lib/pkgconfig PATH=/opt/ruby1.9/lib/ruby/gems/1.9.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/bp-collectd-server/embedded/bin"
Exception:
Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '2'
---- Begin output of make -j 3 ----
@jessereynolds
jessereynolds / gist:9774186
Created March 26, 2014 00:04
compiling rrdtool from omnibus ...
Ran ./configure --prefix=/opt/bp-collectd-server/embedded --disable-rrdcgi --disable-rrd_graph --disable-libdbi --disable-libwrap --disable-perl --disable-lua --disable-tcl --disable-python returned 1
----------------------------------------------------------------------------
* I could not find a working copy of glib-2.0. Check config.log for hints on why
this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
so that compiler and the linker can find libglib-2.0 and its header files. If
you have not installed glib-2.0, you can get it either from its original home on
ftp://ftp.gtk.org/pub/glib/2.28/
@jessereynolds
jessereynolds / watch.rb
Created March 18, 2014 04:56
control-c no exits this... celluloid?
#!/usr/bin/env ruby
require 'listen'
@quitting = false
Signal.trap('INT') do
@quitting = true
puts "trapped SIGINT"
end
@jessereynolds
jessereynolds / unless.rb
Created March 14, 2014 05:42
ruby refactoring multiple unlesses
# before:
if command == 'move'
unless options.destination
puts "Error - 'move' requires a --destination"
puts "\n#{optparse}"
end
unless File.exist?(options.destination)
puts "Error - destination does not exist"
@jessereynolds
jessereynolds / keybase.md
Created March 12, 2014 11:33
keybase.md

Keybase proof

I hereby claim:

  • I am jessereynolds on github.
  • I am jesse (https://keybase.io/jesse) on keybase.
  • I have a public key whose fingerprint is B6A7 E328 3910 FF83 CAB6 8F71 BA70 6D29 8547 1ADB

To claim this, I am signing this object:

@jessereynolds
jessereynolds / gist:9227387
Created February 26, 2014 10:42
last few days of #flapjack
Saturday Feb 22:
02:56 → jwoods joined ⇐ adamsteffes quit
03:18 <someword> team flapjack: anyone around?
03:31 → adamsteffes and ddevon joined ⇐ tr0nio quit
08:43 <jesser> someword: hi!
08:44 <someword> hey jesser
08:45 <someword> i'm working on some changes to the jabber bot and was wondering something
08:45 <jesser> yep?
08:45 <someword> for the most part i'm using the methods in Flapjack::Data::Entity
@jessereynolds
jessereynolds / chrome console error
Last active August 29, 2015 13:56
Unable to fork a repo on github due to CORS errors right now. Eg trying to load https://github.com/auxesis/errand/fork works but when trying to actually perform the fork I get a javascript load error:
Script from origin 'https://github.global.ssl.fastly.net' has been blocked from loading
by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present
on the requested resource. Origin 'https://github.com' is therefore not allowed access.
subject_template_path = case
when @config.has_key?('templates') && @config['templates']["#{message_type}_subject.text"]
@config['templates']["#{message_type}_subject.text"]
else
mydir + "/email/#{message_type}_subject.text.erb"
end
@jessereynolds
jessereynolds / gist:8450342
Created January 16, 2014 05:42
chef 11.8.2 crashes my centos 6.3 vm running in virtualbox 4.3.6 on macos 10.8.5
jesse@heart-of-gold omnibus-flapjack $ vagrant destroy centos-6
Are you sure you want to destroy the 'centos-6' VM? [y/N] y
[centos-6] Destroying VM and associated drives...
[Berkshelf] Cleaning Vagrant's berkshelf
[centos-6] Running cleanup tasks for 'chef_solo' provisioner...
[centos-6] Running cleanup tasks for 'shell' provisioner...
jesse@heart-of-gold omnibus-flapjack $ vagrant up centos-6
Bringing machine 'centos-6' up with 'virtualbox' provider...
[centos-6] Importing base box 'opscode-centos-6.3'...
[centos-6] Matching MAC address for NAT networking...
@jessereynolds
jessereynolds / contact_methods.rb
Created January 6, 2014 06:12
ruby object to json issues
response_data =
{"contacts" =>
contacts.collect {|contact|
contact.linked_entity_ids = linked_entity_ids[contact.id]
contact
},
"linked" => {
"entities" => linked_entity_data
}
}