Skip to content

Instantly share code, notes, and snippets.

View jessereynolds's full-sized avatar

Jesse Reynolds jessereynolds

  • Puppet
  • Melbourne, Victoria, Australia
View GitHub Profile
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 / 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.
@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 / 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 / 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 / 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 / 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 / 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 / 0 summary.md
Last active August 29, 2015 13:57
omnibus-collectd - gettext has unsafe dependencies

omnibus-collectd health check failures

The gettext build depends on two libraries outside the omnibus build (in addition to other already whitelisted libraries):

libtinfo5 - /lib/x86_64-linux-gnu/libtinfo.so.5

shared low-level terminfo library for terminal handling

Part of ncurses - http://packages.ubuntu.com/source/precise/ncurses

@jessereynolds
jessereynolds / fail.txt
Created May 4, 2014 20:18
flapjack build failing with ruby 2.1.1, bundler 1.5.3, "Could not find rake-10.3.1 in any of the sources (Bundler::GemNotFound)"
[builder:flapjack] Executing: `/opt/flapjack/embedded/bin/bundle exec rake build` with cwd=/var/cache/omnibus/src/flapjack,timeout=5400,env="RUBYOPT= BUNDLE_BIN_PATH= BUNDLE_GEMFILE= GEM_PATH= GEM_HOME="
[builder:flapjack] /opt/flapjack/embedded/bin/bundle command failed, 0.566573754s
[builder:flapjack] Failed to execute cmd ["/opt/flapjack/embedded/bin/bundle exec rake build", {:cwd=>"/var/cache/omnibus/src/flapjack", :timeout=>5400, :env=>{"RUBYOPT"=>nil, "BUNDLE_BIN_PATH"=>nil, "BUNDLE_GEMFILE"=>nil, "GEM_PATH"=>nil, "GEM_HOME"=>nil}}] 3 time(s). Retrying in 20s.
[builder:flapjack] Executing: `/opt/flapjack/embedded/bin/bundle exec rake build` with cwd=/var/cache/omnibus/src/flapjack,timeout=5400,env="RUBYOPT= BUNDLE_BIN_PATH= BUNDLE_GEMFILE= GEM_PATH= GEM_HOME="
[builder:flapjack] /opt/flapjack/embedded/bin/bundle command failed, 0.589301236s
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Failed to build flapjack while running `/opt/flapjack/embedded/bin/bundle exec rake