Skip to content

Instantly share code, notes, and snippets.

View mmoll's full-sized avatar
😴
😴 the enemy within

Michael Moll mmoll

😴
😴 the enemy within
View GitHub Profile
@mmoll
mmoll / environment.rb
Created July 12, 2014 12:32
custom fact to return environment on Puppet 3+
require 'puppet'
if Facter.value(:puppetversion).to_i >= 3
Facter.add(:environment) do
setcode do
Puppet[:environment]
end
end
end
@mmoll
mmoll / CVE-2013-7316_gitlab_42.patch
Last active August 29, 2015 13:55
backport fix for CVE-2013-7316 to GitLab 4.2
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 196105f..a41c35c 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -163,4 +163,8 @@ module ApplicationHelper
root_url + path_to_image(source)
end
alias_method :url_to_image, :image_url
+
+ def render_markup(file_name, file_content)